moment

moment(ds, **kwargs)[source]

Collapse an n-dimensional image cube into a moment by taking a linear combination of individual planes

Note

This implementation still needs to implement additional moment codes, and verify behavior of implemented moment codes.

Parameters
  • ds (xarray.core.dataset.Dataset) – input Image

  • axis (str, optional) – specified axis along which to reduce for moment generation, Default=’frequency’

  • code (int, optional) –

    number that selects which moment to calculate from the following list

    -1 - mean value of the spectrum (default)

    0 - integrated value of the spectrum

    1 - intensity weighted coordinate; traditionally used to get ’velocity fields’

    2 - intensity weighted dispersion of the coordinate; traditionally used to get ’velocity dispersion’

    3 - median of I

    4 - median coordinate

    5 - standard deviation about the mean of the spectrum

    6 - root mean square of the spectrum

    7 - absolute mean deviation of the spectrum

    8 - maximum value of the spectrum

    9 - coordinate of the maximum value of the spectrum

    10 - minimum value of the spectrum

    11 - coordinate of the minimum value of the spectrum

  • **kwargs – Arbitrary keyword arguments

Returns

output Image

Return type

xarray.core.dataset.Dataset