-
Notifications
You must be signed in to change notification settings - Fork 167
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
LRS TA verification image NaNed in pipeline output #8906
Comments
Comment by Tyler Pauly on JIRA: This looks like a result of JP-3570; the flat field applied to these data (https://jwst-crds.stsci.edu/browse/jwst_miri_flat_0787.fits) have DO_NOT_USE DQ flags applied to the slit field. The pipeline then ensures that all science pixel values with the DO_NOT_USE flag are NaN. If that flat is applied only to TACONFIRM images (GENERIC subarray?), perhaps a simple ref file update would fix the issue. |
A few clarifications:
The pixels in question have NO_FLAT_FIELD, NON_SCIENCE, and DO_NOT_USE set. The actual flatfield SCI values themselves are largely bogus. As such, this is exactly what the changes in JP-3570 were designed to address (having a mix of flatfielded and not-actually-flatfielded but multiplied by semi-arbitrary amounts in the CAL files). So, what to do about it?
I think this needs to go to the MIRI team to converge on a consistent way of identifying such pixels via the DQ array, and then continue the conversation accordingly. |
Questions for MIRI:
The challenge here is that the flatfield step is explicitly zeroing (or more accurately, NaNing) out any regions that are not valid science regions with good flatfields when producing the flatfielded image. This includes all flags DO_NOT_USE, NON_SCIENCE, and NO_FLAT_FIELD. That could be reenabled through an update of the DQ arrays in the flatfield reference files, but the slit region would then automatically propagate to imaging mosaics too. Thoughts Greg Sloan Andreea Petric Sarah Kendrew ? |
Comment by Andreea Petric on JIRA: Many thanks, David, for the clarifications. I am confirming I saw this and will discuss it with Sarah and Greg. We do need finite, correct, and consistently flagged values in the LRS slit field in cal. fits in addition to having them in the rate.fits because some users try custom extraction and background determinations using those values.
|
Comment by Sarah Kendrew on JIRA: Thinking about the use cases for these images, I think the main value of the cal.fits files is that they have the WCS assignment (rate images do not), so they are very valuable for checking the WCS of the exposure and the observed coordinates of the target. The ability to do photometry is interesting too, but the calibration that's currently applied to them (i.e. the imager photom file) is currently limited in accuracy due to the slit mask filter which is not accounted for in our imager calibration. I think the options are:
Answering a few of David Law 's questions:
|
Comment by Marshall Perrin on JIRA: Also relevant are various discussions about (potentially, in the future) using the TA Confirm images to help improve aspects of LRS pipeline processing, for instance JP-3307 "MIRI LRS - use TA verification image to determine pathloss correction". I recall also some discussion about potentially using the TA verification to tweak the wavelength solution if the source is not vertically centered in the slit, though I can't find an existing ticket for that. If any of those enhancements are to eventually happen, presumably it would help to have finite-valued slit pixel data in cal files to help enable that. Sarah asked me about my uses of these data (as a science user of this mode). I confirm that primarily I was using the data to check the position of the source in the slit, relative to the WCS. (In order to use the WCS and the measured residual offset to more accurately know the position of the science target in the dispersed LRS spectrum images) For now I can adjust my code for the workaround of using the pixels from the rate files plus the WCS from the cal files. As a secondary use I also extracted photometry from the cal images, but that's a secondary case and I acknowledge is going to have inevitably higher errors due to the slit mask filter, as Sarah noted. I see & agree with all the practical concerns raised re: not wanting these pixels included in regular mosaics, nor having to maintain a separate set of flats and adjust the CRDS logic to filter on EXP_TYPE. It's an awkward edge case.
|
It sounds like the solution is this:
With those two changes it looks like this should behave as desired, producing values in the cal.fits files but not in any resampled data (since the resample step ignores both DO_NOT_USE and NON_SCIENCE already). |
Comment by Sarah Kendrew on JIRA: Thanks David Law! Let's give Greg Sloan the chance to digest this issue & comment as well, as LRS lead, before finalising any decisions. |
Sarah Kendrew Certainly. Adding a quick note that it looks like this will not impact any other instruments. From crawling all 637 MIRI+NIRCAM+NIRISS flatfield reference files used by the latest CRDS rmaps, it looks like none of them currently contain any pixels for which NON_SCIENCE is set but DO_NOT_USE or NO_FLAT_FIELD are not. |
…ipeline 1.16 issue. See spacetelescope/jwst#8906
Comment by Greg Sloan on JIRA: I approve David's plan:
|
Issue JP-3786 was created on JIRA by Greg Sloan:
The latest pipeline release has NaNed all non-imaging fields in TA verification images. That means that the LRS slit field is NaNed, thus defeating the purpose of the TA verification image.
The text was updated successfully, but these errors were encountered: