Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: bimacalibrater.setapply - Function Up: bimacalibrater - Tool Previous: bimacalibrater.fit - Function


bimacalibrater.transfer - Function



Package bima
Module bimacalibrater
Tool bimacalibrater


Transfer calibration solutions from one table to another.


Synopsis
transfer(outtable, intable, spwmap, calibratees, forcecopy)


Description

The transfer() function is the reason bimacalibrater exists. It transfers solutions from one calibration table with m spectral windows to another table with n spectral windows (in general, m != n).

Here's how the function determines how to map the windows in the input table to those in the output table. It first checks the (optional) user specified spwmap parameter. With this parameter, the user describes the window mapping. For example, assume the input table has two windows representing solutions for the lower and upper sidebands (windows 1 and 2). Assume the target source has the following spectral window configuration:

window    description
---------------------------------
  1       lower sidebnad average
  2       upper sideband average
 3-6      lower sideband channel data
 7-10     upper sideband channel data
In order to calibrate these data correctly, the user would specify spwmap=[1,2,1,1,1,1,2,2,2,2]. Note that for this example, transfer is smart enough to determine this mapping without having the spwmap parameter specified (see below). Furthermore, the user can opt not to have solutions for some or all windows copied by specifying a value of 0 in the correct window slot of spwmap. If spwmap is not specified, transfer uses the following algorithm. If there is only a single spectral window in the input table, its solutions are copied to all windows of the output. If there are two windows, transfer assumes they represent lower and upper sideband solutions. It tries to determine which sideband corresponds to which window by reading the SPW_INFO keyword written by the solve() function of bimacalibrater. If it cannot find this information (e.g. if the input calibration table was written by calibrater.solve()), it assumes the first window contains the lower sideband solutions and the second contains the upper sidenbad solutions. It then reads the SPECTRAL_WINDOW table of the dataset to be corrected to determine in which sidebands its windows lie. For three or more spectral windows in the input calibration table with spwmap unspecified, this function will fail since there is no normal way to transfer solutions in this case. It is up to the user in this case to specify how the solutions are to be mapped.

Although effort has been made to try to make the best guesses possible, the best way to make sure you are getting what you want is to specify spwmap.

If the default value of outtable is specified, the output table name will be called <intable>.xfer (e.g., gcal.xfer if the input table is named gcal.



Arguments

outtable   Name of the calibration table to which to write solutions
    Allowed: Any valid table name
    Default: ''
intable   Name of the calibration table from which to transfer solutions
    Allowed: Any valid table name
    Default: '' (will use the table written by solve)
spwmap   Array describing the spectral window mapping from the input to the output (see above). The spectral windows are 1-based, and a value of 0 means not to transfer solutions for the specified window (GAINS are filled in with 0's)
    Allowed: Vector of Ints > = 0
    Default: unset (transfer will do its best to guess how this should be done; see above)
calibratees   Nicknames or roles of sources to which the solutions will be applied (if more than one source is specified they all should have the same spectral window configuration)
    Allowed: Vector of strings
    Default: 'targets'
forcecopy   Force a copy of the input to output table when the input could be used to apply solutions
    Allowed: Boolean
    Default: T


Returns
T or fail


Example
- bc := bimacalibrater(['sgrb2.ms','sgra.ms'],
+ '1733-130.ms',targetnames=['sgrb','sgra'],phcalnames='1733'); 
- bc.setjy(fluxdensity=[5,0,0,0]);
T
- bc.setdata('1733',mode='channel');
T
- bc.setsolve('1733','G',60,refant=4,table='gcal');
T
- bc.solve()
T
- bc.transfer('gcal.xfer','gcal',[1,2,1,1,1,1,2,2,2,2],'sgrb');
T





next up previous contents index
Next: bimacalibrater.setapply - Function Up: bimacalibrater - Tool Previous: bimacalibrater.fit - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01