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

Update lightcurve.py #587

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Pablogh292
Copy link

Fixes an issue regarding lightcurve.py crashing when a time bin has NaN values. Generally speaking all the code does is add an extra try/except block to handle the RuntimeError thrown out by gtanalysis.py when it encounters NaN values.

Fixes an issue regarding lightcurve.py crashing when a time bin has NaN values.
@omodei omodei self-requested a review May 2, 2024 20:49
Copy link

codecov bot commented May 2, 2024

Codecov Report

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

Project coverage is 49.21%. Comparing base (fc0801a) to head (a967ef4).

Files Patch % Lines
fermipy/lightcurve.py 43.37% 47 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #587      +/-   ##
==========================================
- Coverage   49.29%   49.21%   -0.08%     
==========================================
  Files         143      143              
  Lines       26962    27005      +43     
==========================================
+ Hits        13290    13291       +1     
- Misses      13672    13714      +42     
Flag Coverage Δ
unittests 49.21% <43.37%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@omodei omodei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to isolate the problem a bit more, instead of incorporating so many lines of code in the trt/except block? Also, I would suggest to except with catching the exception.

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

Successfully merging this pull request may close these issues.

2 participants