ism3d.xyhelper.maskmoment.momfuncs.calc_moments¶
-
ism3d.xyhelper.maskmoment.momfuncs.
calc_moments
(imcube, rmscube, mask=None)[source]¶ Calculate moments of a masked cube and their errors
- Parameters
imcube (SpectralCube) – The image cube for which to calculate the moments and their errors.
rmscube (SpectralCube) – A cube representing the noise estimate at each location in the image cube. Should have the same units as the image cube.
mask (~numpy.ndarray) – A binary mask array (0s and 1s) to be applied before measuring the flux and uncertainty. This should NOT be a SpectralCube.
- Returns
altmom (~numpy.ndarray) – A stack of the three moment maps. These are generally redundant since they were previously calculated by SpectralCube.
errmom (~numpy.ndarray) – A stack of the three uncertainty maps.