findSpectralAxis

Return to directory of Todd's tools
Return to directory of Todd's CASA extensions

Finds the spectral axis number of a CASA cube (0-based). Returns -1 if not found. There are two implementations, the one in toddTools that works on an image and the one in analysisUtils that works on an ia tool instance. The latter is faster if you already have the ia tool open for some other reason.

Usage1: Works on an image

tt.findSpectralAxis(img)

Example1:

CASA <11>: tt.findSpectralAxis('calibrated_NGC_1068.ms_spw2_imagesub.tclean.mask')
  Out[10]: 3

Usage2: Works on an ia tool instance

au.findSpectralAxis(myia)

Example2:

CASA <9>: ia.open('calibrated_NGC_1068.ms_spw2_imagesub.tclean.mask')
  Out[9]: True
CASA <10>: au.findSpectralAxis(ia)
  Out[10]: 3

-- ToddHunter - 2015-05-12
Topic revision: r2 - 2016-01-27, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback