Skip to content

Commit

Permalink
JP-3609: Change treatment of MIRI MRS values with no photom info (#8453)
Browse files Browse the repository at this point in the history
Co-authored-by: Howard Bushouse <bushouse@stsci.edu>
  • Loading branch information
drlaw1558 and hbushouse committed May 7, 2024
1 parent 53b1714 commit 854f84b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ outlier_detection
``OutlierDetectionStackStep``, ``outlierpars`` reference file handling,
and ``scale_detection`` (an unused argument). [#8438]

photom
------

- Ensure that NaNs in MRS photom files are not replaced with ones by
pipeline code for consistency with other modes [#8453]

pipeline
--------

Expand Down
12 changes: 2 additions & 10 deletions jwst/photom/photom.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,18 +508,10 @@ def calc_miri(self, ftab):
# MRS detectors
elif self.detector == 'MIRIFUSHORT' or self.detector == 'MIRIFULONG':

# Reset conversion and pixel size values with DQ=NON_SCIENCE to 1,
# so no conversion is applied
where_dq = np.bitwise_and(ftab.dq, dqflags.pixel['NON_SCIENCE'])
ftab.data[where_dq > 0] = 1.0

# Reset NaN's in conversion array to 1
# Make sure all NaN's have DO_NOT_USE flag set
where_nan = np.isnan(ftab.data)
ftab.data[where_nan] = 1.0

# Make sure all NaN's and zeros have DQ flags set
ftab.dq[where_nan] = np.bitwise_or(ftab.dq[where_nan],
dqflags.pixel['NON_SCIENCE'])
dqflags.pixel['DO_NOT_USE'])

# Compute the combined 2D sensitivity factors
sens2d = ftab.data
Expand Down

0 comments on commit 854f84b

Please sign in to comment.