def on_btnStrt_clicked(self): # start preview logger.info("start previews") if self.ui.rdBtnIP.isChecked(): # imaging plane self.exp_system.turn_on_lamp() self.exp_system.set_superlum_off() self.ui.plotArea.figure.clear() self.imshow_axes = [None] self.imshow_plots = [None] self.timer = self.ui.plotArea.new_timer(self.REFRESH_INTERVAL, [(self.ip_image_grab, (), {})]) self.timer.start() else: # Fourier plane self.exp_system.turn_off_lamp() self.exp_system.superlum.set_hi_mode() self.exp_system.superlum.set_power_on() show_holo = self.ui.showHologramChkbox.isChecked() show_fft = self.ui.showFFTChkbox.isChecked() show_cropped = self.ui.showCroppedChkbox.isChecked() show_checkboxes = [show_holo, show_fft, show_cropped] self.show_selected = [] for idx, val in enumerate(self._PLOT_FP_IMAGES): if show_checkboxes[idx]: self.show_selected.append(val) if len(self.show_selected) == 0: self.show_errMsgBox("You need to show at least one image") self.ui.plotArea.figure.clear() self.imshow_axes = [None, None, None] self.imshow_plots = [None, None, None] self.timer = self.ui.plotArea.new_timer(self.REFRESH_INTERVAL, [(self.fp_image_grab, (), {})]) self.timer.start() set_ui_status(self.ui, 'preview') if self.ui.rdBtnFP.isChecked(): self.ui.gaussBlurChkbox.setEnabled(True)
def before_exp(self): set_ui_status(self.ui, 'measuring') if self.ui.monitorOffChkbox.isChecked(): self.switch_monitor(False) self.ui.lblCtrlStrtTimeTxt.setText(datetime.datetime.now().strftime( self._DATETIME_FORMAT)) self.ui.lblCtrlEndTimeTxt.setText('') self.exp_system.turn_off_lamp() self.exp_system.set_superlum_on()
def set_ui_enabled(self): if self.ui.rdBtnIP.isChecked(): set_ui_status(self.ui, 'enabledIP') else: set_ui_status(self.ui, 'enabledFP')
def on_rdBtnFP_toggled(self, checked): if checked: # if self.ui.rdBtnFP.isChecked(): set_ui_status(self.ui, 'enabledFP')
def on_btnDisableAll_clicked(self): logger.info('disable all') self.exp_system.disable() set_ui_status(self.ui, 'disabled')