Simutil.py: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Rindebet (talk | contribs)
Created page with '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…'
 
Rindebet (talk | contribs)
No edit summary
Line 6: Line 6:
Methods:
Methods:
* average_direction(directions) Returns the average of directions as a string, and relative offsets
* 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.

Revision as of 17:06, 15 December 2009

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.