Return to directory of Todd's CASA extensions

Extract the beam and pixel scale information from a FITS image (or CASA image) from the BMAJ, BMIN, BPA header values. If these are not found in the FITS image, it then searches for them in the HISTORY records. For a CASA image, if 'beammaj' is not found, then it computes the median of the perplanebeams (if present). See also numberOfChannelsInCube, getFitsDate and getIntensityForPixel.


au.getFitsBeam(image, returnBunit=False, addHalfChannelWidth=False,
                returnRestFreq=False, returnVelocityWidth=False)
Returns: bmaj, bmin, bpa, cdelt1, cdelt2, naxis1, naxis2, frequency (and optionally bunit)
  • cdelt1 and cdelt2 are in arcseconds
  • bpa in degrees
  • frequency in GHz (for the reference pixel of either craxis3 or craxis4 in the case of CASA images)
  • returnRestFreq: if True, then also return restfreq in Hz (if present); only works for CASA images
  • returnVelocityWidth: if True, then also return the channel width in km/s
  • returnRestFreq and returnVelocityWidth are mutually exclusive


CASA <2>: au.getFitsBeam('N6334-X.PBCOR.UV100')
0.5148'' x 0.204638'' at -0.79 deg
Pixel size = -0.050000 by 0.050000 (RA by DEC)
CRVAL3 = 8.4399e+09 Hz at CRPIX = 1
central freq = 8.46178e+09 Hz

-- ToddHunter - 2013-07-27
Topic revision: r10 - 2016-03-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