def __init__(self, serial_port="COM6"):
     self.l = lockin_controller.lockinController(serial_port=serial_port)
     self.x_list = []
     self.y_list = []
     self.r_list = []
     self.theta_list = []
     self.x_std_list = []
     self.y_std_list = []
     self.r_std_list = []
     self.theta_std_list = []
     self.mickey_turns_list = []
     self.minnie_turns_list = []
예제 #2
0
 def __init__(self, serial_port='COM6'):
     # For running this script on the windows laptop by the source.
     self.l=lockin_controller.lockinController(serial_port=serial_port)
     self.x_list=[]
     self.y_list=[]
     self.r_list=[]
     self.theta_list=[]
     self.x_std_list=[]
     self.y_std_list=[]
     self.r_std_list=[]
     self.theta_std_list=[]
     
     self.time_list=[]
예제 #3
0
    def __init__(self,  qApp, parent=None):
        super(SweepDialog, self).__init__(parent)
        self.__app = qApp
        self.setupUi(self)
        
        self.lockin = lockin_controller.lockinController(serial_port="/dev/ttyUSB2")
        print self.lockin.get_idn()
        self.hittite = hittite_controller.hittiteController()
        self.dpi = 72
        self.fig = Figure((9.1, 5.2), dpi=self.dpi)
#        self.fig = Figure(dpi=self.dpi)
        self.plot_layout = QVBoxLayout(self.plot_group_box)
        self.canvas = FigureCanvas(self.fig)
        self.canvas.setParent(self.plot_group_box)
        self.canvas.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Expanding)
        self.plot_layout.addWidget(self.canvas)
        self.axes = self.fig.add_subplot(211)
        self.axes.set_xlabel('GHz')
        self.axes.set_ylabel('dB')
        self.axes.grid(True)
        self.axes2 = self.fig.add_subplot(212)
        # Use matplotlib event handler
        #self.canvas.mpl_connect('pick_event', self.onclick_plot)
        #self.canvas.mpl_connect('button_release_event', self.onclick_plot)
        self.mpl_toolbar = NavigationToolbar(self.canvas,self.plot_group_box) #self.adc_plot_box)
        self.plot_layout.addWidget(self.mpl_toolbar)
        
            
        self.line = None
        self.phline = None
        self.line2 = None
        self.phline2 = None
        self.peakline = None
        self.psd_text = None
        self.selection_line = None
        self.sweep_data = None
        self.fine_sweep_data = None
        
        self.progress_value = 0
        self.total_subsweeps = 1
        self.current_subsweep = 0
        
        
        self.abort_requested = False
        self.sweep_thread = None
        
        self.push_abort.clicked.connect(self.onclick_abort)
        self.push_start_sweep.clicked.connect(self.onclick_start_sweep)
        self.push_start_fine_sweep.clicked.connect(self.onclick_start_fine_sweep)
        self.push_save.clicked.connect(self.onclick_save)
        self.line_npoints.textEdited.connect(self.recalc_spacing)
        self.line_span_hz.textEdited.connect(self.recalc_spacing)
        #self.tableview_freqs.itemChanged.connect(self.freq_table_item_changed)
        #self.spin_subsweeps.valueChanged.connect(self.onspin_subsweeps_changed)
        self.push_add_resonator.clicked.connect(self.onclick_add_resonator)
        self.push_clear_all.clicked.connect(self.onclick_clear_all)
        self.check_use_cal.stateChanged.connect(self.oncheck_use_cal)
        self.push_save_res.clicked.connect(self.onclick_save_res)
        self.push_load_res.clicked.connect(self.onclick_load_res)
        
        self.logfile = None
        self.fresh = False
        self.fine_sweep_data = None
        #self.recalc_spacing('')
        
        
        QTimer.singleShot(1000, self.update_plot)