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:
init (MultiExposureModel, SourceModelContainer, or None, optional) – The models to wrap, by default None
**kwargs (dict) – 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:
The MultiExposureModel being wrapped, be updated with any new data in the container.
- Return type:
MultiExposureModel
Methods Documentation
- copy(memo=None)[source]
Make a deep copy of the container.
- Parameters:
memo (dict) – Keeps track of elements that have already been copied to avoid infinite recursion.
- Returns:
A deep copy of the container and all the models in it.
- Return type: