Simutil.py

From CASA Guides
Revision as of 17:09, 15 December 2009 by Rindebet (talk | contribs)
Jump to navigationJump to search

The python utility is called simutil.py, and is located in a scripts directory of your installation.

CASA <> execfile(".../simutil.py")
CASA <> util=simutil()
CASA <> util<TAB>

Methods:

average_direction(directions)
Returns the average of directions as a string, and relative offsets
calc_pointings(spacing, imsize, cell, direction=None, relmargin=0.5)
If direction is a list, simply returns direction and the number of pointings in it. Otherwise, returns a hexagonally packed list of pointings separated by spacing and fitting inside an image specified by direction, imsize and cell, and the number of pointings. The hexagonal packing starts with a horizontal row centered on direction, and the other rows alternate being horizontally offset by a half spacing. All of the pointings will be within a rectangle relmargin * spacing smaller than the image on all sides.