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

Effective Area 3D #281

Merged
merged 24 commits into from
Nov 7, 2024
Merged

Effective Area 3D #281

merged 24 commits into from
Nov 7, 2024

Conversation

luca-dib
Copy link
Contributor

Adds two methods of calculating the effective area in bins of energy and two spacial dimensions. These methods differ in the coordinate frame used for the spacial dimensions.

  • calculate_effective_area_3d_polar uses a polar coordinate system with FOV pointing position offset and position angle coordinates
  • calculate_effective_area_3d_nominal uses a quasi-cartesian coordinate system with FOV longitude and latitude coordinates centred on the pointing position

Also adds respective functions to calculate the number of showers expected in the 3D bins from simulation info to the SimulatedEventsInfo class (calculate_n_showers_3d_polar, calculate_n_showers_3d_nominal), as well as a utility function to calculate the position angle w.r.t. the pointing from an event table (calculate_source_fov_position_angle).

Luca Di Bella and others added 9 commits February 12, 2024 17:35
…ensions

The different methods use binning in different coordinate systems
 - effective_area_3D_polar uses a polar coordinate system with radial FOV offset and azimuthal FOV position angle bins
 - effective_area_3D_nominal uses a nominal coordinate system with FOV longitude and FOV latitude bins
These calculate the number of showers in each bin for different coordinate systems
 - calculate_n_showers_3D_polar uses a polar coordinate system with radial FOV offset bins and azimuthal FOV position angle bins
 - calculate_n_showers_3D_nominal uses a nominal coordinate system with FOV longitude and latitude bins
pyirf/irf/effective_area.py Outdated Show resolved Hide resolved
pyirf/irf/effective_area.py Outdated Show resolved Hide resolved
pyirf/irf/effective_area.py Outdated Show resolved Hide resolved
pyirf/simulations.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 95.01%. Comparing base (c7db045) to head (34ecab9).
Report is 9 commits behind head on main.

Current head 34ecab9 differs from pull request most recent head af76243

Please upload reports for the commit af76243 to get more accurate results.

Files Patch % Lines
pyirf/simulations.py 31.25% 11 Missing ⚠️
pyirf/irf/effective_area.py 20.00% 8 Missing ⚠️
pyirf/utils.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
- Coverage   95.60%   95.01%   -0.60%     
==========================================
  Files          62       62              
  Lines        3278     3308      +30     
==========================================
+ Hits         3134     3143       +9     
- Misses        144      165      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pyirf/simulations.py Outdated Show resolved Hide resolved
pyirf/simulations.py Outdated Show resolved Hide resolved
pyirf/simulations.py Outdated Show resolved Hide resolved
pyirf/utils.py Show resolved Hide resolved
pyirf/simulations.py Outdated Show resolved Hide resolved
pyirf/coordinates.py Outdated Show resolved Hide resolved
pyirf/simulations.py Outdated Show resolved Hide resolved
pyirf/coordinates.py Outdated Show resolved Hide resolved
pyirf/simulations.py Outdated Show resolved Hide resolved
@maxnoe maxnoe merged commit 0c3f1c1 into cta-observatory:main Nov 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants