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

2.1.1 Bootstrap the flux density scale from standard calibrators


Description

This function is used to bootstrap the amplitude scale the calibration solutions according to specified reference calibrator(s) of known flux density. This is necessary when the flux densities of some of your calibrators were unknown (and thus were assumed to be 1 Jy) during G solving.

The bootstrapping is achieved by comparing the median gain norm of the calibration solutions derived for the calibrators specified in reference (one or more sources with known flux densities at the time of G solving) with that of the calibrators specified in transfer, and enforcing the assumption that the antenna gains are constant, on average. The gain solutions for the transfer sources are then re-scaled accordingly. The reference and transfer parameters may be specified using the general field selection syntax (as in field in selectvis).

If no transfer fields are specified, then the solutions for all non-reference fields in tablein will be re-scaled.

If no tableout is specified the input table will be overwritten with the scaled solutions. Note that the resulting table will only contain solutions for those fields implicit in the reference and transfer specifications. Use append=T to append the scaled solutions to an existing table.

Use the refspwmap parameter to indicate how data for different spectral windows should be matched in calculating the flux density scale factor for transfer fields. The default behavior for refspwmap is to insist on precisely matching spectral windows for reference and transfer fields. When specified, the refspwmap parameter takes a vector of integers indicating which spectral window solutions to use as the reference for others, such that refspwmap[j]=i causes solutions (from reference fields) observed in the i-th spectral window to be used to reference solutions (from transfer fields) observed in the j-th spectral window. For example, for the case of a total of 4 spectral windows: if the reference fields were observed only in spw=2 & 4, and the transfer fields were observed variously in all 4 spws, specify refspwmap=[2,2,4,4]. This will ensure that transfer fields observed in spws 1,2,3,4 will be referenced to reference field data from spws 2,2,4,4, respectively. Note that if the transfer fields were observed only in spws 1 & 3, the same specification would work, but refspwmap=[2,2,4] would suffice. In this case, nothing need be specified for the 4th spw (there are no transfer fields there), and specifying 2 for the 2nd spw is actually inconsequential (though required so that the specification of 4 for spw 3 is properly interpretted).

The gain values used in the flux scaling determination skewed by outliers. The parameters, gainthreshold and antenna can be used to limit the input gain solutions to be included in the flux scale determination. Use the gainthreshold is a threshold in % from the median values of the gain solutions to be used. Use the antenna to select or de-selesect (using the MSSelection syntax) antenna(s). Futher refinements on the selection based on timerange and scan are possible.

The derived flux densities for the transfer fields will be reported in the logger, and returned to the Python dictionary specified in fluxd. This will be an 2D array of shape [number-of-spectral-windows X number-of-fields]. When mulitple spectral windows are involved the spectral index will also be reported by fitting the determined flux densities across the freuquencies. The order of a polynomcial to be fitted can be specified with fitorder.

Note that elevation-dependent gain effects may render the basic assumption used here invalid, and so should be corrected for prior to solving for G, using types ’TOPAC’ or ’GAINCURVE’ in setapply.

Note that the visibility data itself is not used directly by this function.

Pending improvements:

Arguments





Inputs

tablein

Input calibration table name

allowed:

string

Default:

reference

Reference calibrator field names (comma-separated)

allowed:

any

Default:

variant

tableout

Output calibration table name. Default is input calibration table name.

allowed:

string

Default:

transfer

Transfer source field names (comma-separated). Default is all other fields.

allowed:

any

Default:

variant

listfile

Name of listfile that contains the fit information. Default is ” (no file).

allowed:

string

Default:

append

Append to existing table?

allowed:

bool

Default:

false

refspwmap

List of alternate spw for referencing

allowed:

intArray

Default:

-1

gainthreshold

Threshold of gain amplitudes with respect to the median value to be used in flux scale calculation. Default: -1.0 (no threshold)

allowed:

float

Default:

-1.0

antenna

antenna selection/de-selection in flux scale calculation. Default: ””(include all antennas)

allowed:

string

Default:

timerange

timerage sub-selection with antenna selection in flux scale calculation. Default: ””(include all)

allowed:

string

Default:

scan

scan sub-selection with antenna selection in flux scale calculation. Default: ””(include all)

allowed:

string

Default:

incremental

create a incremental caltable

allowed:

bool

Default:

false

fitorder

order for spectral fitting for multiple spws

allowed:

int

Default:

1

display

display statistics of the flux ratios

allowed:

bool

Default:

false

Returns
record

Example

 
 
cb.open(’ngc5921.ms’)  
cb.selectvis(field=’1331*,1445*’)  
cb.setsolve(type=’G’,table=’gcal’,t=’inf’)  
cb.solve()  
cb.fluxscale (tablein=’gcal’, tableout=’flxcal’,  
              reference=’1331*’, transfer=’1445*’);  
cb.close();  
 
 
This example generates a calibration table containing {\tt G}  
solutuions (’gcal’) and then writes a re-scaled version, using  
1335+305 as the reference calibrator, to derive properly scaled  
amplitude calibration for the transfer source, 1445+099.  We have  
assumed that 1331+305 has already had its MODEL\_DATA set to  
the correct flux density.  
 

__________________________________________________________________


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