def __init__(self, parent=None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas = FigureCanvas(self.ui.mplwidget.figure) self.canvas.setParent(self.ui.widget) # We need the toolbar widget for the canvas self.mpl_toolbar = NavigationToolbar(self.canvas, self.ui.widget) # Create the QVBoxLayout object and add the widget into the layout vbox = QVBoxLayout() # The matplotlib canvas vbox.addWidget(self.canvas) # The matplotlib toolbar vbox.addWidget(self.mpl_toolbar) self.ui.widget.setLayout(vbox) # Connect the mplwidget with canvas self.ui.mplwidget = self.canvas self.connect(self.ui.pushButton_browse, SIGNAL('clicked()'), self.Browse) self.connect(self.ui.pushButton_plot, SIGNAL('clicked()'), self.Plot) self.connect(self.ui.pushButton_show, SIGNAL('clicked()'), self.Show)
def __init__(self, parent=None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas = FigureCanvas(self.ui.mplwidget.figure) self.canvas.setParent(self.ui.widget) # We need the toolbar widget for the canvas self.mpl_toolbar = NavigationToolbar(self.canvas, self.ui.widget) # Create the QVBoxLayout object and add the widget into the layout vbox = QVBoxLayout() # The matplotlib canvas vbox.addWidget(self.canvas) # The matplotlib toolbar vbox.addWidget(self.mpl_toolbar) self.ui.widget.setLayout(vbox) # Connect the mplwidget with canvas self.ui.mplwidget = self.canvas self.reset_plot() self.connect(self.ui.pushButton_browse, SIGNAL('clicked()'), self.Browse) self.connect(self.ui.pushButton_change_name, SIGNAL('clicked()'), self.Change_name) self.connect(self.ui.pushButton_open, SIGNAL('clicked()'), self.Open) self.connect(self.ui.pushButton_Plot, SIGNAL('clicked()'), self.Plot_ready) self.connect(self.ui.pushButton_Next, SIGNAL('clicked()'), self.Next) self.connect(self.ui.pushButton_Previous, SIGNAL('clicked()'), self.Previous) self.connect(self.ui.pushButton_find, SIGNAL('clicked()'), self.Find) self.connect(self.ui.pushButton_modify, SIGNAL('clicked()'), self.Modify) self.connect(self.ui.pushButton_return, SIGNAL('clicked()'), self.Return) self.ui.pushButton_browse.setEnabled(True) self.modify = False self.first_round = True self.open_dir = '' self.open_files_number = 0 self.all_info = []
def __init__(self, parent = None): self.collect_data_thread = Collect_data() # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to self.ui # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) self.connect(self.ui.pushButton_update_1, SIGNAL('clicked()'), lambda : self.Update("visa1", self.ui.comboBox_visa_1)) self.connect(self.ui.pushButton_update_2, SIGNAL('clicked()'), lambda : self.Update("visa2", self.ui.comboBox_visa_2)) self.connect(self.ui.pushButton_update_3, SIGNAL('clicked()'), lambda : self.Update("visa3", self.ui.comboBox_visa_3)) self.connect(self.ui.pushButton_update_4, SIGNAL('clicked()'), lambda : self.Update("visa4", self.ui.comboBox_visa_4)) self.connect(self.ui.pushButton_update_5, SIGNAL('clicked()'), lambda : self.Update("visa5", self.ui.comboBox_visa_5)) self.connect(self.ui.pushButton_select_1, SIGNAL('clicked()'), lambda : self.Select("visa1", self.visa1, self.ui.comboBox_visa_1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_select_2, SIGNAL('clicked()'), lambda : self.Select("visa2", self.visa2, self.ui.comboBox_visa_2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_select_3, SIGNAL('clicked()'), lambda : self.Select("visa3", self.visa3, self.ui.comboBox_visa_3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_select_4, SIGNAL('clicked()'), lambda : self.Select("visa4", self.visa4, self.ui.comboBox_visa_4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_select_5, SIGNAL('clicked()'), lambda : self.Select("visa5", self.visa5, self.ui.comboBox_visa_5, self.ui.label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect(self.ui.pushButton_close_1, SIGNAL('clicked()'), lambda : self.Close("visa1", self.visa1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_close_2, SIGNAL('clicked()'), lambda : self.Close("visa2", self.visa2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_close_3, SIGNAL('clicked()'), lambda : self.Close("visa3", self.visa3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_close_4, SIGNAL('clicked()'), lambda : self.Close("visa4", self.visa4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_close_5, SIGNAL('clicked()'), lambda : self.Close("visa5", self.visa5, self.ui.label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect(self.ui.pushButton_Start, SIGNAL('clicked()'), self.start) self.connect(self.ui.pushButton_Stop, SIGNAL('clicked()'), self.collect_data_thread.stop) self.connect(self.ui.pushButton_Pause, SIGNAL('clicked()'), self.collect_data_thread.pause) self.connect(self.collect_data_thread, SIGNAL("curve_plot"), self.curvePlots_update) self.connect(self.collect_data_thread, SIGNAL("print"), self.Print_data) self.Update("visa1", self.ui.comboBox_visa_1) self.Update("visa2", self.ui.comboBox_visa_2) self.Update("visa3", self.ui.comboBox_visa_3) self.Update("visa4", self.ui.comboBox_visa_4) self.Update("visa5", self.ui.comboBox_visa_5) self.curve_1 = self.make_curveWidgets(self.ui.curvewidget_1, "b", titles = ["Plot 1", "X (x)", "Y (y)"]) self.curve_2 = self.make_curveWidgets(self.ui.curvewidget_2, "b", titles = ["Plot 2", "X (x)", "Y (y)"]) self.curve_3 = self.make_curveWidgets(self.ui.curvewidget_3, "b", titles = ["Plot 3", "X (x)", "Y (y)"]) self.curve_4 = self.make_curveWidgets(self.ui.curvewidget_4, "b", titles = ["Plot 4", "X (x)", "Y (y)"]) self.visa1 = None self.visa2 = None self.visa3 = None self.visa4 = None self.visa5 = None
def __init__(self, parent = None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas = FigureCanvas(self.ui.mplwidget.figure) self.canvas.setParent(self.ui.widget) # We need the toolbar widget for the canvas self.mpl_toolbar = NavigationToolbar(self.canvas, self.ui.widget) # Create the QVBoxLayout object and add the widget into the layout vbox = QVBoxLayout() # The matplotlib canvas vbox.addWidget(self.canvas) # The matplotlib toolbar vbox.addWidget(self.mpl_toolbar) self.ui.widget.setLayout(vbox) # Connect the mplwidget with canvas self.ui.mplwidget = self.canvas self.connect(self.ui.pushButton_browse, SIGNAL('clicked()'), self.Browse) self.connect(self.ui.pushButton_plot, SIGNAL('clicked()'), self.Plot) self.connect(self.ui.pushButton_openfile, SIGNAL('clicked()'), self.OpenFile) self.connect(self.ui.radioButton_qmd, SIGNAL('clicked()'), self.Choose1) self.connect(self.ui.radioButton_ppms, SIGNAL('clicked()'), self.Choose1) self.connect(self.ui.radioButton_other, SIGNAL('clicked()'), self.Choose1) self.connect(self.ui.pushButton_choose2, SIGNAL('clicked()'), self.Choose2) self.connect(self.ui.pushButton_recent, SIGNAL('clicked()'), self.Open_Recent) self.first_round = True self.open_dir = '' self.open_files_number = 0 self.all_info = []
def __init__(self, parent=None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas_general = FigureCanvas(self.ui.mplwidget_general.figure) self.canvas_general.setParent(self.ui.widget_general) # We need the toolbar widget for the canvas self.mpl_toolbar_general = NavigationToolbar(self.canvas_general, self.ui.widget_general) self.canvas_import = FigureCanvas(self.ui.mplwidget_import.figure) self.canvas_import.setParent(self.ui.widget_import) # This is the toolbar widget for the import canvas self.mpl_toolbar_import = NavigationToolbar(self.canvas_import, self.ui.widget_import) self.canvas_analysis = FigureCanvas(self.ui.mplwidget_analysis.figure) self.canvas_analysis.setParent(self.ui.widget_analysis) # This is the toolbar widget for the scan canvas self.mpl_toolbar_analysis = NavigationToolbar(self.canvas_analysis, self.ui.widget_analysis) self.canvas_ct_analysis = FigureCanvas( self.ui.mplwidget_ct_analysis.figure) self.canvas_ct_analysis.setParent(self.ui.widget_ct_analysis) # This is the toolbar widget for the scan canvas self.mpl_toolbar_ct_analysis = NavigationToolbar( self.canvas_ct_analysis, self.ui.widget_ct_analysis) self.canvas_vt_analysis = FigureCanvas( self.ui.mplwidget_vt_analysis.figure) self.canvas_vt_analysis.setParent(self.ui.widget_vt_analysis) # This is the toolbar widget for the scan canvas self.mpl_toolbar_vt_analysis = NavigationToolbar( self.canvas_vt_analysis, self.ui.widget_vt_analysis) # Create the QVBoxLayout object and add the widget into the layout vbox_general = QVBoxLayout() # The matplotlib canvas vbox_general.addWidget(self.canvas_general) # The matplotlib toolbar vbox_general.addWidget(self.mpl_toolbar_general) self.ui.widget_general.setLayout(vbox_general) # Create the QVBoxLayout object and add the widget into the Layout vbox_import = QVBoxLayout() # The matplotlib canvas vbox_import.addWidget(self.canvas_import) # The matplotlib toolbar vbox_import.addWidget(self.mpl_toolbar_import) self.ui.widget_import.setLayout(vbox_import) # Create the QVBoxLayout object and add the widget into the Layout vbox_analysis = QVBoxLayout() # The matplotlib canvas vbox_analysis.addWidget(self.canvas_analysis) # The matplotlib toolbar vbox_analysis.addWidget(self.mpl_toolbar_analysis) self.ui.widget_analysis.setLayout(vbox_analysis) # Create the QVBoxLayout object and add the widget into the Layout vbox_ct_analysis = QVBoxLayout() # The matplotlib canvas vbox_ct_analysis.addWidget(self.canvas_ct_analysis) # The matplotlib toolbar vbox_ct_analysis.addWidget(self.mpl_toolbar_ct_analysis) self.ui.widget_ct_analysis.setLayout(vbox_ct_analysis) # Create the QVBoxLayout object and add the widget into the Layout vbox_vt_analysis = QVBoxLayout() # The matplotlib canvas vbox_vt_analysis.addWidget(self.canvas_vt_analysis) # The matplotlib toolbar vbox_vt_analysis.addWidget(self.mpl_toolbar_vt_analysis) self.ui.widget_vt_analysis.setLayout(vbox_vt_analysis) # Connect the mplwidget with canvas self.ui.mplwidget_general = self.canvas_general self.ui.mplwidget_import = self.canvas_import self.ui.mplwidget_analysis = self.canvas_analysis self.ui.mplwidget_ct_analysis = self.canvas_ct_analysis self.ui.mplwidget_vt_analysis = self.canvas_vt_analysis self.connect(self.ui.actionArray_Builder, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(0)) self.connect(self.ui.actionKeithley_Single_scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(1)) self.connect(self.ui.actionAgilent_Single_scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(2)) self.connect(self.ui.actionLockIn_Single_scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(3)) self.connect(self.ui.actionResonant_Single_scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(4)) self.Array_Builder_programs = Array_Builder(main=self, ui=self.ui) # Connect buttons in the General Array tab # self.connect(self.ui.pushButton_plot, SIGNAL('clicked()'), self.Array_Builder_programs.Plot_general) # self.connect(self.ui.pushButton_clear, SIGNAL('clicked()'), self.Array_Builder_programs.Clear) # self.connect(self.ui.pushButton_save, SIGNAL('clicked()'), self.Array_Builder_programs.Save) # self.connect(self.ui.pushButton_browse_save, SIGNAL('clicked()'), self.Array_Builder_programs.Browse_save) self.Keithley_programs = Keithley(main=self, ui=self.ui) self.Keithley_programs.Refresh_visa() # Connect buttons in the Keithely tab # self.connect(self.ui.pushButton_browse_keithley, SIGNAL('clicked()'), self.Keithley_programs.Browse_keithley) # self.connect(self.ui.pushButton_import_keithley, SIGNAL('clicked()'), self.Keithley_programs.Import_keithley) # self.connect(self.ui.pushButton_close_keithley, SIGNAL('clicked()'), self.Keithley_programs.Close_keithley) # self.connect(self.ui.pushButton_select_keithley, SIGNAL('clicked()'), self.Keithley_programs.Select_keithley) # self.connect(self.ui.pushButton_scan_keithley, SIGNAL('clicked()'), self.Keithley_programs.Scan_keithley) # self.connect(self.ui.pushButton_pause_keithley, SIGNAL('clicked()'), self.Keithley_programs.collect_data_thread.pause) # self.connect(self.ui.pushButton_stop_keithley, SIGNAL('clicked()'), self.Keithley_programs.collect_data_thread.stop) # self.connect(self.ui.pushButton_clear_keithley, SIGNAL('clicked()'), self.Keithley_programs.collect_data_thread.Clear_keithley) # self.connect(self.ui.pushButton_copy_keithley, SIGNAL('clicked()'), self.CopyData) # self.connect(self.ui.pushButton_fit_keithley, SIGNAL('clicked()'), self.Keithley_programs.collect_data_thread.Fit) # self.connect(self.ui.radioButton_voltage_keithley, SIGNAL("clicked()"), lambda : self.ui.tabWidget_scan_keithley.setCurrentIndex(0)) # self.connect(self.ui.radioButton_timescan_keithley, SIGNAL("clicked()"), self.Keithley_programs.collect_data_thread.Pre_MPL_Plot) # self.connect(self.ui.radioButton_stepscan_keithley, SIGNAL("clicked()"), self.Keithley_programs.collect_data_thread.Pre_MPL_Plot) # self.connect(self.Keithley_programs.collect_data_thread, SIGNAL("plot"), self.Keithley_programs.Plot_data) # self.connect(self.Keithley_programs.collect_data_thread, SIGNAL("mpl_plot"), self.Keithley_programs.Plot_analysis) # self.connect(self.Keithley_programs.collect_data_thread, SIGNAL("data_available"), self.Keithley_programs.Pre_save) # self.connect(self.Keithley_programs.collect_data_thread, SIGNAL("clear_plot"), self.Keithley_programs.Clear_plot) self.Values = [] self.Step = [] self.Peak = [] self.round = 0 self.new_start = 0 self.ui.lineEdit_directory_save.setText(os.getcwd()) #Agilent_Yokogawa self.canvas_import_ay = FigureCanvas( self.ui.mplwidget_import_ay.figure) self.canvas_import_ay.setParent(self.ui.widget_import_ay) # This is the toolbar widget for the import canvas self.mpl_toolbar_import_ay = NavigationToolbar( self.canvas_import_ay, self.ui.widget_import_ay) #Agilent_Yokogawa self.canvas_analysis_ay = FigureCanvas( self.ui.mplwidget_analysis_ay.figure) self.canvas_analysis_ay.setParent(self.ui.widget_analysis_ay) # This is the toolbar widget for the import canvas self.mpl_toolbar_analysis_ay = NavigationToolbar( self.canvas_analysis_ay, self.ui.widget_analysis_ay) # Create the QVBoxLayout object and add the widget into the Layout vbox_import_ay = QVBoxLayout() # The matplotlib canvas vbox_import_ay.addWidget(self.canvas_import_ay) # The matplotlib toolbar vbox_import_ay.addWidget(self.mpl_toolbar_import_ay) self.ui.widget_import_ay.setLayout(vbox_import_ay) # Create the QVBoxLayout object and add the widget into the Layout vbox_analysis_ay = QVBoxLayout() # The matplotlib canvas vbox_analysis_ay.addWidget(self.canvas_analysis_ay) # The matplotlib toolbar vbox_analysis_ay.addWidget(self.mpl_toolbar_analysis_ay) self.ui.widget_analysis_ay.setLayout(vbox_analysis_ay) # Connect the mplwidget with canvass self.ui.mplwidget_import_ay = self.canvas_import_ay self.ui.mplwidget_analysis_ay = self.canvas_analysis_ay # Connect buttons in the Agilent Yokogawa tab self.Agilent_Yokogawa_programs = Agilent_Yokogawa(self.ui) self.connect(self.ui.startButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.start) self.connect(self.ui.stopButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.stop) #self.connect(self.action_timer, SIGNAL("timeout()"), self.Agilent_Yokogawa_programs.action) self.connect(self.ui.pushButton_browse_ay, SIGNAL('clicked()'), self.Agilent_Yokogawa_programs.Browse_ay) self.connect(self.ui.pushButton_import_ay, SIGNAL('clicked()'), self.Agilent_Yokogawa_programs.Import_ay) self.connect(self.ui.pushButton_copy_ay, SIGNAL('clicked()'), self.Copy_ay) self.connect(self.ui.selectVisaButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.select_visa) self.connect(self.ui.updateVisaButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.update_visa) self.connect(self.ui.closeVisaButton0, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.close_visa0) self.connect(self.ui.closeVisaButton1, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.close_visa1) self.connect(self.Agilent_Yokogawa_programs.collectDataThread, SIGNAL("plot"), self.Agilent_Yokogawa_programs.plotData) self.connect(self.Agilent_Yokogawa_programs.collectDataThread, SIGNAL("analyse"), self.Agilent_Yokogawa_programs.analyse) self.connect(self.ui.browseButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.browse) self.connect(self.ui.saveButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.save) self.ui.mplwidget_analysis_ay.figure.canvas.mpl_connect( 'button_release_event', self.Agilent_Yokogawa_programs.slope) #Connects the buttons in the Resonant Sweeper Tab #self.Resonant_programs = Resonance_Sweep(main = self, ui = self.ui) self.Resonant_Sweeper_functions = Resonance_Sweep(main=self, ui=self.ui) self.Resonant_Sweeper_functions.update_visa() self.connect(self.ui.pushButtonSelectRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.choose_visa) self.connect(self.ui.pushButtonUpdateRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.update_visa) self.connect(self.ui.pushButtonSourceSelectRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.choose_visa) self.connect(self.ui.pushButtonSourceUpdateRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.update_visa) self.connect(self.ui.pushButtonStartRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.start) self.connect(self.ui.pushButtonStopRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.stop) self.connect(self.ui.pushButtonPauseRS, SIGNAL("clicked()"), self.Resonant_Sweeper_functions.collectDataThread.pause) self.connect(self.Resonant_Sweeper_functions.collectDataThread, SIGNAL("plot"), self.Resonant_Sweeper_functions.plotData) self.connect(self.Resonant_Sweeper_functions.collectDataThread, SIGNAL("stop"), self.Resonant_Sweeper_functions.stop) #Connects the buttons in the Lock-In Program Tab self.Lock_In_programs = Lock_In(main=self, ui=self.ui) self.connect(self.ui.pushButtonSelectLI, SIGNAL("clicked()"), self.Lock_In_programs.choose_visa) self.connect(self.ui.pushButtonUpdateLI, SIGNAL("clicked()"), self.Lock_In_programs.update_visa) self.connect(self.ui.pushButtonStartLI, SIGNAL("clicked()"), self.Lock_In_programs.start) self.connect(self.ui.pushButtonStopLI, SIGNAL("clicked()"), self.Lock_In_programs.stop) self.connect(self.ui.pushButtonStopLI, SIGNAL("clicked()"), self.Lock_In_programs.final_append) self.connect(self.ui.pushButtonPauseLI, SIGNAL("clicked()"), self.Lock_In_programs.append_parameters) self.connect(self.ui.pushButtonPauseLI, SIGNAL("clicked()"), self.Lock_In_programs.collectDataThread.pause) self.connect(self.ui.pushButtonPauseLI, SIGNAL('clicked()'), self.Lock_In_programs.collectDataThread.appendSessionData) self.connect(self.ui.pushButtonStopLI, SIGNAL('clicked()'), self.Lock_In_programs.collectDataThread.appendSessionData) self.connect(self.ui.pushButtonPauseLI, SIGNAL('clicked()'), self.Lock_In_programs.tableAppend) self.connect(self.ui.pushButtonStopLI, SIGNAL('clicked()'), self.Lock_In_programs.tableAppend) self.connect(self.ui.pushButtonSaveLI, SIGNAL('clicked()'), self.Lock_In_programs.save) self.connect(self.ui.pushButtonBrowseLI, SIGNAL('clicked()'), self.Lock_In_programs.browse) self.connect(self.ui.pushButtonFolderSelectLI, SIGNAL('clicked()'), self.Lock_In_programs.select_name) self.connect(self.ui.radioButtonDateTimeLI, SIGNAL('clicked()'), self.Lock_In_programs.save_name) self.connect(self.ui.radioButtonCustomLI, SIGNAL('clicked()'), self.Lock_In_programs.save_name) self.connect(self.ui.radioButton_csvLI, SIGNAL('clicked()'), self.Lock_In_programs.save_type) self.connect(self.ui.radioButton_txtLI, SIGNAL('clicked()'), self.Lock_In_programs.save_type) self.connect(self.Lock_In_programs.collectDataThread, SIGNAL("plot"), self.Lock_In_programs.plotData) self.connect(self.Lock_In_programs.collectDataThread, SIGNAL("Begin_Save"), self.Lock_In_programs.pre_save)
def __init__(self, parent=None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # When you open the window, the visas get refreshed self.refresh_visa() # This is to check whether user click start before they save self.data_check = False # We set up a QTimer variable called collect_timer. # It runs as a countdown clock that runs in the background and emits a timeout signal when it reaches 0. # Because this variable, we do not to use a for loop function for collecting and timing since the for loop can not be stopped in progress and can cause program frozen. # Also it allows the rest of the commands to run normally self.collect_timer = QTimer() # Set up guiqwt plot self.curve_item = make.curve([], [], color='r') self.ui.curvewidgetPlot.plot.add_item(self.curve_item) self.ui.curvewidgetPlot.plot.set_antialiasing(True) self.ui.curvewidgetPlot.plot.set_titles( "Agilent 34460A Digit Multimeter", "Time (s)", "Y-Axis") # The following connects the signals sent from an action on the GUI to a function that does something # When the button is clicked, it does the corresponding function self.connect(self.ui.pushButton_Select_Visa, SIGNAL("clicked()"), self.choose_visa) self.connect(self.ui.pushButton_Start, SIGNAL("clicked()"), self.start) self.connect(self.ui.pushButton_Stop, SIGNAL("clicked()"), self.stop) self.connect(self.ui.pushButton_Refresh, SIGNAL("clicked()"), self.refresh_visa) # This works as a clock running in the background, different functions can use this clock at the same time # It is better than .sleep() function because during the sleep time, the whole program is frozen and cannot do anything else # Everytime collect_timer gets the time_step, it sends a "timeout()" signal to the device and runs the collect function self.connect(self.collect_timer, SIGNAL("timeout()"), self.collect) self.connect(self.ui.comboBox_Meas_Type, SIGNAL("clicked()"), self.meas_type) # To give a click signal to the checkBox self.connect(self.ui.checkBox_Continue, SIGNAL("clicked()"), self.continue_check) # I add a slect button for the measurement type # Only if you click the button, the computer knows your measurement type # It shows the current measurement type and warning at the same time self.connect(self.ui.pushButton_Select_Measurement, SIGNAL("clicked()"), self.choose_meas) # To save the data self.connect(self.ui.pushButton_Save, SIGNAL("clicked()"), self.save) # To see and change the directory self.connect(self.ui.pushButton_Browse, SIGNAL("clicked()"), self.browse) # To choose a name folder to save file self.connect(self.ui.pushButton_Select_Directory, SIGNAL("clicked()"), self.select_directory) # To select name for the file, date and time or custom name entered by the user self.connect(self.ui.radioButton_Timename, SIGNAL("clicked()"), self.select_name) self.connect(self.ui.radioButton_Custom_Name, SIGNAL("clicked()"), self.select_name) # To select a file type, either .csv or .txt self.connect(self.ui.radioButton_csv, SIGNAL('clicked()'), self.select_type) self.connect(self.ui.radioButton_csv, SIGNAL('clicked()'), self.select_type)
def __init__(self, parent=None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas_general = FigureCanvas(self.ui.mplwidget_general.figure) self.canvas_general.setParent(self.ui.widget_general) # We need the toolbar widget for the canvas self.mpl_toolbar_general = NavigationToolbar(self.canvas_general, self.ui.widget_general) # Create the QVBoxLayout object and add the widget into the layout vbox_general = QVBoxLayout() # The matplotlib canvas vbox_general.addWidget(self.canvas_general) # The matplotlib toolbar vbox_general.addWidget(self.mpl_toolbar_general) self.ui.widget_general.setLayout(vbox_general) # Connect the mplwidget with canvas self.ui.mplwidget_general = self.canvas_general self.connect(self.ui.actionArray_Builder, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(0)) self.connect(self.ui.actionKeithley_Single_scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(1)) self.connect(self.ui.actionAgilent_Single_scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(2)) self.connect(self.ui.actionKeithley_Stepper_Single_Scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(3)) self.connect(self.ui.actionKeithley_Gate_Sweep, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(4)) self.connect(self.ui.actionLockIn_Single_Scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(5)) self.connect(self.ui.actionResonant_Single_Scan, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(6)) self.connect(self.ui.actionSee_Visa_List, SIGNAL('triggered()'), lambda: self.ui.stackedWidget.setCurrentIndex(7)) self.List_Visas = List_Visas(main=self, ui=self.ui) self.Array_Builder_programs = Array_Builder(main=self, ui=self.ui) self.Keithley_programs = Keithley(main=self, ui=self.ui) self.Keithley_programs.Refresh_visa() self.Values = [] self.Step = [] self.Peak = [] self.round = 0 self.new_start = 0 self.ui.lineEdit_directory_save.setText(os.getcwd()) self.Agilent_Yokogawa_programs = Agilent_Yokogawa(main=self, ui=self.ui) self.Resonant_Sweeper_functions = Resonance_Sweep(main=self, ui=self.ui) self.Resonant_Sweeper_functions.update_visa() self.Lock_In_programs = Lock_In(main=self, ui=self.ui) self.KeithleyGateSweep = KeithleyGateSweep(main=self, ui=self.ui)
def __init__(self, parent = None): self.collect_data_thread = Collect_data() # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to self.ui # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) self.connect(self.ui.pushButton_update_1, SIGNAL('clicked()'), lambda : self.Update("visa1", self.ui.comboBox_visa_1)) self.connect(self.ui.pushButton_update_2, SIGNAL('clicked()'), lambda : self.Update("visa2", self.ui.comboBox_visa_2)) self.connect(self.ui.pushButton_update_3, SIGNAL('clicked()'), lambda : self.Update("visa3", self.ui.comboBox_visa_3)) self.connect(self.ui.pushButton_update_4, SIGNAL('clicked()'), lambda : self.Update("visa4", self.ui.comboBox_visa_4)) self.connect(self.ui.pushButton_update_5, SIGNAL('clicked()'), lambda : self.Update("visa5", self.ui.comboBox_visa_5)) self.connect(self.ui.pushButton_update_6, SIGNAL('clicked()'), lambda : self.Update("visa6", self.ui.comboBox_visa_6)) self.connect(self.ui.pushButton_update_7, SIGNAL('clicked()'), lambda : self.Update("visa7", self.ui.comboBox_visa_7)) self.connect(self.ui.pushButton_update_8, SIGNAL('clicked()'), lambda : self.Update("visa8", self.ui.comboBox_visa_8)) self.connect(self.ui.pushButton_update_9, SIGNAL('clicked()'), lambda : self.Update("visa9", self.ui.comboBox_visa_9)) self.connect(self.ui.pushButton_update_10, SIGNAL('clicked()'), lambda : self.Update("visa10", self.ui.comboBox_visa_10)) self.connect(self.ui.pushButton_select_1, SIGNAL('clicked()'), lambda : self.Select("visa1", self.visa1, self.ui.comboBox_visa_1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_select_2, SIGNAL('clicked()'), lambda : self.Select("visa2", self.visa2, self.ui.comboBox_visa_2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_select_3, SIGNAL('clicked()'), lambda : self.Select("visa3", self.visa3, self.ui.comboBox_visa_3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_select_4, SIGNAL('clicked()'), lambda : self.Select("visa4", self.visa4, self.ui.comboBox_visa_4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_select_5, SIGNAL('clicked()'), lambda : self.Select("visa5", self.visa5, self.ui.comboBox_visa_5, self.ui.label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect(self.ui.pushButton_select_6, SIGNAL('clicked()'), lambda : self.Select("visa6", self.visa6, self.ui.comboBox_visa_6, self.ui.label_visa_6, [self.ui.pushButton_select_6, self.ui.pushButton_close_6])) self.connect(self.ui.pushButton_select_7, SIGNAL('clicked()'), lambda : self.Select("visa7", self.visa7, self.ui.comboBox_visa_7, self.ui.label_visa_7, [self.ui.pushButton_select_7, self.ui.pushButton_close_7])) self.connect(self.ui.pushButton_select_8, SIGNAL('clicked()'), lambda : self.Select("visa8", self.visa8, self.ui.comboBox_visa_8, self.ui.label_visa_8, [self.ui.pushButton_select_8, self.ui.pushButton_close_8])) self.connect(self.ui.pushButton_select_9, SIGNAL('clicked()'), lambda : self.Select("visa9", self.visa9, self.ui.comboBox_visa_9, self.ui.label_visa_9, [self.ui.pushButton_select_9, self.ui.pushButton_close_9])) self.connect(self.ui.pushButton_select_10, SIGNAL('clicked()'), lambda : self.Select("visa10", self.visa10, self.ui.comboBox_visa_10, self.ui.label_visa_10, [self.ui.pushButton_select_10, self.ui.pushButton_close_10])) self.connect(self.ui.pushButton_close_1, SIGNAL('clicked()'), lambda : self.Close("visa1", self.visa1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_close_2, SIGNAL('clicked()'), lambda : self.Close("visa2", self.visa2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_close_3, SIGNAL('clicked()'), lambda : self.Close("visa3", self.visa3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_close_4, SIGNAL('clicked()'), lambda : self.Close("visa4", self.visa4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_close_5, SIGNAL('clicked()'), lambda : self.Close("visa5", self.visa5, self.ui.label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect(self.ui.pushButton_close_6, SIGNAL('clicked()'), lambda : self.Close("visa6", self.visa6, self.ui.label_visa_6, [self.ui.pushButton_select_6, self.ui.pushButton_close_6])) self.connect(self.ui.pushButton_close_7, SIGNAL('clicked()'), lambda : self.Close("visa7", self.visa7, self.ui.label_visa_7, [self.ui.pushButton_select_7, self.ui.pushButton_close_7])) self.connect(self.ui.pushButton_close_8, SIGNAL('clicked()'), lambda : self.Close("visa8", self.visa8, self.ui.label_visa_8, [self.ui.pushButton_select_8, self.ui.pushButton_close_8])) self.connect(self.ui.pushButton_close_9, SIGNAL('clicked()'), lambda : self.Close("visa9", self.visa9, self.ui.label_visa_9, [self.ui.pushButton_select_9, self.ui.pushButton_close_9])) self.connect(self.ui.pushButton_close_10, SIGNAL('clicked()'), lambda : self.Close("visa10", self.visa10, self.ui.label_visa_10, [self.ui.pushButton_select_10, self.ui.pushButton_close_10])) self.connect(self.ui.pushButton_Start, SIGNAL('clicked()'), self.start) self.connect(self.ui.pushButton_Stop, SIGNAL('clicked()'), self.collect_data_thread.stop) self.connect(self.ui.pushButton_Pause, SIGNAL('clicked()'), self.collect_data_thread.pause) self.connect(self.collect_data_thread, SIGNAL("curve_plot"), self.curvePlots_update) self.connect(self.collect_data_thread, SIGNAL("print"), self.Print_data) self.connect(self.ui.textEdit, SIGNAL('textChanged ()'), lambda : self.start_font("C")) self.Update("visa1", self.ui.comboBox_visa_1) self.Update("visa2", self.ui.comboBox_visa_2) self.Update("visa3", self.ui.comboBox_visa_3) self.Update("visa4", self.ui.comboBox_visa_4) self.Update("visa5", self.ui.comboBox_visa_5) self.Update("visa6", self.ui.comboBox_visa_6) self.Update("visa7", self.ui.comboBox_visa_7) self.Update("visa8", self.ui.comboBox_visa_8) self.Update("visa9", self.ui.comboBox_visa_9) self.Update("visa10", self.ui.comboBox_visa_10) self.curve_1 = self.make_curveWidgets(self.ui.curvewidget_1, "r", "black", titles = ["Plot 1", "X (x)", "Y (y)"]) self.curve_2 = self.make_curveWidgets(self.ui.curvewidget_2, "r", "black", titles = ["Plot 2", "X (x)", "Y (y)"]) self.curve_3 = self.make_curveWidgets(self.ui.curvewidget_3, "r", "black", titles = ["Plot 3", "X (x)", "Y (y)"]) self.curve_4 = self.make_curveWidgets(self.ui.curvewidget_4, "r", "black", titles = ["Plot 4", "X (x)", "Y (y)"]) self.curve_5 = self.make_curveWidgets(self.ui.curvewidget_5, "r", "black", titles = ["Plot 5", "X (x)", "Y (y)"]) self.curve_6 = self.make_curveWidgets(self.ui.curvewidget_6, "r", "black", titles = ["Plot 6", "X (x)", "Y (y)"]) self.curve_7 = self.make_curveWidgets(self.ui.curvewidget_7, "r", "black", titles = ["Plot 7", "X (x)", "Y (y)"]) self.curve_8 = self.make_curveWidgets(self.ui.curvewidget_8, "r", "black", titles = ["Plot 8", "X (x)", "Y (y)"]) self.curve_9 = self.make_curveWidgets(self.ui.curvewidget_9, "r", "black", titles = ["Plot 9", "X (x)", "Y (y)"]) self.curve_10 = self.make_curveWidgets(self.ui.curvewidget_10, "r", "black", titles = ["Plot 10", "X (x)", "Y (y)"]) self.curve_11 = self.make_curveWidgets(self.ui.curvewidget_11, "r", "black", titles = ["Plot 11", "X (x)", "Y (y)"]) self.curve_12 = self.make_curveWidgets(self.ui.curvewidget_12, "r", "black", titles = ["Plot 12", "X (x)", "Y (y)"]) self.ui.mplwidget_1 = self.make_mplToolBar(self.ui.mplwidget_1, self.ui.widget_1) self.ui.mplwidget_2 = self.make_mplToolBar(self.ui.mplwidget_2, self.ui.widget_2) self.ui.mplwidget_3 = self.make_mplToolBar(self.ui.mplwidget_3, self.ui.widget_3) self.ui.mplwidget_4 = self.make_mplToolBar(self.ui.mplwidget_4, self.ui.widget_4) self.visa1 = None self.visa2 = None self.visa3 = None self.visa4 = None self.visa5 = None self.visa6 = None self.visa7 = None self.visa8 = None self.visa9 = None self.visa10 = None # Set the visa names of the tabWidget # font = QFont() # font.setPointSize(8) # self.ui.tabWidget_visa.setFont(font) # self.ui.tabWidget_visa.setTabText(0, "Visa Name 1") # self.ui.tabWidget_visa.setTabText(1, "Visa Name 2") # self.ui.tabWidget_visa.setTabText(2, "Visa Name 3") # self.ui.tabWidget_visa.setTabText(3, "Visa Name 4") # self.ui.tabWidget_visa.setTabText(4, "Visa Name 5") # self.ui.tabWidget_visa.setTabText(5, "Visa Name 6") # self.ui.tabWidget_visa.setTabText(6, "Visa Name 7") # self.ui.tabWidget_visa.setTabText(7, "Visa Name 8") # self.ui.tabWidget_visa.setTabText(8, "Visa Name 9") # self.ui.tabWidget_visa.setTabText(8, "Visa Name 10") # Input parameters by string # Remember to keep the last one as "Comments: ..." so that the program could see that as an end. self.input_string = [] # self.input_string.append("00 Parameter: 1\n") # self.input_string.append("01 Parameter: 1\n") # self.input_string.append("02 Parameter: 1\n") # self.input_string.append("03 Parameter: 1\n") # self.input_string.append("04 Parameter: 1\n") # self.input_string.append("05 Parameter: 1\n") # self.input_string.append("06 Parameter: 1\n") # self.input_string.append("07 Parameter: 1\n") # self.input_string.append("08 Parameter: 1\n") # self.input_string.append("09 Parameter: 1\n") # self.input_string.append("10 Parameter: 1\n") # self.input_string.append("11 Parameter: 1\n") # self.input_string.append("12 Parameter: 1\n") # self.input_string.append("13 Comments: ") self.start_font("C") try: file_par = open("parameters.txt", "r") input_string_print = file_par.read() file_par.close() except: input_string_print = "" for st_i in self.input_string: input_string_print = input_string_print + st_i font = QFont() font.setPointSize(8) self.ui.textEdit.setFont(font) self.ui.textEdit.setText(input_string_print) self.inputted_data = [] self.array_sweep = []
def __init__(self, parent = None): self.collect_data_thread = Collect_data() # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to self.ui # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) self.connect(self.ui.pushButton_update_1, SIGNAL('clicked()'), lambda : self.Update("visa1", self.ui.comboBox_visa_1)) self.connect(self.ui.pushButton_update_2, SIGNAL('clicked()'), lambda : self.Update("visa2", self.ui.comboBox_visa_2)) self.connect(self.ui.pushButton_update_3, SIGNAL('clicked()'), lambda : self.Update("visa3", self.ui.comboBox_visa_3)) self.connect(self.ui.pushButton_update_4, SIGNAL('clicked()'), lambda : self.Update("visa4", self.ui.comboBox_visa_4)) self.connect(self.ui.pushButton_update_5, SIGNAL('clicked()'), lambda : self.Update("visa5", self.ui.comboBox_visa_5)) self.connect(self.ui.pushButton_select_1, SIGNAL('clicked()'), lambda : self.Select("visa1", self.visa1, self.ui.comboBox_visa_1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_select_2, SIGNAL('clicked()'), lambda : self.Select("visa2", self.visa2, self.ui.comboBox_visa_2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_select_3, SIGNAL('clicked()'), lambda : self.Select("visa3", self.visa3, self.ui.comboBox_visa_3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_select_4, SIGNAL('clicked()'), lambda : self.Select("visa4", self.visa4, self.ui.comboBox_visa_4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_select_5, SIGNAL('clicked()'), lambda : self.Select("visa5", self.visa5, self.ui.comboBox_visa_5, self.ui.label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect(self.ui.pushButton_close_1, SIGNAL('clicked()'), lambda : self.Close("visa1", self.visa1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_close_2, SIGNAL('clicked()'), lambda : self.Close("visa2", self.visa2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_close_3, SIGNAL('clicked()'), lambda : self.Close("visa3", self.visa3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_close_4, SIGNAL('clicked()'), lambda : self.Close("visa4", self.visa4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_close_5, SIGNAL('clicked()'), lambda : self.Close("visa5", self.visa5, self.ui.label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect(self.ui.pushButton_Start, SIGNAL('clicked()'), self.start) self.connect(self.ui.pushButton_Stop, SIGNAL('clicked()'), self.collect_data_thread.stop) self.connect(self.ui.pushButton_Pause, SIGNAL('clicked()'), self.collect_data_thread.pause) self.connect(self.collect_data_thread, SIGNAL("curve_plot"), self.curvePlots_update) self.connect(self.collect_data_thread, SIGNAL("print"), self.Print_data) self.connect(self.ui.textEdit, SIGNAL('textChanged ()'), lambda : self.start_font("C")) self.Update("visa1", self.ui.comboBox_visa_1) self.Update("visa2", self.ui.comboBox_visa_2) self.Update("visa3", self.ui.comboBox_visa_3) self.Update("visa4", self.ui.comboBox_visa_4) self.Update("visa5", self.ui.comboBox_visa_5) self.curve_1 = self.make_curveWidgets(self.ui.curvewidget_1, "black", "black", titles = ["Plot 1", "X (x)", "Y (y)"]) self.curve_2 = self.make_curveWidgets(self.ui.curvewidget_2, "r", "black", titles = ["Plot 2", "X (x)", "Y (y)"]) self.curve_3 = self.make_curveWidgets(self.ui.curvewidget_3, "g", "black", titles = ["Plot 3", "X (x)", "Y (y)"]) self.curve_4 = self.make_curveWidgets(self.ui.curvewidget_4, "o", "black", titles = ["Plot 4", "X (x)", "Y (y)"]) self.visa1 = None self.visa2 = None self.visa3 = None self.visa4 = None self.visa5 = None self.setWindowTitle("Keithley Gate Sweep with Current Bias Lock-in") font = QFont() font.setPointSize(10) self.ui.tabWidget_visa.setFont(font) self.ui.tabWidget_visa.setTabText(0, "Lock-in Curr") self.ui.tabWidget_visa.setTabText(1, "Keithley Gate") self.input_string = [] self.input_string.append("00 Run_Number: 01\n\n") self.input_string.append("01 Start Gate Voltage: 0\n") self.input_string.append("02 Step Gate Voltage: 0.1\n") self.input_string.append("03 End Gate Voltage: 10\n") self.input_string.append("04 Double Linear (y/n): y\n") self.input_string.append("05 Turn off Keithley (y/n): y\n\n") self.input_string.append("06 CurrBias Lock-in Sens: 5e-3\n") self.input_string.append("07 Current Bias Resistor: 1.015e6\n") self.input_string.append("08 Lock-in Output Voltage: 4e-3\n") self.input_string.append("09 Additional Lock-in Volt Gain: 1\n\n") self.input_string.append("10 User: Vannucci\n") self.input_string.append("11 Save Name: \n") self.input_string.append("12 TimeStamp (y/n): y\n") self.input_string.append("13 Comments: ") self.start_font("C") try: file_par = open("parameters.txt", "r") input_string_print = file_par.read() file_par.close() except: input_string_print = "" for st_i in self.input_string: input_string_print = input_string_print + st_i font = QFont() font.setPointSize(8) self.ui.textEdit.setFont(font) self.ui.textEdit.setText(input_string_print) self.inputted_data = [] self.array_sweep = []
def __init__(self, parent = None): self.collect_data_thread = Collect_data() self.dsave_thread = Dynamic_Save_Thread() # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to self.ui # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) self.connect(self.ui.pushButton_update_1, SIGNAL('clicked()'), lambda : self.Update("visa1", self.ui.comboBox_visa_1)) self.connect(self.ui.pushButton_update_2, SIGNAL('clicked()'), lambda : self.Update("visa2", self.ui.comboBox_visa_2)) self.connect(self.ui.pushButton_update_3, SIGNAL('clicked()'), lambda : self.Update("visa3", self.ui.comboBox_visa_3)) self.connect(self.ui.pushButton_update_4, SIGNAL('clicked()'), lambda : self.Update("visa4", self.ui.comboBox_visa_4)) self.connect(self.ui.pushButton_select_1, SIGNAL('clicked()'), lambda : self.Select("visa1", self.visa1, self.ui.comboBox_visa_1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_select_2, SIGNAL('clicked()'), lambda : self.Select("visa2", self.visa2, self.ui.comboBox_visa_2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_select_3, SIGNAL('clicked()'), lambda : self.Select("visa3", self.visa3, self.ui.comboBox_visa_3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_select_4, SIGNAL('clicked()'), lambda : self.Select("visa4", self.visa4, self.ui.comboBox_visa_4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_close_1, SIGNAL('clicked()'), lambda : self.Close("visa1", self.visa1, self.ui.label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect(self.ui.pushButton_close_2, SIGNAL('clicked()'), lambda : self.Close("visa2", self.visa2, self.ui.label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect(self.ui.pushButton_close_3, SIGNAL('clicked()'), lambda : self.Close("visa3", self.visa3, self.ui.label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect(self.ui.pushButton_close_4, SIGNAL('clicked()'), lambda : self.Close("visa4", self.visa4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4])) self.connect(self.ui.pushButton_Start, SIGNAL('clicked()'), self.start) self.connect(self.ui.pushButton_Stop, SIGNAL('clicked()'), self.collect_data_thread.stop) self.connect(self.ui.pushButton_Pause, SIGNAL('clicked()'), self.collect_data_thread.pause) self.connect(self.collect_data_thread, SIGNAL("curve_plot"), self.curvePlots_update) self.connect(self.collect_data_thread, SIGNAL("freq_update"), self.setup_plot) self.connect(self.collect_data_thread, SIGNAL("power_update"), self.setup_plot) self.connect(self.collect_data_thread, SIGNAL("print_value"), self.Print_data) self.connect(self.ui.checkBox_dsave, SIGNAL("clicked()"), self.Pre_dsave) self.connect(self.ui.textEdit, SIGNAL('textChanged ()'), lambda : self.start_font("C")) self.connect(self.ui.pushButton_dsave_browse, SIGNAL('clicked()'), self.Dsave_browse) self.Update("visa1", self.ui.comboBox_visa_1) self.Update("visa2", self.ui.comboBox_visa_2) self.Update("visa3", self.ui.comboBox_visa_3) self.Update("visa4", self.ui.comboBox_visa_4) self.curve_3 = self.make_curveWidgets(self.ui.curvewidget_3, "b", "blue", titles = ["RF Power", "Step", "Power (dBm)"]) self.curve_3_update = self.make_curveWidgets(self.ui.curvewidget_3, "red", "red", titles = ["RF Power", "Step", "Power (dBm)"]) self.curve_2_b = self.make_curveWidgets(self.ui.curvewidget_2, "black", "black", titles = ["Keithley", "Step", "Voltage (V)"]) self.curve_2_r = self.make_curveWidgets(self.ui.curvewidget_2, "red", "red", titles = ["Keithley", "Step", "Voltage (V)"]) self.curve_1 = self.make_curveWidgets(self.ui.curvewidget_1, "b", "blue", titles = ["Keithley", "Step", "Voltage (V)"]) self.curve_1_update = self.make_curveWidgets(self.ui.curvewidget_1, "red", "red", titles = ["Keithley", "Step", "Voltage (V)"]) self.Curve1 = self.make_curveWidgets(self.ui.curvewidget_13, "r", "black", titles = ["Plot 1", "X (x)", "Y (y)"]) self.Curve2 = self.make_curveWidgets(self.ui.curvewidget_14, "g", "black", titles = ["Plot 2", "X (x)", "Y (y)"]) self.Curve3 = self.make_curveWidgets(self.ui.curvewidget_15, "r", "black", titles = ["Plot 3", "X (x)", "Y (y)"]) self.Curve4 = self.make_curveWidgets(self.ui.curvewidget_16, "g", "black", titles = ["Plot 4", "X (x)", "Y (y)"]) self.visa1 = None self.visa2 = None self.visa3 = None self.visa4 = None self.setWindowTitle("Sweep with Lock-in without Magnetic") self.input_string = [] self.input_string.append("00 Run_Number: 01\n\n") self.input_string.append("01 Start Gate Voltage (V): 35\n") self.input_string.append("02 Step Gate Voltage (V): 0.1\n") self.input_string.append("03 03 End Gate Voltage (V): 0\n") self.input_string.append("04 Double Linear (y/n): n\n") self.input_string.append("05 Turn off Keithley (y/n): n\n") self.input_string.append("06 CurrBias Lock-in Sens: 20e-6\n") self.input_string.append("07 Reading wait time(s): .25\n\n") self.input_string.append("08 Current Bias Resistor: 1.009e9\n") self.input_string.append("09 Lock-in Output Voltage: 10\n") self.input_string.append("10 Additional Lock-in Volt Gain: 1\n\n") self.input_string.append("11 User: Vannucci\n") self.input_string.append("12 File Name: S-SiA0036-V_B1_leads\n") self.input_string.append("13 TimeStamp (y/n): y\n") self.input_string.append("14 Comments:\n\n") self.start_font("C") self.out0_1 = "None" self.out0_2 = "None" self.out0_3 = "None" self.out0_4 = "None" self.out1_0 = "None" self.out1_1 = "None" self.out1_2 = "None" self.out1_3 = "None" self.out2_0 = "None" self.out2_1 = "None" self.out2_2 = "None" self.out2_3 = "None" self.out3_0 = "None" self.out3_1 = "None" self.out3_2 = "None" self.out3_3 = "None" self.scale1_1 = [1, ""] self.scale1_2 = [1, ""] self.scale1_3 = [1, ""] self.scale2_1 = [1, ""] self.scale2_2 = [1, ""] self.scale2_3 = [1, ""] self.scale3_1 = [1, ""] self.scale3_2 = [1, ""] self.scale3_3 = [1, ""] self.Coil_Constant = 1E-3/9.1E-3 try: file_par = open("parameters.txt", "r") input_string_print = file_par.read() except: input_string_print = "" for st_i in self.input_string: input_string_print = input_string_print + st_i font = QFont() font.setPointSize(10) self.ui.textEdit.setFont(font) self.ui.textEdit.setText(input_string_print) self.inputted_data = [] self.array_sweep = [] rm = visa.ResourceManager() self.Visa_states = [] try: alls = rm.list_resources() for i in range(0, len(alls)): self.Visa_states.append([alls[i], True]) except: alls = "No Visa Available."
def __init__(self, parent=None): self.collect_data_thread = Collect_data() # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to self.ui # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) self.connect(self.ui.pushButton_update_1, SIGNAL('clicked()'), lambda: self.Update("visa1", self.ui.comboBox_visa_1)) self.connect(self.ui.pushButton_update_2, SIGNAL('clicked()'), lambda: self.Update("visa2", self.ui.comboBox_visa_2)) self.connect(self.ui.pushButton_update_3, SIGNAL('clicked()'), lambda: self.Update("visa3", self.ui.comboBox_visa_3)) self.connect(self.ui.pushButton_update_4, SIGNAL('clicked()'), lambda: self.Update("visa4", self.ui.comboBox_visa_4)) self.connect(self.ui.pushButton_update_5, SIGNAL('clicked()'), lambda: self.Update("visa5", self.ui.comboBox_visa_5)) self.connect( self.ui.pushButton_select_1, SIGNAL('clicked()'), lambda: self. Select("visa1", self.visa1, self.ui.comboBox_visa_1, self.ui. label_visa_1, [self.ui.pushButton_select_1, self.ui.pushButton_close_1])) self.connect( self.ui.pushButton_select_2, SIGNAL('clicked()'), lambda: self. Select("visa2", self.visa2, self.ui.comboBox_visa_2, self.ui. label_visa_2, [self.ui.pushButton_select_2, self.ui.pushButton_close_2])) self.connect( self.ui.pushButton_select_3, SIGNAL('clicked()'), lambda: self. Select("visa3", self.visa3, self.ui.comboBox_visa_3, self.ui. label_visa_3, [self.ui.pushButton_select_3, self.ui.pushButton_close_3])) self.connect( self.ui.pushButton_select_4, SIGNAL('clicked()'), lambda: self. Select("visa4", self.visa4, self.ui.comboBox_visa_4, self.ui.label_visa_4, [self.ui.pushButton_select_4, self.ui.pushButton_close_4], baud=115200)) self.connect( self.ui.pushButton_select_5, SIGNAL('clicked()'), lambda: self. Select("visa5", self.visa5, self.ui.comboBox_visa_5, self.ui. label_visa_5, [self.ui.pushButton_select_5, self.ui.pushButton_close_5])) self.connect( self.ui.pushButton_close_1, SIGNAL('clicked()'), lambda: self.Close("visa1", self.visa1, self.ui.label_visa_1, [ self.ui.pushButton_select_1, self.ui.pushButton_close_1 ])) self.connect( self.ui.pushButton_close_2, SIGNAL('clicked()'), lambda: self.Close("visa2", self.visa2, self.ui.label_visa_2, [ self.ui.pushButton_select_2, self.ui.pushButton_close_2 ])) self.connect( self.ui.pushButton_close_3, SIGNAL('clicked()'), lambda: self.Close("visa3", self.visa3, self.ui.label_visa_3, [ self.ui.pushButton_select_3, self.ui.pushButton_close_3 ])) self.connect( self.ui.pushButton_close_4, SIGNAL('clicked()'), lambda: self.Close("visa4", self.visa4, self.ui.label_visa_4, [ self.ui.pushButton_select_4, self.ui.pushButton_close_4 ])) self.connect( self.ui.pushButton_close_5, SIGNAL('clicked()'), lambda: self.Close("visa5", self.visa5, self.ui.label_visa_5, [ self.ui.pushButton_select_5, self.ui.pushButton_close_5 ])) self.connect(self.ui.pushButton_Start, SIGNAL('clicked()'), self.start) self.connect(self.ui.pushButton_Stop, SIGNAL('clicked()'), self.collect_data_thread.stop) self.connect(self.ui.pushButton_Pause, SIGNAL('clicked()'), self.collect_data_thread.pause) self.connect(self.collect_data_thread, SIGNAL("curve_plot"), self.curvePlots_update) self.connect(self.collect_data_thread, SIGNAL("print"), self.Print_data) self.connect(self.ui.textEdit, SIGNAL('textChanged ()'), lambda: self.start_font("C")) self.Update("visa1", self.ui.comboBox_visa_1) self.Update("visa2", self.ui.comboBox_visa_2) self.Update("visa3", self.ui.comboBox_visa_3) self.Update("visa4", self.ui.comboBox_visa_4) self.Update("visa5", self.ui.comboBox_visa_5) self.curve_1 = self.make_curveWidgets( self.ui.curvewidget_1, "black", "black", titles=["Plot 1", "X (x)", "Y (y)"]) self.curve_2 = self.make_curveWidgets( self.ui.curvewidget_2, "r", "black", titles=["Plot 2", "X (x)", "Y (y)"]) self.curve_3 = self.make_curveWidgets( self.ui.curvewidget_3, "g", "black", titles=["Plot 3", "X (x)", "Y (y)"]) self.curve_4 = self.make_curveWidgets( self.ui.curvewidget_4, "o", "black", titles=["Plot 4", "X (x)", "Y (y)"]) self.visa1 = None self.visa2 = None self.visa3 = None self.visa4 = None self.visa5 = None self.setWindowTitle("Magnetic Sweep with Voltage Bias Lock-in") font = QFont() font.setPointSize(8) self.ui.tabWidget_visa.setFont(font) self.ui.tabWidget_visa.setTabText(0, "Lock-in Curr") self.ui.tabWidget_visa.setTabText(1, "Lock-in Volt") self.ui.tabWidget_visa.setTabText(2, "Gate Keithley") self.ui.tabWidget_visa.setTabText(3, "Magnet") self.input_string = [] self.input_string.append("00 Run_Number: 01\n\n") self.input_string.append("01 Start Field: 0\n") self.input_string.append("02 Field Sweep: 0.001\n") self.input_string.append("03 Record Step Field: 0.001\n") self.input_string.append("04 End Field: 0.001\n") self.input_string.append("05 Double Linear (y/n): y\n\n") self.input_string.append("06 Lock-in Curr Sens: 1e-3\n") self.input_string.append("07 Lock-in Volt Sens: 1e-3\n") self.input_string.append("08 Curr Pre-Amplifier Sens: 1e-5\n") self.input_string.append("09 Additional Lock-in Volt Gain: 1\n") self.input_string.append("10 Additional Lock-in Curr Gain: 1\n\n") self.input_string.append("11 User: Vannucci\n") self.input_string.append("12 Save Name: \n") self.input_string.append("13 TimeStamp (y/n): y\n") self.input_string.append("14 Comments: ") self.start_font("C") input_string_print = "" for st_i in self.input_string: input_string_print = input_string_print + st_i font = QFont() font.setPointSize(8) self.ui.textEdit.setFont(font) self.ui.textEdit.setText(input_string_print) self.inputted_data = [] self.array_sweep = []
def __init__(self, parent=None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas_general = FigureCanvas(self.ui.mplwidget_general.figure) self.canvas_general.setParent(self.ui.widget_general) # We need the toolbar widget for the canvas self.mpl_toolbar_general = NavigationToolbar(self.canvas_general, self.ui.widget_general) self.canvas_import = FigureCanvas(self.ui.mplwidget_import.figure) self.canvas_import.setParent(self.ui.widget_import) # This is the toolbar widget for the import canvas self.mpl_toolbar_import = NavigationToolbar(self.canvas_import, self.ui.widget_import) # self.canvas_scan = FigureCanvas(self.ui.mplwidget_scan.figure) # self.canvas_scan.setParent(self.ui.widget_scan) # # This is the toolbar widget for the scan canvas # self.mpl_toolbar_scan = NavigationToolbar(self.canvas_scan, self.ui.widget_scan) # Create the QVBoxLayout object and add the widget into the layout vbox_general = QVBoxLayout() # The matplotlib canvas vbox_general.addWidget(self.canvas_general) # The matplotlib toolbar vbox_general.addWidget(self.mpl_toolbar_general) self.ui.widget_general.setLayout(vbox_general) # Create the QVBoxLayout object and add the widget into the Layout vbox_import = QVBoxLayout() # The matplotlib canvas vbox_import.addWidget(self.canvas_import) # The matplotlib toolbar vbox_import.addWidget(self.mpl_toolbar_import) self.ui.widget_import.setLayout(vbox_import) # # Create the QVBoxLayout object and add the widget into the Layout # vbox_scan = QVBoxLayout() # # The matplotlib canvas # vbox_scan.addWidget(self.canvas_scan) # # The matplotlib toolbar # vbox_scan.addWidget(self.mpl_toolbar_scan) # self.ui.widget_scan.setLayout(vbox_scan) # Connect the mplwidget with canvas self.ui.mplwidget_general = self.canvas_general self.ui.mplwidget_import = self.canvas_import # self.ui.mplwidget_scan = self.canvas_scan self.Array_Builder_programs = Array_Builder(self.ui) # Connect buttons in the General Array tab self.connect(self.ui.pushButton_plot, SIGNAL('clicked()'), self.Array_Builder_programs.Plot_general) self.connect(self.ui.pushButton_clear, SIGNAL('clicked()'), self.Array_Builder_programs.Clear) self.connect(self.ui.pushButton_save, SIGNAL('clicked()'), self.Array_Builder_programs.Save) self.connect(self.ui.pushButton_browse_save, SIGNAL('clicked()'), self.Array_Builder_programs.Browse_save) # Connect buttons in the Keithely tab self.Keithley_programs = Keithley(self.ui) self.Keithley_programs.Refresh_visa() self.connect(self.ui.pushButton_browse_keithley, SIGNAL('clicked()'), self.Keithley_programs.Browse_keithley) self.connect(self.ui.pushButton_import_keithley, SIGNAL('clicked()'), self.Keithley_programs.Import_keithley) self.connect(self.ui.pushButton_close_keithley, SIGNAL('clicked()'), self.Keithley_programs.Close_keithley) self.connect(self.ui.pushButton_select_keithley, SIGNAL('clicked()'), self.Keithley_programs.Select_keithley) self.connect(self.ui.pushButton_scan_keithley, SIGNAL('clicked()'), self.Keithley_programs.Scan_keithley) self.connect(self.ui.pushButton_pause_keithley, SIGNAL('clicked()'), self.Keithley_programs.collect_data_thread.pause) self.connect(self.ui.pushButton_stop_keithley, SIGNAL('clicked()'), self.Keithley_programs.collect_data_thread.stop) self.connect(self.ui.pushButton_clear_keithley, SIGNAL('clicked()'), self.Keithley_programs.Clear_keithley) self.connect(self.ui.pushButton_copy_keithley, SIGNAL('clicked()'), self.CopyData) self.connect( self.ui.radioButton_voltage_keithley, SIGNAL("clicked()"), lambda: self.ui.tabWidget_scan_keithley.setCurrentIndex(0)) self.connect( self.ui.radioButton_current_keithley, SIGNAL("clicked()"), lambda: self.ui.tabWidget_scan_keithley.setCurrentIndex(1)) self.connect(self.Keithley_programs.collect_data_thread, SIGNAL("plot"), self.Keithley_programs.Plot_data) self.Values = [] self.Step = [] self.Peak = [] self.round = 0 self.new_start = 0 self.ui.lineEdit_directory_save.setText(os.getcwd()) self.canvas_import_ay = FigureCanvas( self.ui.mplwidget_import_ay.figure) self.canvas_import_ay.setParent(self.ui.widget_import_ay) # This is the toolbar widget for the import canvas self.mpl_toolbar_import_ay = NavigationToolbar( self.canvas_import_ay, self.ui.widget_import_ay) # Create the QVBoxLayout object and add the widget into the Layout vbox_import_ay = QVBoxLayout() # The matplotlib canvas vbox_import_ay.addWidget(self.canvas_import_ay) # The matplotlib toolbar vbox_import_ay.addWidget(self.mpl_toolbar_import_ay) self.ui.widget_import_ay.setLayout(vbox_import_ay) # Connect the mplwidget with canvas self.ui.mplwidget_import_ay = self.canvas_import_ay # self.ui.mplwidget_scan = self.canvas_scan # Connect buttons in the Agilent Yokogawa tab self.Agilent_Yokogawa_programs = Agilent_Yokogawa(self.ui) self.connect(self.ui.startButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.start) #self.connect(self.action_timer, SIGNAL("timeout()"), self.Agilent_Yokogawa_programs.action) self.connect(self.ui.pushButton_browse_ay, SIGNAL('clicked()'), self.Agilent_Yokogawa_programs.Browse_ay) self.connect(self.ui.pushButton_import_ay, SIGNAL('clicked()'), self.Agilent_Yokogawa_programs.Import_ay) self.connect(self.ui.pushButton_copy_ay, SIGNAL('clicked()'), self.Copy_ay) self.connect(self.ui.selectVisaButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.select_visa) self.connect(self.ui.updateVisaButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.update_visa) self.connect(self.ui.closeVisaButton0, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.close_visa0) self.connect(self.ui.closeVisaButton1, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.close_visa1) self.connect(self.ui.browseButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.browse) self.connect(self.ui.saveButton, SIGNAL("clicked()"), self.Agilent_Yokogawa_programs.save)
def __init__(self, parent = None): # Standard GUI code QWidget.__init__(self, parent) # All the GUI data and widgets in the Ui_MainWindow() class is defined to "self.ui" # Thus to do anything on the GUI, the commands must go through this variable self.ui = Ui_MainWindow() self.ui.setupUi(self) # For the canvas. self.canvas_general = FigureCanvas(self.ui.mplwidget_general.figure) self.canvas_general.setParent(self.ui.widget_general) # We need the toolbar widget for the canvas self.mpl_toolbar_general = NavigationToolbar(self.canvas_general, self.ui.widget_general) self.canvas_import = FigureCanvas(self.ui.mplwidget_import.figure) self.canvas_import.setParent(self.ui.widget_import) # This is the toolbar widget for the import canvas self.mpl_toolbar_import = NavigationToolbar(self.canvas_import, self.ui.widget_import) self.canvas_scan = FigureCanvas(self.ui.mplwidget_scan.figure) self.canvas_scan.setParent(self.ui.widget_scan) # This is the toolbar widget for the scan canvas self.mpl_toolbar_scan = NavigationToolbar(self.canvas_scan, self.ui.widget_scan) # Create the QVBoxLayout object and add the widget into the layout vbox_general = QVBoxLayout() # The matplotlib canvas vbox_general.addWidget(self.canvas_general) # The matplotlib toolbar vbox_general.addWidget(self.mpl_toolbar_general) self.ui.widget_general.setLayout(vbox_general) # Create the QVBoxLayout object and add the widget into the Layout vbox_import = QVBoxLayout() # The matplotlib canvas vbox_import.addWidget(self.canvas_import) # The matplotlib toolbar vbox_import.addWidget(self.mpl_toolbar_import) self.ui.widget_import.setLayout(vbox_import) # Create the QVBoxLayout object and add the widget into the Layout vbox_scan = QVBoxLayout() # The matplotlib canvas vbox_scan.addWidget(self.canvas_scan) # The matplotlib toolbar vbox_scan.addWidget(self.mpl_toolbar_scan) self.ui.widget_scan.setLayout(vbox_scan) # Connect the mplwidget with canvas self.ui.mplwidget_general = self.canvas_general self.ui.mplwidget_import = self.canvas_import self.ui.mplwidget_scan = self.canvas_scan self.General_programs = General(self.ui) # Connect buttons in the General Array tab self.connect(self.ui.pushButton_plot, SIGNAL('clicked()'), self.General_programs.Plot_general) self.connect(self.ui.pushButton_clear, SIGNAL('clicked()'), self.General_programs.Clear) self.connect(self.ui.pushButton_save, SIGNAL('clicked()'), self.General_programs.Save) self.connect(self.ui.pushButton_browse_save, SIGNAL('clicked()'), self.General_programs.Browse_save) self.Keithley_programs = Keithley(self.ui) self.Keithley_programs.Refresh_visa() # Connect buttons in the Keithely tab self.connect(self.ui.pushButton_browse_keithley, SIGNAL('clicked()'), self.Keithley_programs.Browse_keithley) self.connect(self.ui.pushButton_import_keithley, SIGNAL('clicked()'), self.Keithley_programs.Import_keithley) self.connect(self.ui.pushButton_close_keithley, SIGNAL('clicked()'), self.Keithley_programs.Close_keithley) self.connect(self.ui.pushButton_select_keithley, SIGNAL('clicked()'), self.Keithley_programs.Select_keithley) self.connect(self.ui.pushButton_scan_keithley, SIGNAL('clicked()'), self.Keithley_programs.Scan_keithley) self.connect(self.ui.pushButton_stop_keithley, SIGNAL('clicked()'), self.Keithley_programs.Stop_keithley) self.connect(self.ui.pushButton_clear_keithley, SIGNAL('clicked()'), self.Keithley_programs.Clear_keithley) self.Values = [] self.Step = [] self.Peak = [] self.round = 0 self.new_start = 0 self.ui.lineEdit_directory_save.setText(os.getcwd())