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-3643: Add background error propagation for non-IFU spectral extraction #8532

Merged
merged 5 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ extract_1d
- Add propagation of uncertainty when annular backgrounds are subtracted
from source spectra during IFU spectral extraction. [#8515]

- Add propagation of background uncertainty when background is subtracted from
source spectra during non-IFU spectral extraction. [#8532]

- Fix error in application of aperture correction to variance arrays. [#8530]

extract_2d
Expand Down
5 changes: 5 additions & 0 deletions jwst/extract_1d/extract1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ def _extract_src_flux(image, var_poisson, var_rnoise, var_flat, x, j, lam, srcli
# subtract background per pixel:
val -= bkg

# add background variance to variance in source extraction region
f_var_poisson += b_var_poisson
f_var_rnoise += b_var_rnoise
f_var_flat += b_var_flat

# scale per pixel values by pixel area included in extraction
val *= area
bkg *= area
Expand Down