spacetelescope / jwst

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

The ResampleSpecStep and Extract1DStep within MasterBackgroundMosStep are inaccessible #8429

Open stscijgbot-jp opened 5 months ago

stscijgbot-jp commented 5 months ago

Issue JP-3598 was created on JIRA by Kayli Glidic:

In calwebb_spec2, the MasterBackgroundMosStep is responsible for handling master background subtraction with MOS data. While users can readily modify parameters for calibration steps like barshadow, flat_field, pathloss, and photom within the MasterBackgroundMosStep, there are constraints when it comes to accessing and modifying the ResampleSpecStep and Extract1dStep, which appear to be hard-coded. These two should be accessible like the other calibration steps within the MasterBackgroundMosStep.

 

For instance, users may find it beneficial to adjust parameters such as weight_type or fillval in the ResampleSpecStep prior to the extraction of 1-D background spectra. Additionally, users may wish to modify the background extraction region by overriding the default reference file, a capability currently unavailable. Just as an example, if users observe background with a 3-shutter-slitlet, by default the pipeline will only extract a 6-pixel wide region from the central shutter. However, there may be valid background in those adjacent shutters which users may wish to also include in the extraction if they could modify the reference file.

 

We would like the ability to define parameters for the ResampleSpecStep and Extract1dStep in a manner similar to how we can for barshadow within the 'steps' section under 'master_background_mos', as in this example:

 

 

spec2_params = {
  'master_background_mos': {
    'skip': False,
    'save_background': True,
    'steps': {
      'barshadow': {'override_barshadow': file_path},
    }
  }
}
 
Spec2Pipeline.call(rate_file, save_results=True, output_dir=output_dir, steps=spec2_params)

 

stscijgbot-jp commented 4 months ago

Comment by David Law on JIRA:

Howard Bushouse Any thoughts on this?