Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use thrown event histogram when computing IRFs #128

Open
kosack opened this issue Apr 27, 2021 · 1 comment
Open

Use thrown event histogram when computing IRFs #128

kosack opened this issue Apr 27, 2021 · 1 comment
Labels
DL2-to-DL3 enhancement New feature or request
Milestone

Comments

@kosack
Copy link
Contributor

kosack commented Apr 27, 2021

Description

  • when making the IRFs (Aeff and sensitivity), the thrown energy histogram that is stored in the SimTel and DL1 files should be used for weighting, rather than the analytic model of the expected spectrum parameters.
  • This will be less error-prone if we combine simulations that used different:
    • input spectra
    • start and ending energy range
    • core offset distribution

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

@kosack kosack added the enhancement New feature or request label Apr 27, 2021
@kosack kosack changed the title [FEATURE REQUEST] Use thrown energy histogram when computing IRFs Apr 27, 2021
@kosack kosack changed the title Use thrown energy histogram when computing IRFs Use thrown event histogram when computing IRFs Apr 27, 2021
@HealthyPear HealthyPear added this to the 1.0.0 milestone Apr 28, 2021
@HealthyPear
Copy link
Member

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

@HealthyPear HealthyPear modified the milestones: v1.0.0, v0.6.0 Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DL2-to-DL3 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants