get_moments#
- mufasa.signals.get_moments(cube, window_hwidth=5, linewidth_sigma=True, trim=3, return_rms=False, central_win_hwidth=None, **kwargs)[source]#
Calculate moments of the signals in a cube.
- Parameters:
cube (SpectralCube) – SpectralCube object.
window_hwidth (float, optional) – Half-width of spectral window for moment calculation.
linewidth_sigma (bool, optional) – Whether to calculate linewidth sigma instead of moment 2 (see spectral_cube documentation for further details).
trim (int, optional) – Number of pixels to trim from edges of the cube.
return_rms (bool, optional) – Whether to return RMS along with moments.
central_win_hwidth (float, optional) – If provided, re-evulate velocity at peak using a window centered on the mode of the initial velocity estimate, with a half-wdith of central_win_hwidth. Note that window is the same for all pixels, but only applied as an intermediate step. This should only used if hyperfine lines far from the main hyperfines have a comprable brightness.
**kwargs – Additional arguments.
- Returns:
Tuple of moment maps (moment 0, moment 1, linewidth or moment 2, optionally RMS).
- Return type:
tuple of Quantity