def on_startStopButton_clicked(self): if self.datataker.isStopped(): self.t_start = time.time() #open file, write header self.out_file = readconfigfile.open_data_file() self.out_file.write('Starting time: ' + str(self.t_start) + '\n') name_list = [] type_list = [] dev_list = [] param_list = [] for lineEdit, cb_Type, cb_Instr, cb_Param in zip( self.lineEdit_Name, self.comboBox_Type, self.comboBox_Instr, self.comboBox_Param): lineEdit.setReadOnly(True) name = str(lineEdit.text()) if not name.isspace(): name_list.append(name) type_list.append(str(cb_Type.currentText())) dev_list.append(str(cb_Instr.currentText())) param_list.append(str(cb_Param.currentText())) else: name_list.append("None") type_list.append("None") dev_list.append("None") param_list.append("None") # idx = size(name_list) - 1 # while name_list[idx] == 'None': # name_list.pop() # type_list.pop() # dev_list.pop() # param_list.pop() # idx -=1 for name, line in zip (name_list, self.ax.lines): line.set_label(name) stri = str(name_list).strip('[]') print stri self.out_file.write(stri + '\n') #type_list = [str(comboBox.currentText()) for comboBox in self.comboBox_Type] #dev_list = [str(comboBox.currentText()) for comboBox in self.comboBox_Instr] #param_list = [str(comboBox.currentText()) for comboBox in self.comboBox_Param] self.tabWidget.setCurrentIndex(1) self.datataker.initialize(name_list, type_list, dev_list, param_list) self.datataker.start() self.startStopButton.setText("Stop") else: self.datataker.stop() self.out_file.close() self.startStopButton.setText("Start")
[0,7,4, array([])], [0,6,5, array([])],[0,8,6, array([])]) #lakeshore = LS370.LS370('dev12') f_src = T344.T344('COM1', debug_mode) if using_magnet==True: magnet = IPS120.IPS120('dev3', debug_mode) magnet.unlock() magnet.hold() magnet.set_field_sweep_rate(FIELD_SWEEP_RATE) #open file, write header out_file = pyfile.open_data_file() t_start = time.time() out_file.write('#T_start = ' + str(t_start) + '\n') out_file.write('#NUM_POINTS = ' + str(NUM_POINTS) + '\n') out_file.write('#NUM_SAMPLES = ' + str(NUM_SAMPLES) + '\n') out_file.write('#NUM_DC_POINTS = ' + str(NUM_DC_POINTS) + '\n') out_file.write('#I_MEAS = ' + str(I_MEAS) + '\n') out_file.write('#Delta_R_scale = 1.0\n') out_file.write('#GAIN = ' + str(GAIN) + '\n') out_file.write('#CAL = 1.0\n') out_file.write('#CAL_ERR = 0.0\n') out_file.write('time field F1 F2 F3 PHASE OFFSET COIL_CURRENT SAMPLE_CURRENT X1 Y1 X2 Y2 X3 Y3\n') def auto_scale_y(data):