StdDevUncertainty¶
- class astropy.nddata.StdDevUncertainty(array=None, copy=True, unit=None)[source]¶
Bases:
_VariancePropagationMixin,NDUncertaintyStandard deviation uncertainty assuming first order gaussian error propagation.
This class implements uncertainty propagation for
addition,subtraction,multiplicationanddivisionwith other instances ofStdDevUncertainty. The class can handle if the uncertainty has a unit that differs from (but is convertible to) the parentsNDDataunit. The unit of the resulting uncertainty will have the same unit as the resulting data. Also support for correlation is possible but requires the correlation as input. It cannot handle correlation determination itself.- Parameters:
- args, kwargs
see
NDUncertainty
Examples
StdDevUncertaintyshould always be associated with anNDData-like instance, either by creating it during initialization:>>> from astropy.nddata import NDData, StdDevUncertainty >>> ndd = NDData([1,2,3], unit='m', ... uncertainty=StdDevUncertainty([0.1, 0.1, 0.1])) >>> ndd.uncertainty StdDevUncertainty([0.1, 0.1, 0.1])
or by setting it manually on the
NDDatainstance:>>> ndd.uncertainty = StdDevUncertainty([0.2], unit='m', copy=True) >>> ndd.uncertainty StdDevUncertainty([0.2])
the uncertainty
arraycan also be set directly:>>> ndd.uncertainty.array = 2 >>> ndd.uncertainty StdDevUncertainty(2)
Note
The unit will not be displayed.
Attributes Summary
True:StdDevUncertaintyallows to propagate correlated uncertainties."std":StdDevUncertaintyimplements standard deviation.Attributes Documentation
True:StdDevUncertaintyallows to propagate correlated uncertainties.correlationmust be given, this class does not implement computing it by itself.
- uncertainty_type¶
"std":StdDevUncertaintyimplements standard deviation.