nraonrao
 
NRAO Home > CASA > CasaRef
calibrater.fluxscale - Function

2.2.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 mean 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 derived flux densities for the transfer fields will be reported in the logger, and returned to the glish variable specified in fluxd. This will be an 2D array of shape [number-of-spectral-windows X number-of-fields].

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





Outputs

fluxd

Array of output flux densities

allowed:

doubleArray

Default:

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

append

Append to existing table?

allowed:

bool

Default:

false

refspwmap

List of alternate spw for referencing

allowed:

intArray

Default:

-1

Returns
bool

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 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.

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 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

Updated daily during alpha development.