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

Applying nan_to_num for Effective Area #227

Open
chaimain opened this issue May 15, 2023 · 1 comment
Open

Applying nan_to_num for Effective Area #227

chaimain opened this issue May 15, 2023 · 1 comment

Comments

@chaimain
Copy link

Effective Area evaluation is missing the application of numpy.nan_to_num in the functions effective_area_per_energy and effective_area_per_energy_and_fov in https://github.com/cta-observatory/pyirf/blob/main/pyirf/irf/effective_area.py unlike for other IRFs.

@maxnoe
Copy link
Member

maxnoe commented May 15, 2023

It's right that this is inconsistent, but I'd argue we should remove the nan_to_num from the other IRFs instead of adding it to effective area.

The nans occur when dividing by zero, which always means "no true events in this energy bin". So we just don't know the IRF, filling nan is more appropriate than filling 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants