Skip to content

Code assumes non-required cal_step exists #2213

@braingram

Description

@braingram

Prior to spacetelescope/romanisim#337 romanisim generated valid L2 files that did not contain a meta.cal_step. These files cause issues for romancal which assumes all L2 files have meta.cal_step. One example is in the flux step:

if model.meta.cal_step["flux"] == "COMPLETE":

fails on L2 files that do not have a meta.cal_step.

This could be addressed by updating the pipeline to avoid accessing cal_step directly and instead using some to-be-determined API for accessing the cal_step attribute. There is unused and unfinished code in Step for recording the status:

def record_step_status(self, model, step_name, success=True):

jwst took a different approach implementing 2 utility functions:

which could be borrowed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions