Skip to main content
`Ctrl`+`K`

# StdDevUncertainty

class astropy.nddata.StdDevUncertainty(array=None, copy=True, unit=None)

  Bases: `_VariancePropagationMixin`, `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

      see `NDUncertainty`

  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], 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

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

  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.