SourceModelContainer
- class jwst.datamodels.source_container.SourceModelContainer(init=None, **kwargs)[source]
Bases:
ModelContainer
A container to make MultiExposureModel look like ModelContainer.
The
MultiExposureModel.exposures
list contains the data for each exposure from a common slit id. Though the information is the same, the structures are not trueSlitModel
instances. This container creates aSlitModel
wrapper around each exposure, such that pipeline code can treat each as aDataModel
.Initialize the container from a MultiExposureModel or another SourceModelContainer.
- Parameters:
- initMultiExposureModel, SourceModelContainer, or None, optional
The models to wrap, by default None
- **kwargsdict
Additional arguments to pass to the initializer of the parent class, e.g., to
MultiExpsoureModel.__init__()
.
Attributes Summary
Return an updated version of the MultiExposureModel that is being wrapped.
Methods Summary
copy
([memo])Make a deep copy of the container.
save
([path, dir_path, save_model_func])Save out the container as a MultiExposureModel.
Attributes Documentation
- multiexposure
Return an updated version of the MultiExposureModel that is being wrapped.
- Returns:
- jwst.datamodels.MultiExposureModel
The MultiExposureModel being wrapped, be updated with any new data in the container.
Methods Documentation
- copy(memo=None)[source]
Make a deep copy of the container.
- Parameters:
- memodict
Keeps track of elements that have already been copied to avoid infinite recursion.
- Returns:
- jwst.datamodels.SourceModelContainer
A deep copy of the container and all the models in it.
- save(path=None, dir_path=None, save_model_func=None, *args, **kwargs)[source]
Save out the container as a MultiExposureModel.
- Parameters:
- pathstr
The path to the output file.
- dir_pathstr
The path to the output directory.
- save_model_funccallable
A function to save the model.
- *args, **kwargstuple, dict
Additional arguments to pass to the save function