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

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

Open
kulpster85 opened this issue Sep 8, 2022 · 0 comments
Assignees
Labels

Comments

@kulpster85
Copy link
Collaborator

kulpster85 commented Sep 8, 2022

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

@kulpster85 kulpster85 added the bug label Sep 8, 2022
@kulpster85 kulpster85 self-assigned this Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant