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

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

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

ianyuwong
Copy link
Contributor

@ianyuwong ianyuwong commented May 31, 2024

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)

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • All comments are resolved
  • Make sure the JIRA ticket is resolved properly

ianyuwong added 2 commits May 31, 2024 15:58
- Split 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). Applying the square of the correction factor to the variance arrays.
@ianyuwong ianyuwong requested a review from a team as a code owner May 31, 2024 20:46
Copy link

codecov bot commented May 31, 2024

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 ⚠️
Additional details and impacted files
@@            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     

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

@ianyuwong ianyuwong changed the title Fix aperture correction to variance arrays JP-3642: Fix aperture correction to variance arrays May 31, 2024
@hbushouse hbushouse added this to the Build 11.0 milestone Jun 5, 2024
@hbushouse
Copy link
Collaborator

Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code updates look good. Will wait for regtest results for final approval.

@hbushouse
Copy link
Collaborator

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.

@hbushouse hbushouse merged commit fbf14c3 into spacetelescope:master Jun 5, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in ApCorr propagation to variances
2 participants