Source
14
14
15
15
calibrater = cbtool
16
16
17
17
def gaincal(vis=None,caltable=None,
18
18
field=None,spw=None,intent=None,
19
19
selectdata=None,timerange=None,uvrange=None,antenna=None,scan=None,
20
20
observation=None, msselect=None,
21
21
solint=None,combine=None,preavg=None,
22
22
refant=None,refantmode=None,minblperant=None,
23
23
minsnr=None,solnorm=None,normtype=None,
24
-
gaintype=None,smodel=None,calmode=None,solmode=None,rmsthresh=None,append=None,
24
+
gaintype=None,smodel=None,calmode=None,solmode=None,rmsthresh=None,corrdepflags=None,
25
+
append=None,
25
26
splinetime=None,npointaver=None,phasewrap=None,
26
27
docallib=None,callib=None,
27
28
gaintable=None,gainfield=None,interp=None,spwmap=None,
28
29
parang=None):
29
30
30
31
#Python script
31
32
casalog.origin('gaincal')
32
33
33
34
try:
34
35
mycb = calibrater()
57
58
baseline=antenna,uvrange=uvrange,chanmode='none',
58
59
msselect=msselect);
59
60
else:
60
61
# selectdata=F, so time,scan,baseline,uvrange,msselect=''
61
62
# using spw and field specifications only
62
63
# also insist no ACs
63
64
mycb.selectvis(time='',spw=spw,scan='',field=field,intent=intent,
64
65
observation='', baseline='', uvrange='',
65
66
chanmode='none', msselect='ANTENNA1!=ANTENNA2')
66
67
68
+
# signal use of correlation-dependent flags, if requested
69
+
if corrdepflags:
70
+
mycb.setcorrdepflags(True)
71
+
72
+
67
73
# set the model, if specified
68
74
if (len(smodel)>0):
69
75
mycb.setptmodel(smodel);
70
76
71
77
72
78
# Arrange applies....
73
79
74
80
if docallib:
75
81
# by cal library from file
76
82
mycallib=callibrary()