spacetelescope / stcal

https://stcal.readthedocs.io/en/latest/
Other
10 stars 32 forks source link

JP-3004: Corrects the Final Slope Computation for Multi-Integration Data with Some Unusable Integrations #167

Closed kmacdonald-stsci closed 1 year ago

kmacdonald-stsci commented 1 year ago

Resolves JP-3004

This PR addresses the computation of multi-integration data that has bad multiple integrations. The final image slope calculations incorrectly used variances from unusable integrations as a part of the denominator sum. Because of this the slope had smaller value than it should have. These variances are now excluded from the denominator, correcting the "averaging" of usable integration slopes.

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.18 :tada:

Comparison is base (3321069) 74.60% compared to head (c9aa3b1) 74.78%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #167 +/- ## ========================================== + Coverage 74.60% 74.78% +0.18% ========================================== Files 29 29 Lines 5658 5700 +42 ========================================== + Hits 4221 4263 +42 Misses 1437 1437 ``` | [Impacted Files](https://app.codecov.io/gh/spacetelescope/stcal/pull/167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | Coverage Δ | | |---|---|---| | [src/stcal/ramp\_fitting/ols\_fit.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-c3JjL3N0Y2FsL3JhbXBfZml0dGluZy9vbHNfZml0LnB5) | `77.44% <100.00%> (+0.06%)` | :arrow_up: | | [tests/test\_ramp\_fitting.py](https://app.codecov.io/gh/spacetelescope/stcal/pull/167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF9yYW1wX2ZpdHRpbmcucHk=) | `88.32% <100.00%> (+0.62%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

kmacdonald-stsci commented 1 year ago

Looks good.

Have you been able to get a regtest run using the PR branch?

The regression tests are running now. I expect some failures with this change.

hbushouse commented 1 year ago

Regression test run https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/731/ appears to show only expected (and unrelated) failures. So it looks good and I'm merging.