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.
from openkm3.store import KM3Store
store = KM3Store()
INFO:root:Loaded catalog from cache.
The detector acceptance (here for the ANTARES 2007-2017 neutrino sample) is provided as lookup table.
acceptance = store.get("ana20_01_acc")
INFO:root:Loaded entry ana20_01_acc as <class 'openkm3.dataclasses.LookUpTable'>.
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 |
acceptance.lookup(xvalue = 100, yvalue = 10)
WARNING:root:x value 100 out of range. Range is [-90, 90]
df = acceptance.get_dataframe()
df.plot(kind = "line", logy=True, legend=False)
<AxesSubplot:>
This information (again for the ANTARES 2007-2017 sample) is provided as polynomial function.
bkg = store.get("ana20_01_bkg")
INFO:root:Loading data from cache. INFO:root:Loaded entry ana20_01_bkg as <class 'openkm3.dataclasses.Function'>.
bkg.functiontype
'polynomial'
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_{\mu, bkg} |
bkg.evaluate(20) # returns function result for given value
7893.0656496