NDUncertainty¶
-
class
astropy.nddata.
NDUncertainty
[source] [edit on github]¶ 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 aparent_nddata
attribute is present which links to the parent_nddata dataset, and take anNDData
instance as the positional argument, not anNDUncertainty
instance, because theNDData
instance can be used to access both the data and the uncertainties (some propagations require the data values).Attributes Summary
parent_nddata
supports_correlated
uncertainty_type
Methods Summary
propagate_add
(other_nddata, result_data)Propagate uncertainties for addition. propagate_divide
(other_nddata, result_data)Propagate uncertainties for division. propagate_multiply
(other_nddata, result_data)Propagate uncertainties for multiplication. propagate_subtract
(other_nddata, result_data)Propagate uncertainties for subtraction. Attributes Documentation
-
parent_nddata
¶
-
uncertainty_type
¶
Methods Documentation
-
propagate_add
(other_nddata, result_data)[source] [edit on github]¶ Propagate uncertainties for addition.
Parameters: other_nddata : NDData instance
The data for the second other_nddata in a + b
result_data :
ndarray
instanceThe 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_divide
(other_nddata, result_data)[source] [edit on github]¶ Propagate uncertainties for division.
Parameters: other_nddata : NDData instance
The data for the second other_nddata in a + b
result_data :
ndarray
instanceThe data array that is the result of the addition
Returns: result_uncertainty : NDUncertainty instance
The resulting uncertainty
-
propagate_multiply
(other_nddata, result_data)[source] [edit on github]¶ Propagate uncertainties for multiplication.
Parameters: other_nddata : NDData instance
The data for the second other_nddata in a + b
result_data :
ndarray
instanceThe data array that is the result of the addition
Returns: result_uncertainty : NDUncertainty instance
The resulting uncertainty
-
propagate_subtract
(other_nddata, result_data)[source] [edit on github]¶ Propagate uncertainties for subtraction.
Parameters: other_nddata : NDData instance
The data for the second other_nddata in a + b
result_data :
ndarray
instanceThe 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
-