cwitools.synthesis.obj_moments

cwitools.synthesis.obj_moments(fits_in, obj_cube, obj_id, var_cube=None, unit='kms')

Creates 2D maps of 1st and 2nd z-moments for 3D objects.

Input can be ~astropy.io.fits.HDUList, ~astropy.io.fits.PrimaryHDU or ~astropy.io.fits.ImageHDU. If HDUList given, PrimaryHDU will be used.

Returned objects will be of same type as input.

Parameters:
  • fits_in (astropy HDU or HDUList) – Input HDU/HDUList with 3D data.
  • obj_cube (NumPy.ndarray) – Data cube containing labelled 3D regions.
  • obj_id (list or int) – ID or list of IDs of objects to include.
  • var_cube (NumPy.ndarray) – Data cube containing 3D variance estimate.
  • unit (str) – Desired output unit. ‘kms’ - kilometers per second ‘wav’ - wavelength units (same as input z-axis)
Returns:

First moment (velocity) map, with header HDU / HDUList*: Error on first moment map, with header HDU / HDUList*: Second moment (dispersion) map, with header HDU / HDUList*: Error on second moment map, with header *Return type matches fits_in.

Return type:

HDU / HDUList*