Пример #1
0
 def process(dataset):
     dv.cd(['', 'Experiments', experiment, dataset])
     dv.open(1)
     data = dv.get().asarray
     params = dict(dv.get_parameters())
     dp = dataProcessor(params)
     dp.addData(data)
     pwr,fluor = dp.process()
     name = dv.new('scan',[('Power', 'dBm')],[('Counts','Counts/sec','Counts/sec')] )
     dvParameters.saveParameters(dv, params)
     dv.add_parameter('plotLive',True)
     dv.add(np.vstack((pwr,fluor)).transpose())
     dp.makePlot()
def process():
    dv.open(1)
    data = dv.get().asarray
    params = dict(dv.get_parameters())
    dp = dataProcessor.dataProcessor(params)
    dp.addData(data)
    #get information from processor and add it to data vault
    pwr,fluor = dp.process()
    dv.new('scan',[('Power', 'dBm')],[('Counts','Counts/sec','Counts/sec')] )
    dvParameters.saveParameters(dv, params)
    dv.add_parameter('plotLive',True)
    dv.add(np.vstack((pwr,fluor)).transpose())
    dp.makePlot()
Пример #3
0
def process():
    dv.open(1)
    data = dv.get().asarray
    params = dict(dv.get_parameters())
    dp = dataProcessor.dataProcessor(params)
    dp.addData(data)
    #get information from processor and add it to data vault
    freq,fluor = dp.process()
    dv.new('scan',[('Freq', 'MHz')],[('Counts','Counts/sec','Counts/sec')] )
    dvParameters.saveParameters(dv, params)
    dv.add_parameter('plotLive',True)
    dv.add(np.vstack((freq,fluor)).transpose())
    dp.makePlot()
Пример #4
0
 def process(dataset):
     dv.cd(['', 'Experiments', experiment, dataset])
     dv.open(1)
     data = dv.get().asarray
     params = dict(dv.get_parameters())
     dp = dataProcessor(params)
     dp.addData(data)
     pwr, fluor = dp.process()
     name = dv.new('scan', [('Power', 'dBm')],
                   [('Counts', 'Counts/sec', 'Counts/sec')])
     dvParameters.saveParameters(dv, params)
     dv.add_parameter('plotLive', True)
     dv.add(np.vstack((pwr, fluor)).transpose())
     dp.makePlot()
def initialize():
    #pulser sequence 
    seq = PulsedScan(pulser)
    pulser.new_sequence()
    seq.setVariables(**params)
    seq.defineSequence()
    pulser.program_sequence()
    #set logic
    pulser.switch_auto('axial',  True) #high TTL corresponds to light ON
    pulser.switch_auto('110DP',  False) #high TTL corresponds to light OFF
    pulser.switch_auto('866DP', False) #high TTL corresponds to light OFF
    pulser.switch_manual('crystallization',  False) #high TTL corresponds to light OFF
    #set up data vault

    dv.cd(['','Experiments', experimentName, dirappend], True)
    dv.new('timetags',[('Power', 'dBm')],[('TimeTag','Sec','Sec')] )
    params['cycleTime'] = seq.parameters.cycleTime
    dvParameters.saveParameters(dv, params)
Пример #6
0
def initialize():
    #pulser sequence 
    seq = PulsedScan(pulser)
    pulser.new_sequence()
    seq.setVariables(**params)
    seq.defineSequence()
    pulser.program_sequence()
    #set logic
    pulser.switch_auto('axial',  True) #high TTL corresponds to light ON
    pulser.switch_auto('110DP',  False) #high TTL corresponds to light OFF
    pulser.switch_auto('866DP', False) #high TTL corresponds to light OFF
    pulser.switch_manual('crystallization',  False) #high TTL corresponds to light OFF
    #set up data vault

    dv.cd(['','Experiments', experimentName, dirappend], True)
    dv.new('timetags',[('Power', 'dBm')],[('TimeTag','Sec','Sec')] )
    params['cycleTime'] = seq.parameters.cycleTime
    dvParameters.saveParameters(dv, params)
def initialize():
    global cycleTime
    #pulser sequence 
    seq = PulsedScan(pulser)
    pulser.new_sequence()
    seq.setVariables(**params)
    seq.defineSequence()
    pulser.program_sequence()

    pulser.switch_auto('axial',  True) #high TTL corresponds to light ON
    pulser.switch_auto('110DP',  False) #high TTL corresponds to light OFF
    pulser.switch_auto('866DP', False) #high TTL corresponds to light OFF
    pulser.switch_manual('crystallization',  False) #high TTL corresponds to light OFF
    #set up data vault

    dv.cd(['','Experiments', experimentName, dirappend], True)
    dv.new('fluorDiff',[('Iterations', 'Arb')],[('Counts','Counts / Sec','Counts / Sec')] )
    params['cycleTime'] = seq.parameters.cycleTime
    params['plotLive'] = True
    cycleTime = params['cycleTime']
    dvParameters.saveParameters(dv, params)
Пример #8
0
def initialize():
    global cycleTime
    #pulser sequence
    seq = PulsedScan(pulser)
    pulser.new_sequence()
    seq.setVariables(**params)
    seq.defineSequence()
    pulser.program_sequence()

    pulser.switch_auto('axial', True)  #high TTL corresponds to light ON
    pulser.switch_auto('110DP', False)  #high TTL corresponds to light OFF
    pulser.switch_auto('866DP', False)  #high TTL corresponds to light OFF
    pulser.switch_manual('crystallization',
                         False)  #high TTL corresponds to light OFF
    #set up data vault

    dv.cd(['', 'Experiments', experimentName, dirappend], True)
    dv.new('fluorDiff', [('Iterations', 'Arb')],
           [('Counts', 'Counts / Sec', 'Counts / Sec')])
    params['cycleTime'] = seq.parameters.cycleTime
    params['plotLive'] = True
    cycleTime = params['cycleTime']
    dvParameters.saveParameters(dv, params)
Пример #9
0
 def finalize(self):
     for name in ['axial', '110DP']:
         self.pulser.switch_manual(name)
     #save information to file
     measureList = ['trapdrive','endcaps','compensation','dcoffsetonrf','cavity397','cavity866','multiplexer397','multiplexer866','axialDP', 'pulser']
     measuredDict = dvParameters.measureParameters(self.cxn, self.cxnlab, measureList)
     dvParameters.saveParameters(self.dv, measuredDict)
     dvParameters.saveParameters(self.dv, self.seqP.toDict())
     dvParameters.saveParameters(self.dv, self.expP.toDict())
Пример #10
0
 def sequence(self):
     sP = self.seqP
     xP = self.expP
     #saving timetags
     self.dv.cd(['','Experiments', self.experimentName, self.topdirectory, self.dirappend], True)
     self.dv.new('timetags',[('Time', 'sec')],[('PMT counts','Arb','Arb')] )
     #do iterations
     for iteration in range(xP.iterations):
         print 'recording trace {0} out of {1}'.format(iteration+1, xP.iterations)
         self.pulser.reset_timetags()
         self.pulser.start_single()
         self.pulser.wait_sequence_done()
         self.pulser.stop_sequence()
         timetags = self.pulser.get_timetags().asarray
         iters = iteration * numpy.ones_like(timetags) 
         self.dv.add(numpy.vstack((iters,timetags)).transpose())
         #add to binning of the entire sequence
         self.Binner.add(timetags)
         self.Splicer.add(timetags)
         #auto crystallization
         if xP.auto_crystal:
             success = self.xtal.auto_crystallize()
             if not success: break
         #auto frequency correct
         if xP.freq_correct:
             if (xP.iterations % xP.freq_correct_interval == 0):
                 success = self.freqCorrect.auto_correct()
                 if not success: print 'Cant the drift, Boss'
         
     #adding readout counts to data vault:
     readout = self.Splicer.getList()
     self.dv.cd(['','Experiments', self.experimentName, self.topdirectory, self.dirappend])
     self.dv.new('readout',[('Iter', 'Number')], [('PMT counts','Counts/Sec','Counts/Sec')] )
     self.dv.add(readout)
     #adding binned fluorescence to data vault:
     binX, binY = self.Binner.getBinned()
     self.dv.cd(['','Experiments', self.experimentName, self.topdirectory, self.dirappend])
     self.dv.new('binned',[('Time', 'sec')], [('PMT counts','Arb','Arb')] )
     data = numpy.vstack((binX, binY)).transpose()
     self.dv.add(data)
     self.dv.add_parameter('Window',['Binned Fluorescence'])
     self.dv.add_parameter('plotLive',True)
     #adding histogram of counts to data vault
     binX, binY = self.Splicer.getHistogram()
     self.dv.cd(['','Experiments', self.experimentName, self.topdirectory, self.dirappend])
     self.dv.new('histogram',[('Time', 'sec')], [('PMT counts','Arb','Arb')] )
     data = numpy.vstack((binX, binY)).transpose()
     self.dv.add(data)
     self.dv.add_parameter('Window',['Histogram'])
     self.dv.add_parameter('plotLive',True)
     # gathering parameters and adding them to data vault
     measureList = ['trapdrive','endcaps','compensation','dcoffsetonrf','cavity397','cavity866','multiplexer397','multiplexer866','axialDP', 'pulser']
     measuredDict = dvParameters.measureParameters(self.cxn, self.cxnlab, measureList)
     dvParameters.saveParameters(self.dv, measuredDict)
     dvParameters.saveParameters(self.dv, sP.toDict())
     dvParameters.saveParameters(self.dv, xP.toDict())
Пример #11
0
 def finalize(self):
     #for name in ['axial', '110DP']:
     for name in ['110DP']:
         self.pulser.switch_manual(name)
     #save information to file
     measureList = ['trapdrive','endcaps','compensation','dcoffsetonrf','cavity397','cavity866','multiplexer397','multiplexer866','axialDP', 'pulser']
     measuredDict = dvParameters.measureParameters(self.cxn, self.cxnlab, measureList)
     dvParameters.saveParameters(self.dv, measuredDict)
     dvParameters.saveParameters(self.dv, self.seqP.toDict())
     dvParameters.saveParameters(self.dv, self.expP.toDict())
Пример #12
0
 def finalize(self):
     #go back to initiali frequency
     self.synth.frequency(self.initfreq)
     #go back to inital logic
     for name in ['axial', '110DP']:
         self.pulser.switch_manual(name)
     #save information to file
     measureList = ['trapdrive','endcaps','compensation','dcoffsetonrf','cavity397','cavity866','multiplexer397','multiplexer866','axialDP', 'pulser']
     measuredDict = dvParameters.measureParameters(self.cxn, self.cxnlab, measureList)
     dvParameters.saveParameters(self.dv, measuredDict)
     dvParameters.saveParameters(self.dv, self.seqP.toDict())
     dvParameters.saveParameters(self.dv, self.expP.toDict())
     #show histogram
     self.dp.makeHistPlot()
Пример #13
0
    def sequence(self):

        sP = self.seqP
        xP = self.expP
        
        now = datetime.datetime.now()
        date = now.strftime("%Y%m%d")
        ti = now.strftime('%H%M%S')
        print ti
        timetag_context = self.dv.context()
        self.dv.cd(['',date, self.experimentName, ti, 'binned'], True)
        self.dv.cd(['',date, self.experimentName, ti, 'timetags'], True, context = timetag_context)
        #self.dv.new('binned_timetags',[('Time', 'sec')],[('PMT counts','Arb','Arb')] )
        self.dv.new('timetags',[('Time', 'sec')], [('Iteration', 'Arb','Arb')] , context = timetag_context )

        timetags = []
        numUpdates = xP.iterations
        self.pulser.reset_timetags()
        for n in range(numUpdates):
            print n
            for iteration in range(xP.iterations / numUpdates):
                self.pulser.start_single()
                self.pulser.wait_sequence_done()
                self.pulser.stop_sequence()

            timetags.extend(self.pulser.get_timetags().asarray)
            self.pulser.reset_timetags()
    
        timetag_raw = numpy.vstack( ( numpy.ones(len(timetags)),timetags ) ).transpose()
        self.dv.add( timetag_raw, context=timetag_context )
        self.Binner.add(timetags, xP.iterations)
            
        self.dv.new('binned_timetags',[('Time', 'sec')],[('PMT counts','Arb','Arb')] )
        self.dv.add_parameter('Window',['Binned Fluorescence'])
        self.dv.add_parameter('plotLive', True)
        binX, binY = self.Binner.getBinned()
        data = numpy.vstack((binX,binY)).transpose()
        self.dv.add(data)
            
        measureList = ['cavity397', 'cavity866', 'multiplexer397', 'multiplexer866', 'pulser']
        measureDict = dvParameters.measureParameters(self.cxn, self.cxnlab, measureList)

        dvParameters.saveParameters(self.dv, measureDict)
        dvParameters.saveParameters(self.dv, sP.toDict())
        dvParameters.saveParameters(self.dv, xP.toDict())
    def sequence(self):

        sP = self.seqP
        xP = self.expP
        
        now = datetime.datetime.now()
        date = now.strftime("%Y%m%d")
        ti = now.strftime('%H%M%S')
        print ti
        timetag_context = self.dv.context()
        self.dv.cd(['',date, self.experimentName, ti, 'binned'], True)
        self.dv.cd(['',date, self.experimentName, ti, 'timetags'], True, context = timetag_context)
        #self.dv.new('binned_timetags',[('Time', 'sec')],[('PMT counts','Arb','Arb')] )
        self.dv.new('timetags',[('Time', 'sec')], [('Iteration', 'Arb','Arb')] , context = timetag_context )

        timetags = []
        numUpdates = xP.iterations
        self.pulser.reset_timetags()
        for n in range(numUpdates):
            print n
            for iteration in range(xP.iterations / numUpdates):
                self.pulser.start_single()
                self.pulser.wait_sequence_done()
                self.pulser.stop_sequence()

            timetags.extend(self.pulser.get_timetags().asarray)
            self.pulser.reset_timetags()
    
        timetag_raw = numpy.vstack( ( numpy.ones(len(timetags)),timetags ) ).transpose()
        self.dv.add( timetag_raw, context=timetag_context )
        self.Binner.add(timetags, xP.iterations)
            
        self.dv.new('binned_timetags',[('Time', 'sec')],[('PMT counts','Arb','Arb')] )
        self.dv.add_parameter('Window',['Binned Fluorescence'])
        self.dv.add_parameter('plotLive', True)
        binX, binY = self.Binner.getBinned()
        data = numpy.vstack((binX,binY)).transpose()
        self.dv.add(data)
            
        measureList = ['cavity397', 'cavity866', 'multiplexer397', 'multiplexer866', 'pulser']
        measureDict = dvParameters.measureParameters(self.cxn, self.cxnlab, measureList)

        dvParameters.saveParameters(self.dv, measureDict)
        dvParameters.saveParameters(self.dv, sP.toDict())
        dvParameters.saveParameters(self.dv, xP.toDict())
Пример #15
0
#light logic
pulser.switch_auto('866DP', True)  #high TTL means light ON
pulser.switch_auto('110DP', True)
pulser.switch_manual('crystallization', False)
#create directory
dv.cd(['', 'Experiments', experimentName, dirappend, 'timetags'], True)
for i in range(repeatitions):
    pulser.reset_timetags()
    pulser.start_single()
    pulser.wait_sequence_done()
    pulser.stop_sequence()
    timetags = pulser.get_timetags().asarray
    print 'got {0} timetags on iteration {1}'.format(timetags.size, i + 1)
    #saving timetags
    dv.new('timetags iter{0}'.format(i), [('Time', 'sec')],
           [('PMT counts', 'Arb', 'Arb')])
    dv.add_parameter('iteration', i)
    ones = numpy.ones_like(timetags)
    dv.add(numpy.vstack((timetags, ones)).transpose())
    dvParameters.saveParameters(dv, params)
    #data processing on the fuly
    dp.addTimetags(timetags)

#revert the logic
pulser.switch_auto('866DP', False)  #high TTL means light Off
pulser.switch_manual('110DP', True)
#complete
print 'SAVED {}'.format(dirappend)
dp.normalize(repeatitions)
dp.makePlot()
print 'DONE'
Пример #16
0
pulser.program_sequence()
#light logic
pulser.switch_auto('866DP', True) #high TTL means light ON
pulser.switch_auto('110DP', True)
pulser.switch_manual('crystallization', False)
#create directory
dv.cd(['','Experiments', experimentName, dirappend, 'timetags'],True )
for i in range(repeatitions):
    pulser.reset_timetags()
    pulser.start_single()
    pulser.wait_sequence_done()
    pulser.stop_sequence()
    timetags = pulser.get_timetags().asarray
    print 'got {0} timetags on iteration {1}'.format(timetags.size, i + 1)
    #saving timetags
    dv.new('timetags iter{0}'.format(i),[('Time', 'sec')],[('PMT counts','Arb','Arb')] )
    dv.add_parameter('iteration',i)
    ones = numpy.ones_like(timetags)
    dv.add(numpy.vstack((timetags,ones)).transpose())
    dvParameters.saveParameters(dv, params)
    #data processing on the fuly
    dp.addTimetags(timetags)

#revert the logic
pulser.switch_auto('866DP', False) #high TTL means light Off
pulser.switch_manual('110DP', True)
#complete
print 'SAVED {}'.format(dirappend)
dp.normalize(repeatitions)
dp.makePlot()
print 'DONE'