copy_spec_metadata

jwst.datamodels.utils.flat_multispec.copy_spec_metadata(input_model, output_model)[source]

Copy spectral metadata from the input to the output spectrum.

Values to be copied are any attributes of the input model, other than “meta” or “spec_table”, e.g. “source_id”, “name”, etc.

Parameters:
input_modelJwstDataModel or ObjectNode

A spectral model, such as SpecModel or TSOSpecModel. If read in from a list of spectra, as in MultiSpecModel, the input model may be an ObjectNode rather than a full JwstDataModel.

output_modelJwstDataModel

A spectral model, such as SpecModel or TSOSpecModel. Updated in place with metadata from the input model. The output model must be a full JwstDataModel, not an ObjectNode.