You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently if one runs the source catalog via: strun romancal.steps.SourceCatalogStep image.asdf
one ends up saving the same catalog twice, once from stpipe's behavior returning the catalog and once from https://github.com/spacetelescope/romancal/blob/main/romancal/source_catalog/source_catalog_step.py#L130
. It looks to me to be a little awkward to get the pipeline handling and step handling right there for a step that returns two objects.
If we did this, we would also want to get rid of the special "return_updated_model" logic in source_catalog and instead update the image metadata in the pipeline.
The text was updated successfully, but these errors were encountered:
Presently if one runs the source catalog via:
strun romancal.steps.SourceCatalogStep image.asdf
one ends up saving the same catalog twice, once from stpipe's behavior returning the catalog and once from
https://github.com/spacetelescope/romancal/blob/main/romancal/source_catalog/source_catalog_step.py#L130
. It looks to me to be a little awkward to get the pipeline handling and step handling right there for a step that returns two objects.
The right behavior is probably to have source catalog always return a tuple with both the catalog and the segmentation image, and to handle saving those by overriding step.save_model following Webb's example here (credit to Brett for pointing this function out).
https://github.com/spacetelescope/jwst/blob/ce9a135f3bc6bba21e95dd47a91fc4d9ba5a1991/jwst/ami/ami_analyze_step.py#L29-L33
See related code in stpipe here:
https://github.com/spacetelescope/stpipe/blob/01f1956f3b3c3750a26790d5217cf909cad4b95a/src/stpipe/step.py#L924
If we did this, we would also want to get rid of the special "return_updated_model" logic in source_catalog and instead update the image metadata in the pipeline.
The text was updated successfully, but these errors were encountered: