SourceModelContainer
- class jwst.datamodels.source_container.SourceModelContainer(init=None, **kwargs)[source]
Bases:
ModelContainerA container to make
MultiExposureModellook likeModelContainer.The
MultiExposureModel.exposureslist contains the data for each exposure from a common slit id. Though the information is the same, the structures are not trueSlitModelinstances. This container creates aSlitModelwrapper around each exposure, such that pipeline code can treat each as aJwstDataModel.Initialize the container from a
MultiExposureModelor anotherSourceModelContainer.- Parameters:
- init
MultiExposureModel,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__().
- init
Attributes Summary
Return an updated version of the
MultiExposureModelthat 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
MultiExposureModelthat is being wrapped.- Returns:
MultiExposureModelThe
MultiExposureModelbeing 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:
SourceModelContainerA 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