spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
570 stars 167 forks source link

JP-3642: Fix aperture correction to variance arrays #8530

Closed ianyuwong closed 5 months ago

ianyuwong commented 5 months ago

Resolves JP-3642

Closes #8521

This PR fixes an error in the application of aperture correction factors to variance arrays in extract1d/apply_apcorr.py. New code splits the columns to which aperture correction is applied into the flux columns (flux_cols_to_correct) and the corresponding variance arrays (var_cols_to_correct). For the latter, it multiplies the square of the correction factor to the variance arrays.

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

codecov[bot] commented 5 months ago

Codecov Report

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

Project coverage is 58.02%. Comparing base (4179c09) to head (39fb3db). Report is 321 commits behind head on master.

Files with missing lines Patch % Lines
jwst/extract_1d/apply_apcorr.py 0.00% 16 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8530 +/- ## ========================================== + Coverage 57.97% 58.02% +0.04% ========================================== Files 387 388 +1 Lines 38830 38979 +149 ========================================== + Hits 22513 22618 +105 - Misses 16317 16361 +44 ```

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

hbushouse commented 5 months ago

Regression tests started at https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1500

hbushouse commented 5 months ago

Regression test results show the expected increases in the variance columns of x1d/x1dints files, along with some other unrelated differences. So this looks good.