#!/usr/bin/env python # coding: utf-8 # # 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. # In[1]: from openkm3.store import KM3Store store = KM3Store() # ## Lookup table: Detector acceptance # The detector acceptance (here for the ANTARES 2007-2017 neutrino sample) is provided as lookup table. # In[2]: acceptance = store.get("ana20_01_acc") # In[3]: acceptance.show_paraminfo() # In[4]: acceptance.lookup(xvalue = 100, yvalue = 10) # In[5]: df = acceptance.get_dataframe() # In[6]: df.plot(kind = "line", logy=True, legend=False) # ## Function: Number of background events estimate # # This information (again for the ANTARES 2007-2017 sample) is provided as polynomial function. # In[7]: bkg = store.get("ana20_01_bkg") # In[8]: bkg.functiontype # In[9]: bkg.show_paraminfo() # In[10]: bkg.evaluate(20) # returns function result for given value