

NRAO Home > CASA > CASA Toolkit Reference Manual 

Inputs
As mentioned above, the selection syntax originally designed for measurement sets has been implemented in the ca tool. It is available for feed, antenna 1 and 2, and spectral window with channel. For more information, consult the selection documentation. Their argument lists are:
ca.get( field=”, antenna=”, timerange=[], spw=”, feed=”, axis=’TIME’, ap=’AMPLITUDE’, norm=True, unwrap=True, jumpmax=0.0 )
ca.fit( field=”, antenna=”, timerange=[], spw=”, feed=”, axis=’TIME’, ap=’AMPLITUDE’, norm=True, unwrap=True, jumpmax=0.0, order=’AVERAGE’, type=’LSQ’, weight=False )
’*’ is equivalent to ”. Both numbers and names can be used for field, antenna, and spw. Names have not been implemented in present EVLA and ALMA datasets for some quantities. Check if they are available using the introspective methods.
The leastsquares fit is quite standard. The robust fit, which minimizes the effects of
outliers, is experimental. Robust fits are simple to compute, but they don’t provide
parameter variances and covariances. To minimize outliers and obtain (co)variances,
the following algorithm is used:
 Calculate the leastsquares fit.
 Using the fit parameters from the least squares fit as starting values, perform the
robust fit (which is essentially a zerofinding algorithm).
 Flag all outliers with residuals greater than 5 times the mean deviation. These flags
are actually returned, so they can be applied elsewhere.
 Recalculate the leastsquares fit without the outliers.
Arguments for get() and fit():
field = A commadelimited string or a python list of strings containing the fields. E.g., field = ’0,1’. The default is ” (all fields).
antenna = A comma and semicolon delimited string containing the antenna 1s and antenna 2s. E.g, antenna = ’3,4,5’. The default is ” (all antenna 1s and antenna 2s).
timerange = A python list of floats of length two containing the start and stop times in MJD seconds. Date strings will be implemented in a future release when they are implemented in the selection C++ code. E.g., timerange = [456123.0,456456.0]. The default is [min MJD, max MJD]. For convenience, the MJD times can be obtained from the time() instrospective method.
spw = A comma and semicolumn delimited string containing the spectral window and channel selection. E.g., spw = ’0:4~20;25~59,2:10~30,6’. The default is ” (all spectral windows and channels).
feed = A commadelimited string or python list of strings containing the feed names (’X’, ’Y’, ’R’, ’L’, or ’S’ [scalar]). E.g., feed=’X,Y’. The default is ” (all feeds).
axis = A python string containing the userdefined iteration axis (’TIME’ or ’FREQ’). E.g., axis=’FREQ’. The default is ’TIME’ (the frequency axis is a noniteration axis).
ap = A python string containing the amplitude/phase selection (’AMPLITUDE’ or ’PHASE’). E.g., ap = ’PHASE’. The default is ’AMPLITUDE’. It is ignored if the parameters in the calibration table are real.
norm = A python boolean which determines whether amplitudes are normalized for each iteration. E.g., norm = False. The default is True. It is ignored if the parameters in the calibration table are real or ap = ’PHASE’.
unwrap = A python boolean which determines whether phases are unwrapped for each iteration. E.g., unwrap = False. The default is True. It is ignored if the parameters in the calibration table are real or ap = ’AMPLITUDE’.
jumpmax = A python float which determines the maximum phase jump near +/ PI
before unwrapping is performed. E.g., jumpmax = 0.1. The default is 0.0. It is
ignored if the parameters in the calibration table are real or ap = ’AMPLITUDE’. If
the noniteration axis is frequency:
 if jumpmax == 0.0, use fringe fitting (only available when the noniteration axis is
time).
 if jumpmax != 0.0, use simple unwrapping (same algorithm as used when the
noniteration axis is time or frequency).
Arguments for fit() only:
order = A python string containing the fit order (’AVERAGE’, ’LINEAR’, or ’QUADRATIC’). E.g., order = ’LINEAR’. The default is ’AVERAGE’. ’QUADRATIC’ is not available when the fit type is ’ROBUST’.
type = A python string containing the fit type (’LSQ’ or ’ROBUST’). E.g., type =
’ROBUST’. The default is ’LSQ’. The robust fit, which minimizes the effects of
outliers, is experimental. Robust fits are simple to compute, but they don’t provide
parameter variances and covariances. To minimize outliers and obtain (co)variances,
the following algorithm is used:
 Calculate the leastsquares fit.
 Using the fit parameters from the least squares fit as starting values, perform the
robust fit (which is essentially a zerofinding algorithm).
 Flag all outliers with residuals greater than 5 times the mean deviation. These flags
are actually returned, so they can be applied elsewhere.
 Recalculate the leastsquares fit without the outliers.
weight = A python boolean which determines whether weights are applied. E.g., weight = True. The default is False.
More information about CASA may be found at the
CASA web page
Copyright © 2016 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home  Contact Us  Directories  Site Map  Help  Privacy Policy  Search