Skip to content

Bad recentering of the WL images due to field with “relatively bright stars” #97

Open
@kulpster85

Description

@kulpster85

Description

Encountered an issue with the recenter function during routine wavefront sensing. The Center of mass was off due to other bright stars in the field. This is an update to force the center of mass to not be biased by nearby stars.

Expected behavior

Recenter the brightest star in the field.

Actual behavior

The center of mass was offset which caused the center of the PSF to be miscalculated, resulting in NaN(s).

Steps to Reproduce

Run QUIP with an Operation File with Operation WAVEFRONT_MAINTENANCE with the following input images: (which can be obtained from MAST)
jw02726-o097_t020_nircam_f212n-wlm8-nrca3_wfscmb-04.fits
jw02726-o097_t020_nircam_f212n-wlp8-nrca3_wfscmb-05.fits

  1. Download the images from MAST: https://mast.stsci.edu/portal/Mashup/Clients/Mast/Portal.html?searchQuery=%7B%22service%22%3A%22JWSTFILTERED%22%2C%22inputText%22%3A%5B%7B%22paramName%22%3A%22filter%22%2C%22niceName%22%3A%22filter%22%2C%22values%22%3A%5B%22F212N%22%5D%2C%22valString%22%3A%22F212N%22%2C%22isDate%22%3Afalse%2C%22facetType%22%3A%22discrete%22%2C%22displayString%22%3A%22F212N%22%7D%2C%7B%22paramName%22%3A%22observtn%22%2C%22niceName%22%3A%22observtn%22%2C%22values%22%3A%5B%5D%2C%22valString%22%3A%22097%22%2C%22isDate%22%3Afalse%2C%22freeText%22%3A%22097%22%2C%22displayString%22%3A%22097%22%7D%2C%7B%22paramName%22%3A%22program%22%2C%22niceName%22%3A%22program%22%2C%22values%22%3A%5B%5D%2C%22valString%22%3A%2202726%22%2C%22isDate%22%3Afalse%2C%22freeText%22%3A%2202726%22%2C%22displayString%22%3A%2202726%22%7D%2C%7B%22paramName%22%3A%22act_id%22%2C%22niceName%22%3A%22act_id%22%2C%22values%22%3A%5B%2205%22%2C%2204%22%5D%2C%22valString%22%3A%2205%2C%2004%22%2C%22isDate%22%3Afalse%2C%22facetType%22%3A%22discrete%22%2C%22displayString%22%3A%2205%2C%2004%22%7D%2C%7B%22paramName%22%3A%22detector%22%2C%22niceName%22%3A%22detector%22%2C%22values%22%3A%5B%22NRCA3%22%5D%2C%22valString%22%3A%22NRCA3%22%2C%22isDate%22%3Afalse%2C%22facetType%22%3A%22discrete%22%2C%22displayString%22%3A%22NRCA3%22%7D%2C%7B%22paramName%22%3A%22productLevel%22%2C%22niceName%22%3A%22productLevel%22%2C%22values%22%3A%5B%223%22%5D%2C%22valString%22%3A%223%22%2C%22isDate%22%3Afalse%2C%22facetType%22%3A%22discrete%22%2C%22displayString%22%3A%223%22%7D%5D%2C%22position%22%3A%22undefined%2C%20undefined%2C%20undefined%22%2C%22paramsService%22%3A%22Mast.Jwst.Filtered.Nircam%22%2C%22title%22%3A%22JWST%3A%20%20Advanced%20Search%201%22%2C%22tooltip%22%3A%22F212N%3B%20097%3B%2002726%3B%2005%2C%2004%3B%20NRCA3%3B%203%3B%20%22%2C%22columns%22%3A%22*%22%7D
  2. Create a Operation File that provides the downloaded images: see example: https://github.com/spacetelescope/wss_tools/blob/master/wss_tools/tests/data/operation_file_001.xml
  3. quip <operation_file>
  4. Verify the error is thrown at recenter.py, line 90
offsetdata = np.roll(data, (xcntr - int(ycpsf),
                                        ycntr - int(xcpsf)),
                                 axis=(1, 0))
ValueError: cannot convert float NaN to integer 

System Details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions