Skip to content

Commit

Permalink
Merge branch 'master' into JP-3595
Browse files Browse the repository at this point in the history
  • Loading branch information
emolter committed May 8, 2024
2 parents d38a4dc + c9e8275 commit e9ba9de
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ assign_wcs

- Fixed test for NIRCam TSGRISM mode. [#8449]

- Move the assigned source position for dedicated NIRSpec MOS background slits from the
lower left corner of the slit to the middle of the slit. [#8461]

associations
------------

Expand Down Expand Up @@ -85,6 +88,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
4 changes: 2 additions & 2 deletions jwst/assign_wcs/nirspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ def get_open_msa_slits(msa_file, msa_metadata_id, dither_position,
quadrant = slitlets_sid[0]['shutter_quadrant']
ycen = j
xcen = slitlets_sid[0]['shutter_row'] # grab the first as they are all the same
source_xpos = 0.0
source_ypos = 0.0
source_xpos = 0.5
source_ypos = 0.5
source_id = _get_bkg_source_id(bkg_counter, max_source_id)
log.info(f'Slitlet_id {slitlet_id} is background only; assigned source_id = {source_id}')
bkg_counter += 1
Expand Down
2 changes: 1 addition & 1 deletion jwst/assign_wcs/tests/test_nirspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test_msa_configuration_all_background():
slitlet_info = nirspec.get_open_msa_slits(msaconfl, msa_meta_id, dither_position,
slit_y_range=[-.5, .5])
ref_slit = trmodels.Slit(57, 8281, 1, 251, 23, -2.15, 2.15, 4, 0, '1x1', 'background_57', 'bkg_57',
0, -0.5, -0.5)
0, 0.0, 0.0)
_compare_slits(slitlet_info[0], ref_slit)


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 e9ba9de

Please sign in to comment.