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

Properly normalize edisp in lstchain v0.9 #1164

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lstchain/tools/lstchain_create_irf_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,15 @@ def start(self):
fov_offset_bins,
migration_bins,
)
# Different normalization of EDISP had been assumed so far (to the sum of 1).
# According to GADF definition, it should be normalized to the integral of 1.
# See https://github.com/cta-observatory/pyirf/pull/250
self.log.warning(
morcuended marked this conversation as resolved.
Show resolved Hide resolved
"Fixing EDISP normalization for v0.9 data products. The proper "
"normalization is assumed in lstchain v0.10.5 which uses pyirf >= v0.10.0"
)
bin_width = np.diff(migration_bins)
self.edisp /= bin_width[np.newaxis, :, np.newaxis]
self.hdus.append(
create_energy_dispersion_hdu(
self.edisp,
Expand Down
Loading