Usage for sfBeam

Return to directory of Todd's CASA extensions

This function attempts to predict the effective restoring beam obtained from the casa command sdimaging when using the SF gridding kernel. It calls the prolate spheroidal wavefunction of scipy (scipy.special.pro_ang1_cv) and convolves the result with the telescope primary beam (as specified by taper, diameter, and obscuration) and a top-hat function of width equal to the sampling interval. The parameters passed to the scipy function are m=0, n=0, c=5.356*pi/2 (see this plot for an overlay). The value of c was tuned so that the result provided the best match to the CASA function grdsf.f (which originated from Fred Schwab in AIPS) which uses a fixed supported width of 6. Note that to accurately reflect the current knowledge of the ALMA 12m antenna beam from holography measurements, the default for taper=10 (which will yield 1.131 lambda / D). See also gjincBeam, pickPixelSize, and getTPSampling.

Usage:

au.sfBeam(frequency, pixelsize=10, diameter=12.0, 
                      xSamplesPerBeam=5.0, ySamplesPerBeam=None, 
                      xSamplingArcsec=None, ySamplingArcsec=None, 
                      convsupport=-1, makeplot=False, m=0, taper=10.0, 
                      geometricMean=False, obscuration=0.75, cmult=1.0,
                      coffset=0.0, xmult=1.0, alpha=1.0, testOption=False,
                      minlevels=[0,0], truncate=True, img=None, row=None, 
                      column=None, stokes='XX', plotfile='', verbose=False,
                      fwhmfactor=None, excludeBand3=True, excludeBand3Below=109.0)

Inputs:

  • frequency: floating point number in GHz (no units) or a string with units
  • pixelsize: floating point number in arcseconds (no units)
  • diameter: the diameter of the single dish antenna in meters (no units)
  • xSamplesPerBeam: the number of sampled points per telescope FWHM beam along the X axis
  • ySamplesPerBeam: the number of sampled points per telescope FWHM beam along the Y axis
  • xSamplingArcsec: if not None, then use this value instead of xSamplesPerBeam
  • ySamplingArcsec: if not None, then use this value instead of ySamplesPerBeam
  • makeplot: if True, then also generate a png
  • convsupport: radius in pixels, default=-1 --> 3 pixels, meaning a support width of 7 points
  • m: The value to pass as m and n to scipy.special.pro_ang1_cv (note that the m in VLA computing memo 156 denotes a different quantity, the support width)
  • taper: the illumination taper (in dB) to pass to au.primaryBeamArcsec
  • fwhmfactor: if specified, pass this to au.primaryBeamArcsec, overriding taper
  • obscuration: diameter in m to pass to au.primaryBeamArcsec
  • geometricMean: if True, then return only the geometric mean beamsize; otherwise, return minorAxis,majorAxis,geometricMean (if the sampling is provided in both axes)
  • cmult, coffset, xmult: these are coefficients to use in computing: supportwidth = (convsupport*cmult + coffset), and the radius in arcsec at which the SF goes to zero (supportwidth*pixelsize*xmult)
  • testOption: if set to True, this will attempt to emulate the method used in SDGrid.cc to establish the convFunc. The result is nearly identical (1:10000) to my original method.
  • alpha: the exponent of the weighting function, i.e. (1-nu*nu)**alpha, which is 1 in casa
  • minlevels: a list of fractional values (from 0..1) above which to perform 1D Gaussian fits on the estimated restoring beam
  • truncate: only used if taper=0, sets whether to truncate the Airy at the first null
  • img: if not none, then use a row or column from this image as the beam model
  • row: the row of img to use as the starting beam profile model
  • column: the column of img to use as the starting beam profile model
  • stokes: 'XX','YY' which Stokes to use in the img
  • excludeBand3: if True, then don't use Band 3 TICRA patterns below excludeBand3Below'
  • excludeBand3Below: frequency in GHz below which to not use Band 3 patterns

Returns:

  • If only the X-axis sampling is given:
    • the FWHM of the restoring beam
    • the FWHM of a Gaussian fit to the restoring beam
  • If both X and Y-axis sampling is given:
    • If geometricMean=True:
      • the FWHM of the predicted restoring beam
      • the FWHM of a Gaussian fit to the predicted restoring beam
    • If geometricMean=False:
      • the minor axis of the restoring beam
      • the major axis of the restoring beam
      • the geometric mean of the restoring beam computed using findFWHM()
      • the geometric mean of the FWHM of a Gaussian fit to the restoring beam

Examples:

CASA <3>: au.sfBeam(114.7,taper=10)
  Out[3]: (55.404693642322442, 55.386051861589472)

CASA <16>: au.sfBeam(336.5,pixelsize=3,taper=10,xSamplingArcsec=3.5,ySamplingArcsec=5.7,makeplot=T)
Plot left in sfBeam.png
  Out[16]: (18.577381915209678,
 18.833994064946779,
 18.705247946320004,
 18.700396982924687)

-- ToddHunter - 2013-07-02
  • sfBeam.png:
    sfBeam.png

  • comparison of grdsf (from casa/aips) and scipy with a value tuned to match grdsf:
    fred vs scipy.png
Topic attachments
I Attachment Action Size Date WhoSorted ascending Comment
fred_vs_scipy.pngpng fred_vs_scipy.png manage 52 K 2013-11-15 - 14:08 ToddHunter comparison of grdsf (from casa/aips) and scipy with a value tuned to match grdsf
sfBeam.pngpng sfBeam.png manage 81 K 2013-11-15 - 14:05 ToddHunter created in au v1.1481
Topic revision: r15 - 2014-03-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