cta-observatory / protopipe

Prototype data analysis pipeline for the Cherenkov Telescope Array Observatory
https://protopipe.readthedocs.io/en/latest/
Other
5 stars 13 forks source link

Use thrown event histogram when computing IRFs #128

Open kosack opened 3 years ago

kosack commented 3 years ago

Description

In the DL1 files, the simulation/service/shower_distribution table provides this information as a 2D histogram of thrown events per energy and per offset bin. In each row of the table is the information for each run included in the file, so summing the histograms will produce the final distribution.

Examples

THe location of the histograms in the DL1 format: image

An example of combining simulations with different spectral parameters: note that N_sim(E_true) is not a pure power-law, but a combination of several image

HealthyPear commented 3 years ago

note to self

at the end of the scripts data_training or write_dl2 we reach also the end of the EventSource instance so the source.file_.histograms are filled

for h in source.file_.histograms:
    if h["id"] == 6:
        selected_histogram = h
            break

then add selected_histogram to new table in each HDF5 file maybe add runheader info so we do not have to read it from performance.yaml