StdDevUncertainty

class astropy.nddata.StdDevUncertainty(array=None, copy=True, unit=None)[source] [edit on github]

Bases: astropy.nddata.NDUncertainty

Standard deviation uncertainty assuming first order gaussian error propagation.

This class implements uncertainty propagation for addition, subtraction, multiplication and division with other instances of StdDevUncertainty. The class can handle if the uncertainty has a unit that differs from (but is convertible to) the parents NDData 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 :

Examples

StdDevUncertainty should always be associated with an NDData-like instance, either by creating it during initialization:

>>> from astropy.nddata import NDData, StdDevUncertainty
>>> ndd = NDData([1,2,3],
...              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

supports_correlated True : StdDevUncertainty allows to propagate correlated uncertainties.
uncertainty_type "std" : StdDevUncertainty implements standard deviation.

Methods Summary

propagate_add(*args, **kwargs)

Deprecated since version 1.2.

propagate_divide(*args, **kwargs)

Deprecated since version 1.2.

propagate_multiply(*args, **kwargs)

Deprecated since version 1.2.

propagate_subtract(*args, **kwargs)

Deprecated since version 1.2.

Attributes Documentation

supports_correlated

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.

Methods Documentation

propagate_add(*args, **kwargs)[source] [edit on github]

Deprecated since version 1.2: The propagate_add function is deprecated and may be removed in a future version. Use propagate() instead.

propagate_divide(*args, **kwargs)[source] [edit on github]

Deprecated since version 1.2: The propagate_divide function is deprecated and may be removed in a future version. Use propagate() instead.

propagate_multiply(*args, **kwargs)[source] [edit on github]

Deprecated since version 1.2: The propagate_multiply function is deprecated and may be removed in a future version. Use propagate() instead.

propagate_subtract(*args, **kwargs)[source] [edit on github]

Deprecated since version 1.2: The propagate_subtract function is deprecated and may be removed in a future version. Use propagate() instead.