Ejemplo n.º 1
0
    def takeEmptyShots(self, nshots, shotspacing, use_daq=False, record=None):
        calibcontrols = {
            'nshots': ConfigVal(nshots),
            'shotspacing': ConfigVal(shotspacing)
        }

        if shotspacing > 0:
            self._prepSpacedNonMagShots(nshots, shotspacing)
        else:
            self._prepNonMagShots(nshots)
        #configure daq if being used
        if use_daq:
            daq.record = record
            daq.configure(events=0, controls=calibcontrols)
        try:
            if use_daq:
                daq.begin(events=nshots, controls=calibcontrols)
            seq.start()
            self.seq_wait()
            if use_daq:
                daq.wait()
        except KeyboardInterrupt:
            seq.stop()
        finally:
            if use_daq:
                daq.record = None
                daq.disconnect()
Ejemplo n.º 2
0
 def takeEmptyShots(self, nshots, shotspacing, use_daq=False, record=None):
     self.nshots.value = nshots
     self.shotspacing.value = shotspacing
     calibcontrols=[
         (self.nshots),
         (self.shotspacing)
        ]
     if shotspacing > 0:
         self._prepSpacedNonMagShots(self.nshots.value, self.shotspacing.value)
     else:
         self._prepNonMagShots(self.nshots.value)
     #configure daq if being used
     if use_daq:
         daq.record = record
         daq.configure(events=0, controls=calibcontrols)
     try:
         if use_daq:
             daq.begin(event=nshots,controls=calibcontrols)
         seq.start()
         seq.pause()
         if use_daq:
             daq.wait()
     except KeyboardInterrupt:
         seq.stop()
     finally:
         if use_daq:
             daq.record = None
             daq.disconnect()
Ejemplo n.º 3
0
 def go120Hz(self):
     try:
         daq.disconnect()
     except:
         print('DAQ might already be disconnected')
     lp('IN')
     pp.open()
     sync_mark = int(self._sync_markers[120])
     seq.sync_marker.put(sync_mark)
     seq.play_mode.put(2)
     shot_sequence = []
     shot_sequence.append([85, 0, 0, 0])
     shot_sequence.append([87, 0, 0, 0])
     seq.sequence.put_seq(shot_sequence)
     time.sleep(0.5)
     seq.start()
Ejemplo n.º 4
0
 def _takeMagShot(self):
     seq.start()
Ejemplo n.º 5
0
 def _takeNonMagShots(self):
     seq.start()