query_step_status

jwst.stpipe.query_step_status(datamodel, cal_step)[source]

Query the status of a step in meta.cal_step.

For container types (ModelContainer and ModelLibrary), only the first datamodel in the container is checked.

Parameters:
  • datamodel (JwstDataModel, ModelContainer,) – ModelLibrary The datamodel or container of datamodels to check

  • cal_step (str) – The attribute in meta.cal_step to check

Returns:

status – The status of the step in meta.cal_step, typically ‘COMPLETE’ or ‘SKIPPED’

Return type:

str

Notes

In principle, a step could set the COMPLETE status for only some subset of models, so checking the zeroth model instance may not always be correct. However, this is not currently done in the pipeline. This function should be updated to accommodate that use-case as needed.