Ejemplo n.º 1
0
taulist = n.fft.ifftshift(taulist)
cnt = 0

#test=[]
#for i in range(1000):
#    test.append(random.gauss(0,1))
#p.hist(test,bins=n.arange(-3,3,0.5))
#p.show()

sig = 10
data1, data2, summ = [],[],[]
for n1 in n.arange(nT):
    datnu = []
    for n2 in n.arange(nchan): datnu.append(random.gauss(0,0.5)+random.gauss(0,0.5)*1.j)
    #datnu[len(datnu)/2] = datnu[len(datnu)/2] + sig
    datatau = dl_tr.nu2tau(datnu)

    data1.append(n.array(datatau).transpose())
    #data1.append(n.array(datnu).transpose())
#data1 = n.array(data1).transpose()

p.plot(n.arange(nchan),datnu)
p.title('datnu')
p.show()
p.plot(taulist,datatau)
p.title('datatau')
p.show()

for n1 in n.arange(nT):
    datnu = []
    for n2 in n.arange(nchan):
Ejemplo n.º 2
0
    print 'processing file', fn
    for bl1 in bl_list1:  #Each baseline is multiplied by itself
        bl2 = bl1
        uv1 = a.miriad.UV(DIR + fn)
        uv2 = uv1

        uv1.rewind()
        uv1.select('clear', 0, 0, include=True)
        uv1.select('antennae', bl1[0], bl1[1], include=True)
        uv1.select('polarization', pol, 0, include=True)

        for preamble, datnu in uv1.all():
            print preamble
            datnu = datnu.filled(
                fill_value=0)[90:110]  #have to fill because fft ignores mask?
            datatau = dl_tr.nu2tau(datnu)
            data1.append(datatau.transpose())
        #data1 = n.array(data1).transpose()

        uv2.rewind()
        uv2.select('clear', 0, 0, include=True)
        uv2.select('antennae', bl2[0], bl2[1], include=True)
        uv2.select('polarization', pol, 0, include=True)

        for preamble, datnu in uv2.all():  # loop over time
            datnu = datnu.filled(fill_value=0)[90:110]
            datatau = dl_tr.nu2tau(datnu)
            data2.append(datatau.transpose())
            #print tauchan, datatau[tauchan]

#print "data shapes", data1.shape, data2.shape
Ejemplo n.º 3
0
Archivo: run_64.py Proyecto: nkern/capo
t02 = preamble[1]
dt = t02 - t01

cnt = 0
sum = 0
data1, data2 = [], []
for bl1 in bl_list1:
    data1 = []
    uv1.rewind()
    uv1.select('clear', 0, 0, include=True)
    uv1.select('antennae', bl1[0], bl1[1], include=True)
    uv1.select('polarization', pol, 0, include=True)
    uv1.select('time', t1 - dt / 3., t1 + dt / 3., include=True)
    for preamble, datnu in uv1.all():
        print 'bl1: ', preamble
        taulist, datatau = dl_tr.nu2tau(uv1, datnu)
        data1.append(datatau[tauchan])

    for bl2 in bl_list2:
        data2 = []
        uv2.rewind()
        uv2.select('clear', 0, 0, include=True)
        uv2.select('antennae', bl2[0], bl2[1], include=True)
        uv2.select('polarization', pol, 0, include=True)
        uv2.select('time', t2 - dt / 3., t2 + dt / 3., include=True)
        for preamble, datnu in uv2.all():
            #print preamble
            taulist, datatau = dl_tr.nu2tau(uv2, datnu)
            data2.append(datatau[tauchan])

        try: