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:
- spectrum
Spectrum1D
The spectrum to which we want to set the uncertainty.
- spectral_region
SpectralRegion
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.
- spectrum
- Returns:
- spectrum_uncertainty
Spectrum1D
The
spectrum
, but with a constant uncertainty set by the result of the noise region calculation
- spectrum_uncertainty