Return to directory of Todd's CASA extensions

Returns the number of channels in a CASA or FITS image cube. The frequency axis must be the 3rd or 4th axis. See also findChannel.


au.numberOfChannelsInCube(img, returnFreqs=False, returnChannelWidth=False)
  • returnFreqs: if True, then return the frequency of the first and last channel, in Hz
  • returnChannelWidth: if True, then return the channel width, in Hz


CASA <2>: au.numberOfChannelsInCube('g14.63_KDnh3_11.hline.image.convl')
*** reffreqtype in get before
*** reffreqtype in get LSRK
  Out[2]: 175

CASA <15>: au.numberOfChannelsInCube('HLTau_CO1_0.tap200klR0.5_0.25kms_ms_flgbig.image',returnFreqs=True)
*** reffreqtype in get before 
*** reffreqtype in get LSRK
Channel  0 = 115273507020 Hz
Channel 135 = 115260530032 Hz
  Out[15]: (136, 115273507019.99998, 115260530032.43475)

-- ToddHunter - 2014-06-26

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > NumberOfChannelsInCube
Topic revision: 2016-01-05, 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