Skip to content

Commit

Permalink
JP-3643: Add background error propagation for non-IFU spectral extrac…
Browse files Browse the repository at this point in the history
…tion (#8532)

Co-authored-by: Howard Bushouse <[email protected]>
  • Loading branch information
ianyuwong and hbushouse authored Jun 6, 2024
1 parent fbf14c3 commit f2c9e93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit f2c9e93

Please sign in to comment.