from parameter_check import *
from casa_stack_manip import stack_frame_find
def pointcal(vis=None,model=None,caltable=None,
selectdata=None,timerange=None,uvrange=None,antenna=None,scan=None,msselect=None,
"""Solve for pointing error calibration:
This program is under development. Please do not use.
vis -- Name of input visibility file (MS)
default: <unset>; example: vis='ngc5921.ms'
model -- Name of input model (component list or image)
default: <unset>; example: model='ngc5921.im'
caltable -- Name of output Pointing calibration table
default: <unset>; example: caltable='ngc5921.gcal'
--- Data Selection (see help par.selectdata for more detailed information)
field -- Select field using field id(s) or field name(s).
[run listobs to obtain the list id's or names]
If field string is a non-negative integer, it is assumed a field index
otherwise, it is assumed a field name
field='0~2'; field ids 0,1,2
field='0,4,5~7'; field ids 0,4,5,6,7
field='3C286,3C295'; field named 3C286 adn 3C295
field = '3,4C*'; field id 3, all names starting with 4C
spw -- Select spectral window/channels
default: ''=all spectral windows and channels
spw='0~2,4'; spectral windows 0,1,2,4 (all channels)
spw='<2'; spectral windows less than 2 (i.e. 0,1)
spw='0:5~61'; spw 0, channels 5 to 61
spw='0,10,3:3~45'; spw 0,10 all channels, spw 3, channels 3 to 45.
spw='0~2:2~6'; spw 0,1,2 with channels 2 through 6 in each.
spw='0:0~10;15~60'; spectral window 0 with channels 0-10,15-60
spw='0:0~10,1:20~30,2:1;2;3'; spw 0, channels 0-10,
spw 1, channels 20-30, and spw 2, channels, 1,2 and 3
selectdata -- Other data selection parameters
timerange -- Select data based on time range:
default = '' (all); examples,
timerange = 'YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss'
Note: if YYYY/MM/DD is missing dat defaults to first day in data set
timerange='09:14:0~09:54:0' picks 40 min on first day
timerange= '25:00:00~27:30:00' picks 1 hr to 3 hr 30min on next day
timerange='09:44:00' data within one integration of time
timerange='>10:24:00' data after this time
uvrange -- Select data within uvrange (default units kilo-lambda)
default: '' (all); example:
uvrange='0~1000'; uvrange from 0-1000 kilo-lamgda
uvrange='>4';uvranges greater than 4 kilo lambda
antenna -- Select data based on antenna/baseline
If antenna string is a non-negative integer, it is assumed an antenna index