Usage of getfwhm

Return to directory of Todd's CASA extensions

Directly estimate the actual FWHM of the CASA image provided, with no assumption about shape except that the function has a well defined peak and is approximately azimuthally symmetric. It takes the average of two median values: the median radius of the first 5 points above half-power, and the first 5 points below half-power. Algorithm riginally written by Brian Mason. For an alternative algorithm, see also getfwhm2. To operate on arrays of data, see findFWHM.

Usage:

au.getfwhm(imgfile, pkXmin='min', pkXmax='max', pkYmin='min', pkYmax='max', 
       pixelSize=None, axis3channel=0, axis4channel=0, plotfile=None, ignoreIdenticalZeros=True, 
       plotrange=[0,0,0,0], gaussian=None, showlog=False, plotrange2=[0,0,0,0])
  • INPUT:
    • imgfile - a CASA image
  • OPTIONAL INPUT
    • pk{X,Y}{min,max} - pixel coordinate range (integers) within which to search for peak and FWHM. so long as this region contains the peak and the half max point you should get reasonable results. (default is to consider all pixels)
    • pixelSize - if None, use value from image header (supports deg or rad units)
    • axis3channel - which channel of the cube to use (if naxis>2)
    • axis4channel - which channel of the cube to use (if naxis>3)
    • plotfile - if True, or a string, then write a png file
    • ignoreIdenticalZeros -- if True, then filter out pixels with exactly 0 intensity
    • plotrange: [xmin,xmax,ymin,ymax]
    • gaussian: the FWHM of a Gaussian profile to overlay in magenta
    • showlog: if True, show the log of the intensity in a second panel
    • plotrange2: same as plotrange but for the second panel
  • RETURN:
    • full width half max in arcseconds (or in units of pixels if pixelSize is set to 1.0)

Example:

CASA <3>: au.getfwhm('uid___A002_X65c1ab_Xd8d_APC-DV18-V-USB-beam_square',plotfile='getfwhm.png',plotrange=[0,60,0,1.05])
Got pixelSize = 2.484117 arcsec
 Max found at pixel  512.0   512.0
 peak =  110201360.0
Plot saved in getfwhm.png
  Out[53]: 17.913220347188155

-- ToddHunter - 2013-08-26
  • getfwhm.png:
    getfwhm.png
Topic revision: r7 - 2014-05-12, 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