Esempio n. 1
0
            app = QtGui.QApplication([])
            fileDirectory = QtGui.QFileDialog.getExistingDirectory(
                None, "Select Directory", path)
            fileDirectory = str(fileDirectory).rstrip('/')
            runname = os.path.split(fileDirectory)[1]
            run = int(runname.strip('run'))
            dataPathInterp = fileDirectory + '/'
    else:
        Tacq = 1
        print "You forgot to pass Tacq as a parameter "
        print "Using 1 second"
    pickleFile = open(pickFileName, 'w')
    pickle.dump(dataPathInterp, pickleFile)
    pickleFile.close()

    dataPath, dirCnt = createDatafolder()

    buf = ttag_wrap.openttag()
    atexit.register(ttag_wrap.cleanUp, buf)
    buf.start()

    CoincidenceWindow = 10e-9
    gate = 10e-9
    heraldChan = 0
    # get pixel positions in terms of SLM settings
    scanparams = np.loadtxt(dataPathInterp + 'scanparameters.txt')
    print 'Scan parameters:', scanparams
    (xstart, xstop, xstep, ystart, ystop, ystep) = scanparams
    pixel_list = gp.interpolate2SLM(dataPathInterp, xstart, xstep, ystart,
                                    ystep)
Esempio n. 2
0
      app = QtGui.QApplication([])
      fileDirectory = QtGui.QFileDialog.getExistingDirectory(None, 
         "Select Directory", "/hdd/")
      fileDirectory=str(fileDirectory).rstrip('/')
      runname = os.path.split(fileDirectory)[1]
      run = int(runname.strip('run'))
      dataPathInterp = fileDirectory + '/'

      print "You forgot to pass Tacq as a parameter "
      print "Using 1 second"

    pickleFile = open(pickFileName, 'w')
    pickle.dump(dataPathInterp, pickleFile)
    pickleFile.close()

    dataPath,dirCnt = createDatafolder()

    buf = ttag_wrap.openttag()
    buf.start()
    atexit.register(ttag_wrap.cleanUp, buf)

    CoincidenceWindow = 10e-9
    gate = 10e-9
    heraldChan = 0
    # get nanowire pixel locations from scan
    scanparams = np.loadtxt(dataPathInterp+'scanparameters.txt') 
    (xstart,xstop,xstep,ystart,ystop,ystep)=scanparams
    pixel_list = gp.interpolate2SLM(dataPathInterp, xstart, xstep, ystart, ystep)
    
    pixel = 27  # aim for middle of the nanowire array
    [xo,yo]= pixel_list[pixel,:]