cta-observatory / cta-lstchain

LST prototype testbench chain
https://cta-observatory.github.io/cta-lstchain/
BSD 3-Clause "New" or "Revised" License
22 stars 77 forks source link

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

Closed SeiyaNozaki closed 2 weeks ago

SeiyaNozaki commented 4 months ago

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.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

moralejo commented 1 month ago

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

SeiyaNozaki commented 4 weeks ago

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 commented 4 weeks ago

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 commented 4 weeks ago

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

SeiyaNozaki commented 4 weeks ago

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!