예제 #1
0
def cal2srcs(settings, cal='cal1.uv'):
    '''
	settings: The settings file from your session. This will be used to copy over the solutions.
	cal: the name of the cal file (without full path) which you will use for the gain and
	bandpass calibration. 

	'''
    cal = settings.get('data', 'working') + cal
    srcprefix = settings.get('data', 'srcprefix')
    srcfiles = settings.get('data', 'srcfiles')
    stdout = apercal.shrun('ls -d ' + settings.get('data', 'working') +
                           'src*.uv')
    uvfiles = stdout[0].split('\n')[0:-1]
    o = []
    for s in uvfiles:
        puthd = mirexec.TaskPutHead()
        puthd.in_ = s + '/restfreq'
        puthd.value = 1.420405752
        o.append(puthd.snarf())

        puthd.in_ = s + '/interval'
        puthd.value = 1.0
        puthd.type = 'double'
        o.append(puthd.snarf())

        gpcopy = mirexec.TaskGPCopy()
        gpcopy.vis = cal
        gpcopy.out = s
        o.append(gpcopy.snarf())
        print "Copied Gains from ", cal, " to ", s
    print "DONE cal2srcs"
    return o
예제 #2
0
def cal2srcs(cal, settings):
    '''
	Cals = 'cal1,cal2'
	Srcs = 'src1,src2'
	'''
    for s in srcs.split(','):
        puthd = mirexec.TaskPutHead()
        puthd.in_ = s + '/restfreq'
        puthd.value = 1.420405752
        o = puthd.snarf()

        puthd.in_ = s + '/interval'
        puthd.value = 1.0
        puthd.type = 'double'
        o = puthd.snarf()

        gpcopy = mirexec.TaskGPCopy()
        gpcopy.vis = cal
        gpcopy.out = s
        o = gpcopy.snarf()