Exemplo n.º 1
0
    return L


mems = m.open_mirror()
i = -0.25
j = 0.06
k = -0.05
l = 0.15

ystep = 0.0
04
xstep = 0.05
#time.sleep(1)
ylist = [y for y in frange(k, l, ystep)]
xlist = [x for x in frange(i, j, xstep)]
for y in ylist:
    #rint(y)
    for x in xlist:
        print(x, y)
        m.set_pos(mems, x, y)
    #time.sleep(0.5)
#time.sleep(0.20)
#m.set_pos(mems,-0.05,y)
#m.set_pos(mems,j,y)
#time.sleep(0.2  )

time.sleep(1)
m.set_pos(mems, i, k)
m.set_pos(mems, 0, 0)
m.close_mirror(mems)
Exemplo n.º 2
0
                                     adaptive + 2 * args.zmicro)
                pass
            if (adaptive == None):
                if (args.verbose):
                    print "Doing a macro scan"
                zlist = []

                for z in frange(args.zmin, args.zmax, args.zmacro):
                    zlist.append(z)

                peak = get_peak(fds, zlist)
                adaptive = fine_scan(args, fds, x, y, peak - 15, peak + 15)
                #adaptive = do adaptive scan


start = time.clock()
if (args.verbose):
    print "Starting at time {}".format(start)

if (args.lidar):
    lidar(args, fds)
else:
    adaptive_lidar(args, fds)
if (args.verbose):
    end = time.clock()
    print "Ending at time {}".format(end)
    print "Time taken {}".format(end - start)

mems.close_mirror(fds['mirror_fd'])
fds['delay_fd'].write('dly 0')
Exemplo n.º 3
0
for x in range(0,2000):


start = time.clock()

#    m.set_pos(mems, 0.05, 0.05)
    #count_fd, control_fd = c.open_counter(5000)
    count = c.get_count(5000)
#    m.set_pos(mems, 0, 0)
    print count #c.count(control_fd, count_fd, 5000)
    time.sleep(210.0/1000)
   # c.close(control_fd, count_fd)
print time.clock()-start#    m.set_pos(mems, 0.05, 0.05)

save_file.close()

"""
m.set_pos(mems,-0.3,0.3)
for x in range(0,100):
    m.set_pos(mems, 0.05, 0.05)
    count_fd, control_fd = c.open_counter(100)
    m.set_pos(mems, 0, 0)
    print c.count(control_fd, count_fd, 100)
    time.sleep(100.0/1000)
    c.close(control_fd, count_fd)
"""



mems = m.close_mirror(mems)
Exemplo n.º 4
0
import mirror as m
me = m.open_mirror()
m.close_mirror(me)