blcal¶
-
blcal
(vis, caltable='', field='', spw='', intent='', selectdata=True, timerange='', uvrange='', antenna='', scan='', observation='', msselect='', solint='inf', combine='scan', freqdep=False, calmode='ap', solnorm=False, gaintable='', gainfield='', interp='', spwmap='', parang=False)[source]¶ Calculate a baseline-based calibration solution (gain or bandpass)
[Description] [Examples] [Development] [Details]
- Parameters
vis (path) - Name of input visibility file
caltable (string=’’) - Name of output gain calibration table
field (string=’’) - Select field using field id(s) or field name(s)
spw (string=’’) - Select spectral window/channels
intent (string=’’) - Select observing intent
selectdata (bool=True) - Other data selection parameters
selectdata = True
timerange (string=’’) - Select data based on time range
uvrange (variant=’’) - Select data by baseline length.
antenna (string=’’) - Select data based on antenna/baseline
scan (string=’’) - Scan number range
observation ({string, int}=’’) - Select by observation ID(s)
msselect (string=’’) - Optional complex data selection (ignore for now)
solint (variant=’inf’) - Solution interval
combine (string=’scan’) - Data axes which to combine for solve (obs, scan, spw, and/or field)
freqdep (bool=False) - Solve for frequency dependent solutions
calmode (string=’ap’) - Type of solution” ('ap', 'p', 'a')
solnorm (bool=False) - Normalize average solution amplitudes to 1.0
gaintable (stringVec=’’) - Gain calibration table(s) to apply on the fly
gainfield (stringVec=’’) - Select a subset of calibrators from gaintable(s)
interp (stringVec=’’) - Interpolation parameters for each gaintable, as a list
spwmap (any=’’) - Spectral window mappings to form for gaintable(s)
parang (bool=False) - Apply parallactic angle correction
- Description
The blcal task determines baseline-based time- and/or frequency-dependent gains for all baselines in the data set. Such solutions are in contrast to gaincal and bandpass solutions which are antenna-based and better constrained.
Note
In general, solving for and applying baseline-based calibration can be a very dangerous thing to do, since such non-closing corrections can fundamentally alter the otherwise unique source structure information obtained by an interferometer. Use of blcal should be approached with great care, after all antenna-based calibration options have been exhausted, and then only on long timescales, to ensure that the solution doesn’t absorb true—or reinforce false—source structure. You must be sure you have an excellent model for the source (better than the magnitude of the baseline-dependent errors). In any case, blcal will, if used, usually mark the endpoint of a calibration scheme, reinforcing the current source model, and rendering any additional antenna-based calibration (e.g., selfcal) less reliable. As such, it could be viewed as a mostly cosmetic last step in calibration.
Common calibration solve parameters
The blcal task uses all of the same parameters as gaincal and bandpass, which the exception of gaintype and bandtype, respectively. See “Solving for Calibration” for general information about calibration solving parameters.
Controlling frequency-dependence in blcal: freqdep
The parameter freqdep controls whether or not a channel-dependent solution should be obtained. If freqdep=True, a channelized solution (like bandpass, but baseline-based) will be obtained; otherwise the solution will be unchannelized (like gaincal, but baseline-based).
- Examples
In this example, we solve for constant (solint=’inf’) frequency-independent (freqdep=False) baseline-based solutions relative to ordinary gain, bandpass, and gaincurve calibration:
blcal(vis='data.ms', caltable='cal.M', # Output table name field='2', # A field with a very good model solint='inf', # single solution per baseline, spw gaintable=['cal.B','cal.gc','cal.G90s'], # all prior cal freqdep=False) # frequency-independent solution
- Development
No additional development details
- Parameter Details
Detailed descriptions of each function parameter
vis (path)
- Name of input visibility fileDefault: noneExample: vis=’ngc5921.ms’caltable (string='')
- Name of output gain calibration tableDefault: noneExample: caltable=’ngc5921.gcal’field (string='')
- Select field using field id(s) or field name(s)Default: ‘’ (all fields)Use ‘go listobs’ to obtain the list id’s ornames. If field string is a non-negative integer,it is assumed a field index, otherwise, it isassumed a field name.Examples:field=’0~2’; field ids 0,1,2field=’0,4,5~7’; field ids 0,4,5,6,7field=’3C286,3C295’; field named 3C286 and3C295field = ‘3,4C*’; field id 3, all namesstarting with 4Cspw (string='')
- Select spectral window/channelsDefault: ‘’ (all spectral windows and channels)Examples:spw=’0~2,4’; spectral windows 0,1,2,4 (allchannels)spw=’<2’; spectral windows less than 2(i.e. 0,1)spw=’0:5~61’; spw 0, channels 5 to 61,INCLUSIVEspw=’*:5~61’; all spw with channels 5 to 61spw=’0,10,3:3~45’; spw 0,10 all channels, spw3, channels 3 to 45.spw=’0~2:2~6’; spw 0,1,2 with channels 2through 6 in each.spw=’0:0~10;15~60’; spectral window 0 withchannels 0-10,15-60. (NOTE ‘;’ to separatechannel selections)spw=’0:0~10^2,1:20~30^5’; spw 0, channels0,2,4,6,8,10, spw 1, channels 20,25,30intent (string='')
- Select observing intentDefault: ‘’ (no selection by intent)Example: intent=’*BANDPASS*’ (selects datalabelled with BANDPASS intent)selectdata (bool=True)
- Other data selection parametersDefault: TrueOptions: True|Falsetimerange (string='')
- Select data based on time rangeSubparameter of selectdata=TrueDefault = ‘’ (all)Examples:timerange =‘YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss’(Note: if YYYY/MM/DD is missing date defaultsto first day in data set.)timerange=’09:14:0~09:54:0’ picks 40 min onfirst daytimerange= ‘25:00:00~27:30:00’ picks 1 hr to 3hr 30min on NEXT daytimerange=’09:44:00’ pick data within oneintegration of timetimerange=’>10:24:00’ data after this timeuvrange (variant='')
- Select data by baseline length.Default = ‘’ (all)Examples:uvrange=’0~1000klambda’; uvrange from 0-1000 kilo-lambdauvrange=’>4klambda’;uvranges greater than 4 kilo-lambdauvrange=’0~1000km’; uvrange in kilometersantenna (string='')
- Select data based on antenna/baselineSubparameter of selectdata=TrueDefault: ‘’ (all)If antenna string is a non-negative integer, itis assumed an antenna index, otherwise, it isassumed as an antenna nameExamples:antenna=’5&6’; baseline between antennaindex 5 and index 6.antenna=’VA05&VA06’; baseline between VLAantenna 5 and 6.antenna=’5&6;7&8’; baselines withindices 5-6 and 7-8antenna=’5’; all baselines with antenna index5antenna=’05’; all baselines with antennanumber 05 (VLA old name)antenna=’5,6,10’; all baselines with antennas5,6,10 index numbersscan (string='')
- Scan number rangeSubparameter of selectdata=TrueDefault: ‘’ = allobservation ({string, int}='')
- Select by observation ID(s)Subparameter of selectdata=TrueDefault: ‘’ = allExample: observation=’0~2,4’msselect (string='')
- Optional complex data selection (ignore for now)solint (variant='inf')
- Solution intervalDefault: ‘inf’ (infinite, up to boundariescontrolled by combine);Options: ‘inf’ (~infinite), ‘int’ (perintegration), any float or integer value with orwithout unitsExamples:solint=’1min’; solint=’60s’, solint=60 (i.e.,1 minute); solint=’0s’; solint=0; solint=’int’(i.e., per integration); solint-‘-1s’;solint=’inf’ (i.e., ~infinite, up toboundaries enforced by combine)combine (string='scan')
- Data axes which to combine for solveDefault: ‘scan’ (solutions will break at obs,field, and spw boundaries, but may extend overmultiple scans [per obs, field, and spw] up tosolint.)Options: ‘’,’obs’,’scan’,’spw’,field’, or anycomma-separated combination in a single stringExample: combine=’scan,spw’ - Extend solutionsover scan boundaries (up to the solint), andcombine spws for solvingfreqdep (bool=False)
- Solve for frequency dependent solutionsDefault: False (gain; True=bandpass)Options: False|Truecalmode (string='ap')
- Type of solution” (‘ap’, ‘p’, ‘a’)Default: ‘ap’ (amp and phase)Options: ‘p’ (phase) ,’a’ (amplitude), ‘ap’(amplitude and phase)Example: calmode=’p’solnorm (bool=False)
- Normalize average solution amplitudes to 1.0Default: False (no normalization)For freqdep=False, this is a global (per-spw)normalization of amplitudes (only). Forfreqdep=True, each baseline solution spectrum isseparately normalized by its (complex) mean.gaintable (stringVec='')
- Gain calibration table(s) to apply on the flyDefault: ‘’ (none)Examples:gaintable=’ngc5921.gcal’gaintable=[‘ngc5921.ampcal’,’ngc5921.phcal’]gainfield (stringVec='')
- Select a subset of calibrators from gaintable(s)Default: ‘’ (all sources on the sky)‘nearest’ ==> nearest (on sky) available field intable otherwise, same syntax as fieldExamples:gainfield=’0~3’gainfield=[‘0~3’,’4~6’]interp (stringVec='')
- Interpolation parmameters (in time[,freq]) for each gaintable, as a list of strings.Default: ‘’ –> ‘linear,linear’ for all gaintable(s)Options: Time: ‘nearest’, ‘linear’Freq: ‘nearest’, ‘linear’, ‘cubic’,‘spline’Specify a list of strings, aligned with the list of caltable specifiedin gaintable, that contain the required interpolation parametersfor each caltable.- When frequency interpolation is relevant (B, Df,Xf), separate time-dependent and freq-dependentinterp types with a comma (freq after thecomma).- Specifications for frequency are ignored when thecalibration table has no channel-dependence.- Time-dependent interp options ending in ‘PD’enable a “phase delay” correction per spw fornon-channel-dependent calibration types.- For multi-obsId datasets, ‘perobs’ can beappended to the time-dependent interpolationspecification to enforce obsId boundaries wheninterpolating in time.- For multi-scan datasets, ‘perscan’ can beappended to the time-dependent interpolationspecification to enforce scan boundaries wheninterpolating in time.- Freq-dependent interp options can have ‘flag’ appendedto enforce channel-dependent flagging, and/or ‘rel’appended to invoke relative frequency interpolationExamples:interp=’nearest’ (in time, freq-dep will belinear, if relevant)interp=’linear,cubic’ (linear in time, cubicin freq)interp=’linearperobs,splineflag’ (linear intime per obsId, spline in freq withchannelized flagging)interp=’nearest,linearflagrel’ (nearest intime, linear in freq with with channelizedflagging and relative-frequency interpolation)interp=’,spline’ (spline in freq; linear intime by default)interp=[‘nearest,spline’,’linear’] (formultiple gaintables)spwmap (any='')
- Spectral window mappings to form for gaintable(s)default: [] (apply solutions from each calibration spw tothe same MS spw only)Any available calibration spw can be mechanically mapped to anyMS spw.Examples:spwmap=[0,0,1,1] means apply calibrationfrom cal spw = 0 to MS spw 0,1 and cal spw 1 to MS spws 2,3.spwmap=[[0,0,1,1],[0,1,0,1]] (use a list of lists for multiplegaintables)parang (bool=False)
- Apply parallactic angle correctionDefault: FalseIf True, apply the parallactic angle correction(required for polarization calibration)