spectrum_from_model

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

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

Parameters:
modelModel

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

spectrumSpectrum1D

The Spectrum1D object to use as the model template.

Returns:
spectrumSpectrum1D

Output Spectrum1D 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.