.. _gallery_nb_gallery_example_datalevel4.ipynb: Using high-level science data ============================= High-level science data includes information provided as functions, histograms, tables etc. containing data derived from e.g. simulations like detector acceptance, background expectations etc. .. code:: ipython3 from openkm3.store import KM3Store store = KM3Store() .. parsed-literal:: INFO:root:Loaded catalog from data center. Lookup table: Detector acceptance --------------------------------- The detector acceptance (here for the ANTARES 2007-2017 neutrino sample) is provided as lookup table. .. code:: ipython3 acceptance = store.get("ana20_01_acc") .. parsed-literal:: INFO:root:Loaded entry ana20_01_acc as . .. code:: ipython3 acceptance.show_paraminfo() +---------------+-----------------------+--------------------------------------------------------------------+---------------------+--------------+--------------+ | Parameter | Name | Description | Unit | Symbol | Range | +===============+=======================+====================================================================+=====================+==============+==============+ | xaxis | Declination | Source declination | deg | %delta | [-90, 90] | +---------------+-----------------------+--------------------------------------------------------------------+---------------------+--------------+--------------+ | yaxis | Spectral index | Exponential of the energy power spectrum E^{-x} | | %lambda | [1.5, 3.0] | +---------------+-----------------------+--------------------------------------------------------------------+---------------------+--------------+--------------+ | returnvalue | Detector acceptance | Acceptance of the detector to a given neutrino point source flux | GeV^{-1} cm^{2} s | Acceptance | | +---------------+-----------------------+--------------------------------------------------------------------+---------------------+--------------+--------------+ .. code:: ipython3 acceptance.lookup(xvalue = 100, yvalue = 10) .. parsed-literal:: WARNING:root:x value 100 out of range. Range is [-90, 90] .. code:: ipython3 df = acceptance.get_dataframe() .. code:: ipython3 df.plot(kind = "line", logy=True, legend=False) .. parsed-literal:: .. image:: images/example_datalevel4_0.png Function: Number of background events estimate ---------------------------------------------- This information (again for the ANTARES 2007-2017 sample) is provided as polynomial function. .. code:: ipython3 bkg = store.get("ana20_01_bkg") .. parsed-literal:: INFO:root:Loaded entry ana20_01_bkg as . .. code:: ipython3 bkg.functiontype .. parsed-literal:: 'polynomial' .. code:: ipython3 bkg.show_paraminfo() +---------------+-------------------------------+----------------------------------------------+--------+--------------+-------------+ | Parameter | Name | Description | Unit | Symbol | Range | +===============+===============================+==============================================+========+==============+=============+ | xvalue | Declination | Source declination | deg | %delta | [-90, 90] | +---------------+-------------------------------+----------------------------------------------+--------+--------------+-------------+ | returnvalue | Number of background events | Estimated number of muon background events | | N\_{, bkg} | | +---------------+-------------------------------+----------------------------------------------+--------+--------------+-------------+ .. code:: ipython3 bkg.evaluate(20) # returns function result for given value .. parsed-literal:: 7893.0656496 .. only:: html .. container:: sphx-glr-download **Download python script:** :download:`example_datalevel4.py` **Download Jupyter notebook:** :download:`example_datalevel4.ipynb`