legend-exp / pygama

Python package for data processing and analysis
https://pygama.readthedocs.io
GNU General Public License v3.0
18 stars 56 forks source link

Updates to energy calibration to fix issues found and to a/e to combine multiple calibration runs #507

Closed ggmarshall closed 1 year ago

ggmarshall commented 1 year ago

Energy calibration - switch to minos, improvements to output plots, add fit errors into outputs, bugfix on final ecal fit, changed default to use all events, now returns the fit of the peak even if failed with tag as to whether it failed or not. A/E - added time correction code, refactored pdfs to make easier to add new fit functions, added ability to apply drift time cuts for batch 5s, dep correction, general improvements to fitting.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 1.53% and project coverage change: -1.49% :warning:

Comparison is base (034a3fb) 21.09% compared to head (c15507b) 19.60%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #507 +/- ## ========================================== - Coverage 21.09% 19.60% -1.49% ========================================== Files 30 30 Lines 5759 6201 +442 ========================================== + Hits 1215 1216 +1 - Misses 4544 4985 +441 ``` | [Files Changed](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp) | Coverage Δ | | |---|---|---| | [src/pygama/math/peak\_fitting.py](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9tYXRoL3BlYWtfZml0dGluZy5weQ==) | `26.51% <0.00%> (ø)` | | | [src/pygama/pargen/AoE\_cal.py](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9wYXJnZW4vQW9FX2NhbC5weQ==) | `0.00% <ø> (ø)` | | | [src/pygama/pargen/cuts.py](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9wYXJnZW4vY3V0cy5weQ==) | `7.85% <0.00%> (-0.04%)` | :arrow_down: | | [src/pygama/pargen/ecal\_th.py](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9wYXJnZW4vZWNhbF90aC5weQ==) | `0.00% <0.00%> (ø)` | | | [src/pygama/pargen/energy\_optimisation.py](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9wYXJnZW4vZW5lcmd5X29wdGltaXNhdGlvbi5weQ==) | `6.43% <0.00%> (ø)` | | | [src/pygama/pargen/energy\_cal.py](https://app.codecov.io/gh/legend-exp/pygama/pull/507?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9wYXJnZW4vZW5lcmd5X2NhbC5weQ==) | `13.15% <2.77%> (-0.15%)` | :arrow_down: |

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

jasondet commented 1 year ago

looks good to me

jasondet commented 1 year ago

Looks good to me. codecov is complaining that this puts us under the test coverage percentage but that's not just this PRs fault. Will merge anyway.