pickCellSize

Return to directory of Todd's CASA extensions

Computes the image cell size (in arcsec), and optionally the imsize (rounding up using cleanhelper.cleanhelper.getOptimumSize), for a measurement set using the 95%ile baseline length, and the specified desired number of pixels per synthesized beam. This is faster than the im.advise method. Uses the mean of all spws with science intent, unless an spw is specified.

Usage:

au.pickCellSize(vis='', spw='', npix=5, intent='OBSERVE_TARGET#ON_SOURCE', imsize=False, 
       maxBaselinePercentile=95, cellstring=False, roundcell=2, compare=False, pblevel=0.2, 
       config='', frequency=0, verbose=True)
Inputs:
  • vis: measurement set to use (if '', then use config instead)
  • spw: spw to use (default is mean of all spws with specified intent; if none, then mean of all spws)
  • npix: desired number of pixels per beam
  • intent: if spw is not specified, pick the first one observed with this intent
  • imsize: if True, then also compute the imsize to the specified power point of the primary beam
  • maxBaselinePercentile: 100 = longest baseline
  • cellstring: if True, return value as a string with units (e.g. '0.23arcsec'), otherwise return a float
  • roundcell: if > 0, then round the cellsize to this many significant figures
  • compare: if True, then also run im.advise for comparison
  • pblevel: in fraction 0..1 (only used to compute imsize)
  • config: use the specified configuration instead of a measurement set
  • frequency: used along with config if vis=''
Returns:
  • the cell size as floatiing point arcsec
  • if imsize=True, then also return the image size in pixels [x,y], and the central field ID

Example:

CASA <3>: au.pickCellSize('uid___A002_X97a627_X154.ms.split.cal')
mean frequency =  99875000000.0
Found 1035 baselines
Unprojected lengths:  min=15.050686, max=389.997438, rms=129.827628 meters
204.563 m corresponds to 68.1478 kilolambda and 3.02673 arcsec at 99 GHz
  Out[3]: 0.61

CASA <6>: au.pickCellSize('uid___A002_X99c183_X25b6.ms.split',imsize=True)
mean frequency =  225464261277.0
211.394 m corresponds to 158.979 kilolambda and 1.29744 arcsec at 225 GHz
No source specified, so using the intent OBSERVE_TARGET#ON_SOURCE.
Found 14 fields for source ID=4: BHR71_C18O: [ 5  6  7  8  9 10 11 12 13 14 15 16 17 18]
Mean frequency = 225.464261 GHz (band = 6)
Found 19 pointings in this ms
Field 10 is closest to the center of the area covered (5.0 arcsec away).
  Out[6]: [0.26, [320, 288], 10]

-- ToddHunter - 2015-06-01
Topic revision: r6 - 2016-04-11, 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