Esempio n. 1
0
def getfilename():
  global interpolation
  fileName = QtGui.QFileDialog.getOpenFileName(None, 
     "Select interpolation filename", "/hdd/") ;
  p.param('filename').setValue(fileName)
  fileName = str(fileName)
  split = os.path.split(fileName)
  dataPathInterp=split[0]+'/'
  scanparams = np.loadtxt(dataPathInterp+'scanparameters.txt')
  (xstart,xstop,xstep,ystart,ystop,ystep)=scanparams
  interpolation = gp.interpolate2SLM(dataPathInterp, xstart, xstep, ystart, ystep)
Esempio n. 2
0
def getfilename():
    global interpolation
    fileName = QtGui.QFileDialog.getOpenFileName(
        None, "Select interpolation filename", "/hdd/")
    p.param('filename').setValue(fileName)
    fileName = str(fileName)
    split = os.path.split(fileName)
    dataPathInterp = split[0] + '/'
    scanparams = np.loadtxt(dataPathInterp + 'scanparameters.txt')
    (xstart, xstop, xstep, ystart, ystop, ystep) = scanparams
    interpolation = gp.interpolate2SLM(dataPathInterp, xstart, xstep, ystart,
                                       ystep)
Esempio n. 3
0
    heraldChan = 0
    bobMirrorFileName = "/mnt/SLM/Dan/FindNanowiresSERICALPORT/NanowireScanNOSCRAMBLE/Bob/on.dat"

    nrows = 512


    if True:
        infoname = sys.argv[0].strip('.py')+'.info.txt'
        infofp = open(infoname,'w')
        infofp.write('# use the pixel mapping in this folder %s\n'%dataPathInterp)
        infofp.write('# Tacq %f\n'%Tacq) 
        infofp.close()

        scanparams = np.loadtxt(dataPathInterp+'scanparameters.txt') 
        (xstart, xstop, xstep, ystart, ystop, ystep)=scanparams
        pixel_list = gp.interpolate2SLM(dataPathInterp, xstart, xstep, ystart, ystep)
        #print pixel_list

    cnt = 0
    # Set Bob's SLM to a mirror, only need to do this once
    shutil.copyfile(bobMirrorFileName, '/mnt/SLM/Dan/OptimizeSLM/Patterns/OrigSettings/SLM_100.dat')
    out_fp = open(dataPath+'rasterOptimize.txt','w')
    for pixel in pixel_list:
        (xo,yo)=pixel
        while True:
            fft_phase = gp.initial_phase_orig(257-xo,257-yo, 512)
            #print 'phase_offset',gp.phase_offset
            gp.write2file(fft_phase, gp.phasemap, SLMpath, '99')
            send(99)
            msgin = wait()
            if int(msgin)<0: