NDUncertainty¶
-
class
astropy.nddata.NDUncertainty[source] [edit on github]¶ Bases:
objectThis 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_nddataattribute is present which links to the parent_nddata dataset, and take anNDDatainstance as the positional argument, not anNDUncertaintyinstance, because theNDDatainstance can be used to access both the data and the uncertainties (some propagations require the data values).Attributes Summary
parent_nddatasupports_correlateduncertainty_typeMethods 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 :
ndarrayinstanceThe 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 :
ndarrayinstanceThe 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 :
ndarrayinstanceThe 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 :
ndarrayinstanceThe 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
-