NDUncertainty

class astropy.nddata.nduncertainty.NDUncertainty [edit on github][source]

Bases: object

This is the base class for uncertainty classes used with NDData. It is implemented as an abstract class and should never be directly instantiated.

Classes inheriting from NDData should overload the propagate_* methods, keeping the call signature the same. The propagate methods can assume that a parent_nddata attribute is present which links to the parent_nddata dataset, and take an NDData instance as the positional argument, not an NDUncertainty instance, because the NDData instance can be used to access both the data and the uncertainties (some propagations require the data values).

Attributes Summary

supports_correlated bool(x) -> bool
parent_nddata

Methods Summary

propagate_subtract(other_nddata, result_data) Propagate uncertainties for subtraction.
propagate_add(other_nddata, result_data) Propagate uncertainties for addition.
propagate_multiply(other_nddata, result_data) Propagate uncertainties for multiplication.
propagate_divide(other_nddata, result_data) Propagate uncertainties for division.

Attributes Documentation

supports_correlated = False
parent_nddata[source]

Methods Documentation

propagate_subtract(other_nddata, result_data) [edit on github][source]

Propagate uncertainties for subtraction.

Parameters :

other_nddata : NDData instance

The data for the second other_nddata in a + b

result_data : ndarray instance

The data array that is the result of the addition

Returns :

result_uncertainty : NDUncertainty instance

The resulting uncertainty

Raises :

IncompatibleUncertaintiesException :

Raised if the method does not know how to add the uncertainties

propagate_add(other_nddata, result_data) [edit on github][source]

Propagate uncertainties for addition.

Parameters :

other_nddata : NDData instance

The data for the second other_nddata in a + b

result_data : ndarray instance

The data array that is the result of the addition

Returns :

result_uncertainty : NDUncertainty instance

The resulting uncertainty

Raises :

IncompatibleUncertaintiesException :

Raised if the method does not know how to add the uncertainties

propagate_multiply(other_nddata, result_data) [edit on github][source]

Propagate uncertainties for multiplication.

Parameters :

other_nddata : NDData instance

The data for the second other_nddata in a + b

result_data : ndarray instance

The data array that is the result of the addition

Returns :

result_uncertainty : NDUncertainty instance

The resulting uncertainty

propagate_divide(other_nddata, result_data) [edit on github][source]

Propagate uncertainties for division.

Parameters :

other_nddata : NDData instance

The data for the second other_nddata in a + b

result_data : ndarray instance

The data array that is the result of the addition

Returns :

result_uncertainty : NDUncertainty instance

The resulting uncertainty

Page Contents