Example #1
0
def g2cal():
    cfg = tasks.GaincalConfig()
    cfg.caltable = g2
    cfg.gaintype = 'G'
    cfg.calmode = 'ap'
    cfg.solnorm = False
    cfg.combine = ['scan']
    cfg.gaintable = cal2_gaintables
    cfg.gainfield = cal2_gainfields
    cfg.interp = cal2_interpolns
    cfg.parang = True
    cfg.refant = refant

    cfg.vis = bpvis
    cfg.solint = 'int'
    cfg.minsnr = 1e-2
    tasks.gaincal(cfg)

    cfg.append = True  # important!
    set_cal_ms_name(g2, gpvis)  # imporant workaround!
    cfg.vis = gpvis
    cfg.solint = gp_solint
    cfg.minsnr = 1e-2
    cfg.gaintable += [gpstp]
    cfg.gainfield += ['']
    cfg.interp += [gpstp_interp]
    tasks.gaincal(cfg)
Example #2
0
def g0cal():
    cfg = tasks.GaincalConfig()
    cfg.vis = bpvis
    cfg.caltable = g0
    cfg.gaintype = 'G'
    cfg.calmode = 'ap'
    cfg.solint = 'int'
    cfg.refant = refant
    cfg.minsnr = 1
    cfg.spw = g0cal_spw
    tasks.gaincal(cfg)
Example #3
0
def kcross():
    cfg = tasks.GaincalConfig()
    cfg.vis = bpvis
    cfg.caltable = kc
    cfg.gaintype = 'KCROSS'
    cfg.refant = refant
    cfg.solint = 'inf'
    cfg.combine = ['scan']
    cfg.gaintable = cal1_gaintables + [g1]
    cfg.gainfield = cal1_gainfields + [bpfdfield]
    cfg.interp = cal1_interpolns + ['nearest']
    cfg.parang = True
    tasks.gaincal(cfg)
Example #4
0
def delays():
    cfg = tasks.GaincalConfig()
    cfg.vis = bpvis
    cfg.caltable = dl
    cfg.gaintype = 'K'
    cfg.combine = ['scan']
    cfg.solint = 'inf'
    cfg.refant = refant
    cfg.minsnr = 4
    cfg.gaintable = [g0]
    cfg.gainfield = ['']
    cfg.interp = ['nearest']
    tasks.gaincal(cfg)
Example #5
0
def polpa():
    cfg = tasks.GaincalConfig()
    cfg.vis = bpvis
    cfg.caltable = xf
    cfg.gaintype = 'Xf'
    cfg.calmode = 'ap'
    cfg.refant = refant
    cfg.solint = 'inf'
    cfg.combine = ['scan']
    cfg.gaintable = cal1_gaintables + [g1, kc, df]
    cfg.gainfield = cal1_gainfields + [bpfdfield, '', '']
    cfg.interp = cal1_interpolns + ['nearest', 'nearest', 'nearest']
    cfg.parang = True
    tasks.gaincal(cfg)
Example #6
0
def bandpass():
    cfg = tasks.GaincalConfig()
    cfg.vis = bpvis
    cfg.caltable = bp
    cfg.gaintype = 'B'
    cfg.combine = ['scan']
    cfg.solint = 'inf'
    cfg.minblperant = bp_minblperant
    cfg.refant = refant
    cfg.minsnr = bp_minsnr
    cfg.solnorm = True
    cfg.gaintable = [g0, dl]
    cfg.gainfield = ['', '']
    cfg.interp = ['nearest', 'nearest']
    tasks.gaincal(cfg)
Example #7
0
def leakage():
    cfg = tasks.GaincalConfig()
    cfg.vis = bpvis
    cfg.caltable = df
    cfg.gaintype = 'Df+QU'
    cfg.calmode = 'ap'
    cfg.refant = refant
    cfg.solint = 'inf,2ch'
    cfg.combine = ['scan']
    cfg.preavg = 300
    cfg.minblperant = 12
    #cfg.minsnr = 5
    cfg.gaintable = cal1_gaintables + [g1, kc]
    cfg.gainfield = cal1_gainfields + [bpfdfield, '']
    cfg.interp = cal1_interpolns + ['nearest', 'nearest']
    cfg.parang = True
    tasks.gaincal(cfg)
Example #8
0
def g1cal():
    cfg = tasks.GaincalConfig()
    cfg.caltable = g1
    cfg.gaintype = 'G'
    cfg.calmode = 'ap'
    cfg.solnorm = False
    cfg.combine = ['scan']
    cfg.gaintable = cal1_gaintables
    cfg.gainfield = cal1_gainfields
    cfg.interp = cal1_interpolns
    cfg.parang = True
    cfg.refant = refant

    cfg.vis = bpvis
    cfg.solint = 'int'
    cfg.minsnr = 1e-2
    tasks.gaincal(cfg)
Example #9
0
def selfcal1():
    "Shorter, T-type, phase-only selfcal"
    cfg = tasks.GaincalConfig()
    cfg.caltable = 'sc1.cal'
    cfg.gaintype = 'T'
    cfg.calmode = 'p'
    cfg.solnorm = False
    cfg.combine = ['spw']
    cfg.gaintable = []
    cfg.gainfield = []
    cfg.interp = []
    cfg.parang = False
    cfg.refant = 'ea24'  # XXX customized, preferred refants drop out
    cfg.vis = tavgvis
    cfg.solint = 'inf'  # XXX '1min'
    cfg.minsnr = 3  # XXX
    cfg.minblperant = 6  # XXX
    tasks.gaincal(cfg)
Example #10
0
def gpstpcal():
    # short-timescale phase cal of gp.ms
    cfg = tasks.GaincalConfig()
    cfg.caltable = gpstp
    cfg.gaintype = 'G'
    cfg.calmode = 'p'
    cfg.solnorm = True
    cfg.combine = ['scan']
    cfg.gaintable = cal2_gaintables
    cfg.gainfield = cal2_gainfields
    cfg.interp = cal2_interpolns
    cfg.parang = True
    cfg.refant = refant
    cfg.vis = gpvis
    cfg.solint = gpstp_solint
    cfg.minsnr = 3.
    tasks.gaincal(cfg)

    cfg = tasks.GpdetrendConfig()
    cfg.caltable = gpstp
    tasks.gpdetrend(cfg)
Example #11
0
def peelbp(idx):
    idx = int(idx)
    assert idx >= 0 and idx < len(peels)

    peelwork = peelworkfmt.format(idx=idx)
    gpeel1 = gpeel1fmt.format(idx=idx)
    gpeel2 = gpeel2fmt.format(idx=idx)
    bppeel = peelbpfmt.format(idx=idx)

    cfg = tasks.GaincalConfig()
    cfg.vis = peelwork
    cfg.caltable = bppeel
    cfg.gaintype = 'B'
    cfg.combine = ['scan']
    cfg.solint = peelbp_solint
    cfg.minblperant = bp_minblperant
    cfg.refant = refant
    cfg.minsnr = bp_minsnr
    cfg.solnorm = False
    cfg.gaintable = [gpeel1, gpeel2]
    cfg.gainfield = ['', '']
    cfg.interp = ['linear', 'linear']
    tasks.gaincal(cfg)
Example #12
0
def peelcal1(idx):
    "Shorter, phase-only cal for peel processing"
    idx = int(idx)
    assert idx >= 0 and idx < len(peels)

    peelwork = peelworkfmt.format(idx=idx)
    gpeel1 = gpeel1fmt.format(idx=idx)

    cfg = tasks.GaincalConfig()
    cfg.caltable = gpeel1
    cfg.gaintype = 'T'
    cfg.calmode = 'p'
    cfg.solnorm = False
    cfg.combine = ['scan']
    cfg.gaintable = []
    cfg.gainfield = []
    cfg.interp = []
    cfg.parang = True
    cfg.refant = refant
    cfg.vis = peelwork
    cfg.solint = peel1_solint
    cfg.minsnr = 1e-2
    tasks.gaincal(cfg)