noise_region_uncertainty

specutils.manipulation.noise_region_uncertainty(spectrum, spectral_region, noise_func=<function std>)[source]

Generates a new spectrum with an uncertainty from the noise in a particular region of the spectrum.

Parameters:
spectrumSpectrum1D

The spectrum to which we want to set the uncertainty.

spectral_regionSpectralRegion

The region to use to calculate the standard deviation.

noise_funccallable

A function which takes the (1D) flux in the spectral_region and yields a single value for the noise to use in the result spectrum.

Returns:
spectrum_uncertaintySpectrum1D

The spectrum, but with a constant uncertainty set by the result of the noise region calculation