spectrum_from_model

specutils.manipulation.spectrum_from_model(model_input, spectrum)[source]

This method will create a Spectrum object with the flux defined by calling the input model. All other parameters for the output Spectrum object will be the same as the input Spectrum object.

Parameters:
modelModel

The input model or compound model from which flux is calculated.

spectrumSpectrum

The Spectrum object to use as the model template.

Returns:
spectrumSpectrum

Output Spectrum which is copy of the one passed in with the updated flux. The uncertainty will not be copied as it is not necessarily the same.