spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope

Home Page:https://jwst-pipeline.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update LRS extraction positions

stscijgbot-jp opened this issue · comments

Issue JP-3565 was created on JIRA by David Law:

Per discussion on https://jira.stsci.edu/browse/JP-3556 and https://jira.stsci.edu/browse/JP-3547, LRS is presently extracting spectra at fixed slit locations regardless of dither pattern.  As a result, extractions are negative, zero, etc when the dither does not match this pixel position.

LRS team should discuss path forward, perhaps most easily be re-enabling use of the use_source_posn keyword in the relevant parameter reference files.  This should give better performance now than it did last Fall.

Comment by David Law on JIRA:

Also tagging Misty Cracraft 

Comment by David Law on JIRA:

From talking to Greg Sloan , it sounds like the LRS team has decided to:

  • File a longer-term ticket to have the pipeline extract at correct nodded locations even when use_source_position=False

  • Set use_source_position=True for spec3 extraction, and set use_source_position=False for spec2 extraction

In order to achieve that I think the necessary thing to do would be to update the pars-spec2pipeline parameter reference file (looks like jwst_miri_pars-spec2pipeline_0006.asdf for LRS slit) to add

use_source_posn: true

under the extract_1d options.  That should make spec2 use the RA/DEC source position while not messing with current spec3 behaviour.

Comment by Greg Sloan on JIRA:

To address the short-term solution, we have created JIRA ticket CRDS-814 to set use_source_posn = true for LRS slit data at the Level 2 stage, where we have a problem.

Comment by Howard Bushouse on JIRA:

Greg Sloan Keep in mind that setting use_source_posn=True will mean that the centering of the extraction aperture will be limited by the uncertainties in both the guide star coords and the telescope pointing. So the apertures could still miss the actual spectrum trace in some cases.

I thought that the routine had been updated some time ago (by Tyler Pauly ) to use predicted locations of the traces based on nod positions, and that those resulted in relatively accurate positioning?

Comment by Ian Wong on JIRA:

The use of source_xpos and source_ypos to center the extraction box is currently only done for NRS_FIXEDSLIT, NRS_MSASPEC, and NRS_BRIGHTOBJ. For MIRI_LRS-FIXEDSLIT, it's using the dithered ra/dec whenever use_source_posn=True, then transforming into (x,y) using the slit model WCS. !Screenshot 2024-06-05 at 2.24.33 PM.png!