-
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
Improve extraction from unrectified NIRSpec data #8938
Comments
Comment by Christian Hayes on JIRA: Assigning to myself for now while the NIRSpec Team is investigating potential options. |
Comment by Melanie Clarke on JIRA: Quick question - what do you mean by "extract wavelengths in addition to fluxes"? |
Comment by Christian Hayes on JIRA: extract1d.extract1d currently does not extract wavelengths according to the input source extraction regions. If I'm not mistaken I believe the wavelengths are "extracted" in extract_1d.extract.extract here: https://github.com/spacetelescope/jwst/blob/a32f8b01e8000603d6cc916511a87c0e0b77e47e/jwst/extract_1d/extract.py#L1861C1-L1880C70]. This uses the ystart/ystop and xstart/xstop to extract the wavelengths and won't use curved traces to extract the wavelengths if they are supplied through "src_coeff". This isn't particularly a problem for extracting from resampled data currently because each column (for NIRSpec data) will have the same wavelength, and fluxes are box-car extracted by column anyway. If we want to extract from unrectified cal spectra, there is a non-negligible slit tilt, such that the wavelengths from the default rectangular extraction box won't match those in a curved trace. So, we would need to extract wavelengths from the same aperture as the fluxes in order to extract the correct wavelengths. If it helps I can put together an example to illustrate. |
Comment by Melanie Clarke on JIRA: Got it, thanks. That sounds like a bug or oversight in the current implementation – I'll keep it in mind while we're working on JP-3753. |
Issue JP-3794 was created on JIRA by Christian Hayes:
Extract1d currently uses a rectangular extraction box by default, which works well for resampled data, but is not always well-suited for unrectified data. BOTS data for example is not resampled, so 1D extraction of the curved M and H grating traces can miss parts of the source spectra.
We would like to add an option for extracting spectra from unrectified NIRSpec data. Ideally this would include setting an automatic trace for extraction (e.g., using WCS or trace fitting) and update extract1d to extract wavelengths in addition to fluxes.
The text was updated successfully, but these errors were encountered: