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

Fix fake errors in DL2 to DL3 & Index creation step #1227

Merged
merged 9 commits into from
Jun 17, 2024
Merged

Conversation

SeiyaNozaki
Copy link
Collaborator

Fix #1225 with some code refactoring.
I updated codes adding case handling for IRF interpolation and index creation (point-like IRF: effective area and energy dispersion. full-enclosure: + PSF and background model). I added a warning message for background IRF.
Actually I also found that there was a small typo/bug in PSF interpolation and pytest of the interpolation for full-enclosure IRF, so I also fixed it.

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.11%. Comparing base (e097079) to head (e55286f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1227      +/-   ##
==========================================
+ Coverage   73.05%   73.11%   +0.06%     
==========================================
  Files         134      134              
  Lines       14039    14029      -10     
==========================================
+ Hits        10256    10258       +2     
+ Misses       3783     3771      -12     

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

Copy link
Contributor

@chaimain chaimain left a comment

Choose a reason for hiding this comment

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

Maybe also update the DL2_to_DL3 notebook to remove the fake errors for better documentation

@moralejo
Copy link
Collaborator

moralejo commented Jun 5, 2024

@SeiyaNozaki, this got stuck... can you please address the comments?

@SeiyaNozaki
Copy link
Collaborator Author

SeiyaNozaki commented Jun 5, 2024

Regarding DL2_to_DL3 notebook, can you re-run the notebook with this branch? @morcuended
We also need to update the config file name as well. Then I got the following error when launching lstchain_create_dl3_file in this notebook. I'm not much sure what is the reason...

The metadata are not comparable
The other parameter axes data are comparable
2024-06-05 16:39:32,544 ERROR [lstchain.DataReductionFITSWriter] (tool.run): IRF files in /fefs/aswg/workspace/analysis-school-2024/DL2_to_DL3/IRF with pattern, *irf*.fits.gz are not similar and cannot be used to interpolate. Use different list of IRFs.

@morcuended
Copy link
Member

morcuended commented Jun 5, 2024

Regarding DL2_to_DL3 notebook, can you re-run the notebook with this branch? @morcuended
We also need the config file name as well. Then I got the following error when launching lstchain_create_dl3_file in this notebook. I'm not much sure what is the reason...

The metadata are not comparable
The other parameter axes data are comparable
2024-06-05 16:39:32,544 ERROR [lstchain.DataReductionFITSWriter] (tool.run): IRF files in /fefs/aswg/workspace/>analysis-school-2024/DL2_to_DL3/IRF with pattern, *irf*.fits.gz are not similar and cannot be used to interpolate. Use >different list of IRFs.

Sure, I will try it out.

Regarding the problem with the irfs, I think it is because I produced in the same directory an IRF file with different cuts or something like this. I removed the file I think is problematic. You can try again. I will do so as well.

@morcuended
Copy link
Member

I will update the notebook as well, in my to-do list

@SeiyaNozaki
Copy link
Collaborator Author

Okay thank you @morcuended !

@chaimain @maxnoe Could you please review the code again (apart from DL2_to_DL3 notebook which will be updated by Daniel later)? Thanks!

@moralejo moralejo merged commit 8b1ca26 into main Jun 17, 2024
9 checks passed
@moralejo moralejo deleted the fix_fake_irf_error branch June 17, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants