def start(self): # in case this measurement is running, stop it if self.running.am_i_running(self): self.stop() # in case a different measurement is running, do nothing elif self.running.is_running(): pass else: # set running indicator to block double readout self.running.now_running(self) # switch start to stop button self.startBtn.label = 'Stop' self.startBtn.button_type = 'danger' # set timeconstant and integration time self.timeconstant = float(self.timeconstantInput.value) self.integration = float(self.integrationInput.value) # create the measurement thread self.measurement = measurement.measurement( inputs=None, sequence=[ self.lockin_digitizer.readout_continuous, measurement.sleep_function(0.1)], update=measurement.bokeh_update_function( self.update, self.doc), init=partial( self.lockin_digitizer.setup, integration=self.integration, timeconstant=self.timeconstant), finish=None, save_output=False) # start the measurement thread self.measurement.start()
def start_movement(self, call, btn, aim_position=0): # in case this measurement is running, stop it if self.running.am_i_running(self): self.stop() # in case a different measurement is running, do nothing elif self.running.is_running(): pass else: # set running indicator to block double readout self.running.now_running(self) self.movement = measurement.measurement( inputs=None, sequence=[ measurement.sleep_function(0.05), self.axis.follow_move], update=measurement.bokeh_update_function( self.update, self.doc), init=call, finish=measurement.bokeh_no_input_finish_function( self.restore, self.doc), save_output=False) # change button to stop if requested btn.label = 'stop' btn.button_type = 'danger' # start movement self.movement.start()
def start(self): # in case this measurement is running, stop it if self.running.am_i_running(self): self.stop() # in case a different measurement is running, do nothing elif self.running.is_running(): pass else: # set running indicator to block double readout self.running.now_running(self) # bin is wrong for spectrum if type(self) == continuous_acquisition_gui: self.roi.xbin = 1 self.roi.ybin = 1 self.startBtn.label = 'Stop' self.startBtn.button_type = 'danger' self.integration = float(self.integrationInput.value) * 1000. self.cont_camera_readout = measurement.measurement( inputs=None, sequence=[self.sensor.frame], update=measurement.bokeh_update_function( self.update, self.doc), init=partial(self.sensor.setup, integration=self.integration, roi=self.roi), finish=None, save_output=False) self.cont_camera_readout.start()
def start(self): self.cont_pressure_readout = measurement.measurement( inputs=None, sequence=[ self.pressure_controller.frame, measurement.sleep_function(0.2)], update=measurement.bokeh_update_function(self.update, self.doc), init=None, finish=None, save_output=False) self.cont_pressure_readout.start()
def start(self): # in case this measurement is running, stop it if self.running.am_i_running(self): self.stop() # in case a different measurement is running, do nothing elif self.running.is_running(): pass else: # set running indicator to block double readout self.running.now_running(self) self.startBtn.label = 'Stop' self.startBtn.button_type = 'danger' # integration time self.integration = float(self.integrationInput.value) self.order = int(self.orderInput.value) self.timeconstant = float(self.timeconstantInput.value) # delay vector setup if self.scanTableBtn.active: self.delays = np.loadtxt('scantable.txt') else: self.delays = np.arange(float(self.startDelInput.value), float(self.stopDelInput.value), float(self.stepSizeInput.value)) self.piezo_values = (float(self.zeroDelInput.value) + 3.0e8 * self.delays*1.0e-15 / 2. * 1e6) # scan start time for save name self.now = datetime.datetime.now() # measurement thread self.measurement = measurement.measurement( inputs=[[pv, None] for pv in self.piezo_values], sequence=[ measurement.single_input_sequence_function( self.delayer.abs_move), self.lockin_digitizer.frame], update=measurement.bokeh_update_function( self.update, self.doc), init=partial( self.lockin_digitizer.setup, integration=self.integration, timeconstant=self.timeconstant, order=self.order), finish=measurement.bokeh_no_input_finish_function( self.stop, self.doc), save_output=True) self.measurement.start()
def start(self): # in case this measurement is running, stop it if self.running.am_i_running(self): self.stop() # in case a different measurement is running, do nothing elif self.running.is_running(): pass else: # set running indicator to block double readout self.running.now_running(self) # initialize data array self.spectrum = 0 self.subtractsweeps = 0 self.subtractstarts = 0 self.subtractruntime = 0 self.subtractspectrum = 0 self.lastspectrum = 0 # switch start to stop button self.startBtn.label = 'Stop' self.startBtn.button_type = 'danger' # set integration time self.integration = float(self.integrationInput.value) * 1000. # create the measurment thread self.measurement = measurement.measurement( inputs=None, sequence=[ self.tof_digitizer.readout_continuous, measurement.sleep_function(1) ], update=measurement.bokeh_update_function( self.update, self.doc), init=self.tof_digitizer.start_continuous, finish=lambda in1, in2: self.tof_digitizer.stop(), save_output=False) # start the measurment thread self.measurement.start()