StdDevUncertainty#
- class astropy.nddata.StdDevUncertainty(array=None, copy=True, unit=None)[source]#
Bases:
_VariancePropagationMixin
,NDUncertainty
Standard deviation uncertainty assuming first order gaussian error propagation.
This class implements uncertainty propagation for
addition
,subtraction
,multiplication
anddivision
with other instances ofStdDevUncertainty
. The class can handle if the uncertainty has a unit that differs from (but is convertible to) the parentsNDData
unit. 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
StdDevUncertainty
should 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
NDData
instance:>>> ndd.uncertainty = StdDevUncertainty([0.2], unit='m', copy=True) >>> ndd.uncertainty StdDevUncertainty([0.2])
the uncertainty
array
can also be set directly:>>> ndd.uncertainty.array = 2 >>> ndd.uncertainty StdDevUncertainty(2)
Note
The unit will not be displayed.
Attributes Summary
True
:StdDevUncertainty
allows to propagate correlated uncertainties."std"
:StdDevUncertainty
implements standard deviation.Attributes Documentation
True
:StdDevUncertainty
allows to propagate correlated uncertainties.correlation
must be given, this class does not implement computing it by itself.
- uncertainty_type#
"std"
:StdDevUncertainty
implements standard deviation.