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

Fixed DL3 creation complaining about mismatch in binning. #273

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

jsitarek
Copy link
Collaborator

It sometimes happened that the IRF files have different bin ranges saved despite using the same input card. The difference is very small, comparable to the numerical accuracy of double precision. I saw it in the files processed in CNAF and my suspicion is that it comes from inhomogenuity of machines over which the code was run. Now if different binning is detected, it checks also if the relative difference exceeds somewhere 10^-15 and only then raises an error.

It sometimes happened that the IRF files have different bin ranges saved despite using the same input card.
The difference is very small, comparable to the numerical accuracy of double precision.
I saw it in the files processed in CNAF and my suspicion is that it comes from inhomogenuity of machines over which the code was run.
Now if different binning is detected, it checks also if the relative difference exceeds somewhere 10^-15 and only then raises an error.
also set the default language version of python because otherwise pre-commit complained trying to find python 3.1 (??)
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 77.18%. Comparing base (76ab089) to head (8458bcc).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
magicctapipe/io/io.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   77.27%   77.18%   -0.09%     
==========================================
  Files          22       22              
  Lines        2618     2621       +3     
==========================================
  Hits         2023     2023              
- Misses        595      598       +3     

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

@Elisa-Visentin
Copy link
Collaborator

Seems fine to me. Why the changes in pre-commit config?
As for tests, I will work again on coverage and new tests after finishing auto-mcp (not to have too many open projects), so we can probably neglect it

@jsitarek
Copy link
Collaborator Author

pre-commit was failing when I was trying to commit the change to github. For some reason it was trying to use python3.1, no idea why. This solved the problem (and allowed me to commit the changes) and I think it is harmless because we also require python 3.11 in the environment. But I am open to other solutions as well.

@Elisa-Visentin
Copy link
Collaborator

I was just curious (there were no failings in the other PRs, and you just added an if/else, so this is quite strange). BTW, if it works, it is fine

@aleberti aleberti added the maintenance Maintenance related label Dec 3, 2024
@aleberti aleberti merged commit 207f955 into master Dec 3, 2024
6 checks passed
@aleberti aleberti deleted the irf_interp_numerical_check branch December 3, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants