NRAO Home > CASA > CASA Toolkit Reference Manual
calibrater.setsolve - Function

2.1.1 Arrange to solve for calibration


Description

This function specifies the calibration component that will be solved for by the solve function. Currently, only one type can be solved for at one time.

Each calibration component represents a separate calibration matrix correction included in the measurement equation. The different types correspond to different instrumental and atmospheric effects. Currently, the solvable calibration components are types ’G’,’T’,’B’, ’D’ and ’DF’, which are antenna-based, and, ’M’ and ’MF’, which are baseline-based. Arrange to pre-apply any existing calibration components (of types other than the solved-for one) using the setapply function.

The parameters are:

type
Specify the calibration type you want to solve for, from ’G’,’T’,’B’,’D’,’DF’,’M’,’MF’.
t
Specify the solution interval. This can be specified as an integer (units of seconds assumed) or as a string containing a value and units (e.g., ’30s’, ’45min’, ’2h’) or ’inf’ (infinite) or ’int’ (per data integration). A solution interval of 0 (with or without units) is the same as ’int’ (per integration), and negative solution intervals are treated as ’inf’ (infinite).
table
Specify the output calibration table name in which to store the calibration solve result. Existing tables will be deleted and replaced.
append
Append the solutions to an existing table.
preavg
Specify the amount of pre-average (in time) within the solution interval. By default, data are averaged up to the solution interval (or up to 5 minutes for ’D’ solving).
phaseonly
This parameter is deprecated, use apmode.
apmode
Control generation of amplitude-only (’a’), phase-only (’p’), or amplitude-and-phase (’ap’, the default) solutions.
refant
Specify an antenna (using data selection syntax) for referencing the solutions.
solnorm
Normalize the solutions by their mean post-solve. For ’B’, and ’MF’, this is a complex normalization per solution spectrum. For other types, this is a global (per-spw) normalization of the amplitudes only.
minsnr
Specify the SNR below which solution are rejected.
combine
Specify which data axes (spw, field, scan, or some combination) on which the data should be combined to generate a single solution. E.g., combine=’spw’ will force combination of many spws to form a single solution (per solution interval). Similarly, combine=’scan’ with a long solution interval will force the combination of scans to yield individual solutions (per field and spw). Ordinarily, solutions are always broken at scans boundaries. Separate multiple combine options with commas.
fillgaps
For ’B’ solutions, specify the largest solution channel gap (which arise due to flagged data) that will be filled post-solve via interpolation. Such solution gaps remain flagged by default.

Pending improvements:

Arguments





Inputs

type

Component type

allowed:

string

Default:

G

T

B

D

M

MF

t

Solution interval (units optional)

allowed:

any

Default:

variant

table

Output calibration table name

allowed:

string

Default:

append

Append to existing table?

allowed:

bool

Default:

false

preavg

Pre-averaging interval (in sec)

allowed:

double

Default:

-1.0

phaseonly

Solve only for phase?

allowed:

bool

Default:

false

apmode

Solve for ’AP’, ’A’ (amp-only) or ’P’ (phase-only)

allowed:

string

Default:

AP

refant

Reference antenna. Default is none.

allowed:

any

Default:

variant

minblperant

Minimum number of baselines per ant for solving

allowed:

int

Default:

4

solnorm

Normalize solution after solve

allowed:

bool

Default:

false

minsnr

SNR threshold for accepting solutions

allowed:

float

Default:

0.0

combine

Data axes on which to combine solving (scan, spw, and/or field)

allowed:

string

Default:

fillgaps

allowed:

int

Default:

0

cfcache

Name of the directory to be used for convolution function disk cache. This is used when type=EP.

allowed:

string

Default:

painc

Parallactic Angle increment used to trigger computation of a new convolution function. This is used when type=EP. Default value implies that only one convolution function will be computed for the entire range of observation.

allowed:

float

Default:

360.0

fitorder

Order of the polynomial fit, used when type=’A’.

allowed:

int

Default:

0

fraction

[SINGLE-DISH SPECIFIC] Edge detection parameter for otfraster/otf calibration. This is a number of edge points as a fraction of total number of points.

allowed:

float

Default:

0.1

numedge

[SINGLE-DISH SPECIFIC] Edge detection parameter for otfraster calibration. This is a number of edge points. The value specified here comes before fraction. Note that edge points will be detected from both side of each raster row so that number of edge points is effectively twice of the specified value in each raster row. Default (-1) is to use fraction.

allowed:

int

Default:

-1

radius

[SINGLE-DISH SPECIFIC] Specifies radius of the central region of double circle gain calibration for fast scanning data. The value must be either empty or quantum string (numeric value with unit). Default (””) is to use a radius of primary beam.

allowed:

string

Default:

smooth

[SINGLE-DISH SPECIFIC] Whether or not applying smoothing during double circle gain calibration for fast scanning data. Default is True.

allowed:

bool

Default:

true

Returns
bool

Example

 
 
cb.open(’ngc5921.ms’);  
cb.setapply (type=’P’);  
cb.setsolve (type=’G’,t=’300s’, refant=3, table=’gcal’);  
cb.solve();  
cb.close();  
 
 
In this example, analytic (non-solvable) parallactic angle corrections  
are pre-applied before G solutions are obtained on a timescale of 300  
seconds.  The resulting solutions are phase-referenced to antenna 3,  
and stored in a calibration table called ’gcal’.  
 
 
cb.reset();  
cb.setapply (type=’P’,t=5.0);  
cb.setapply (type=’G’,table=’gcal’);  
cb.setsolve (type=’D’,t=86400.0, preavg=60.0, refant=3, table=’dcal’);  
cb.solve();  
cb.close();  
 
 
In this example, the solve/apply state of the calibrater tool is reset  
and then the P and G corrections (from above) are applied before  
solving for D solutions on a diurnal timescale.  Note that the data  
will be averaged only to 60 seconds before the solution.  The resulting  
D solutions are stored in a table called ’dcal’.  
 

__________________________________________________________________


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