예제 #1
0
            print (i,j)
            badlist.append((i,j))
print len(badlist)

p.plot(x,y, 'k.')
if False:
    im = a.img.Img(size=300, res=30)
    DIM = 300./30
    im.put((x,y,z), z)
    _z = a.img.recenter(im.uv, (DIM/2,DIM/2))
    print _z
    _z = n.ma.array(_z, mask=n.where(_z == 0, 1, 0))
    _x,_y = im.get_uv()
    _x = a.img.recenter(_x, (DIM/2,DIM/2))
    _y = a.img.recenter(_y, (DIM/2,DIM/2))
    p.contourf(_x,_y,_z,n.arange(-5,5,.5))
for ant,(xa,ya,za) in enumerate(zip(x,y,z)):
    hx,hy = r*za*n.cos(th)+xa, r*za*n.sin(th)+ya
    if za > 0: fmt = '#eeeeee'
    else: fmt = '#a0a0a0'
    #p.fill(hx,hy, fmt)
    p.text(xa,ya, str(ant))
p.grid()
#p.xlim(-100,100)
p.xlabel("East-West Antenna Position (m)")
p.ylabel("North-South Antenna Position (m)")
#p.ylim(-100,100)
a = p.gca()
if not opts.aspect_neq: a.set_aspect('equal')
p.show()
예제 #2
0
            print(i, j)
            badlist.append((i, j))
print len(badlist)

p.plot(x, y, 'k.')
if False:
    im = a.img.Img(size=300, res=30)
    DIM = 300. / 30
    im.put((x, y, z), z)
    _z = a.img.recenter(im.uv, (DIM / 2, DIM / 2))
    print _z
    _z = n.ma.array(_z, mask=n.where(_z == 0, 1, 0))
    _x, _y = im.get_uv()
    _x = a.img.recenter(_x, (DIM / 2, DIM / 2))
    _y = a.img.recenter(_y, (DIM / 2, DIM / 2))
    p.contourf(_x, _y, _z, n.arange(-5, 5, .5))
for ant, (xa, ya, za) in enumerate(zip(x, y, z)):
    hx, hy = r * za * n.cos(th) + xa, r * za * n.sin(th) + ya
    if za > 0: fmt = '#eeeeee'
    else: fmt = '#a0a0a0'
    #p.fill(hx,hy, fmt)
    p.text(xa, ya, str(ant))
p.grid()
#p.xlim(-100,100)
p.xlabel("East-West Antenna Position (m)")
p.ylabel("North-South Antenna Position (m)")
#p.ylim(-100,100)
a = p.gca()
if not opts.aspect_neq: a.set_aspect('equal')
p.show()
예제 #3
0
파일: plot_antpos.py 프로젝트: nkern/capo
            hx, hy = 10 * za * n.cos(th) + xa, 10 * za * n.sin(th) + ya
            if za > 0: fmt3 = '#eeeeee'
            else: fmt3 = '#a0a0a0'
            p.fill(hx, hy, fmt3, alpha=0.5)

    p.grid()
    delta_coords = n.diff(all_antpos, axis=2) * 100  #deltas in cm
    #print x_c

    for d in delta_coords:
        print d[0][0], ',', d[1][0], ',', d[2][0]
    #p.ylim((-25,25))
    #p.xlim(-150,150)
    #p.ylim(-150,150)
    a = p.gca()
    a.set_aspect('equal')
    #print p.axes()
    #    p.axes([0.4,0.4,0.2,0.2])
    p.figure(figsize=(9, 9))
    p.plot(delta_coords[:, 0], delta_coords[:, 1], '.')
    p.xlim(-25, 25)
    p.xlabel("delta x [cm]")
    p.ylim(-25, 25)
    p.ylabel("delta y [cm]")
    p.figure()
    p.subplot(131)
    p.hist(delta_coords[:, 0])
    #(c,bins)=n.histogram(delta_coords[:,0],bins=10,new=True)
    print '<dx>', '<dy>', '<dz> [cm]'
    print n.mean(delta_coords, axis=0).squeeze()
    print 'sigma(x,y,z) [cm]'
예제 #4
0
            hx,hy = 10*za*n.cos(th)+xa, 10*za*n.sin(th)+ya
            if za > 0: fmt3 = '#eeeeee'
            else: fmt3 = '#a0a0a0'
            p.fill(hx,hy, fmt3,alpha=0.5)
        
    p.grid()
    delta_coords = n.diff(all_antpos,axis=2)*100 #deltas in cm
    #print x_c

    for d in delta_coords:
        print d[0][0],',',d[1][0],',',d[2][0]
    #p.ylim((-25,25))
    #p.xlim(-150,150)
    #p.ylim(-150,150)
    a = p.gca()
    a.set_aspect('equal')
    #print p.axes()
#    p.axes([0.4,0.4,0.2,0.2])
    p.figure(figsize=(9,9))
    p.plot(delta_coords[:,0],delta_coords[:,1],'.')
    p.xlim(-25,25)
    p.xlabel("delta x [cm]")
    p.ylim(-25,25)
    p.ylabel("delta y [cm]")
    p.figure()
    p.subplot(131)
    p.hist(delta_coords[:,0])
    #(c,bins)=n.histogram(delta_coords[:,0],bins=10,new=True)
    print '<dx>','<dy>','<dz> [cm]'
    print n.mean(delta_coords,axis=0).squeeze()
    print 'sigma(x,y,z) [cm]'