spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
549 stars 159 forks source link

Stage2 flow for EXP_TYPE=NRS_LAMP runs only after change to NRS_MSASPEC #8259

Open stscijgbot-jp opened 5 months ago

stscijgbot-jp commented 5 months ago

Issue JP-3531 was created on JIRA by Nikolay Nikolov:

When running the pipeline Spec2 on MOS internal lamp exposures (S-Flats), steps:

stpipe.SourceTypeStep stpipe.BarShadowStep

are initiated and ran, but do not take any effect on the data. The source type is unrecognized and stays 'UNKNOWN', which prevents the Barshadow step to be applied. The later takes effect, only when the source type is 'EXTENDED'.

One solution is to change EXP_TYPE to NRS_MSASPEC in the header of the input file to Spec2 and include use_source_posn = False in the call of extract_1d. While this is a quick workaround, we should update the pipeline flow to handle NRS_LAMP data.

stscijgbot-jp commented 5 months ago

Comment by Howard Bushouse on JIRA:

What kind of update should be made, i.e. what source type should be used for NRS_LAMP data? Should it default to "EXTENDED"?

stscijgbot-jp commented 4 months ago

Comment by David Law on JIRA:

Melanie Clarke Can you comment on this?  What is the pipeline meant to do with NRS_LAMP exposures?  For MIRI at least we typically want these to stop automated processing at the rate.fits stage as their purpose is to help derive the calibration files for stage 2 processing.

stscijgbot-jp commented 4 months ago

Comment by Nikolay Nikolov on JIRA:

NRS_LAMP should be set to EXTENDED

The pipeline should be able to run with the metadata for the following steps: assign_wcs, msa_flagging, extract_2d, srctype, flat_field (only D-flat), barshadow, pixel_replace, resample_spec, extract_1d

The extracted 1d spectra are used to look for uniformity of the MOS S-Flat field and the bar shadow corrected and resampled 2D spectra undergo an additional analysis for preparing the MOS S-Flat calibration reference file.