コード例 #1
0
    def __init__(self, hardware, parameters, parent = None):
        cam1 = noneWidgets.Camera()
        cam2 = noneWidgets.Camera()
        stage1 = noneWidgets.NanoP()
        stage2 = noneWidgets.NanoP()
        lock_fn = lambda (x): 0.0 * x
        control_thread1 = stageOffsetControl.StageCamThread(cam1,
                                                            stage1,
                                                            lock_fn,
                                                            50.0,
                                                            parameters.get("focuslock.qpd_zcenter"),
                                                            parameters.get("focuslock.is_locked_buffer_length", 10),
                                                            parameters.get("focuslock.is_locked_offset_thresh", 0.01))
        control_thread2 = stageOffsetControl.StageCamThread(cam2,
                                                            stage2,
                                                            lock_fn,
                                                            50.0,
                                                            parameters.get("focuslock.qpd_zcenter"),
                                                            parameters.get("focuslock.is_locked_buffer_length", 10),
                                                            parameters.get("focuslock.is_locked_offset_thresh", 0.01))
        

        ir_laser1 = noneWidgets.IRLaser()
        ir_laser2 = noneWidgets.IRLaser()
        focusLockZ.FocusLockZDualCam.__init__(self,
                                              parameters,
                                              [control_thread1, control_thread2],
                                              [ir_laser1, ir_laser2],
                                              parent)
コード例 #2
0
    def __init__(self, hardware, parameters, parent=None):

        # None specific focus lock parameters
        lock_params = parameters.addSubSection("focuslock")
        lock_params.add(
            "qpd_zcenter",
            params.ParameterRangeFloat("Piezo center position in microns",
                                       "qpd_zcenter", 50.0, 0.0, 100.0))
        lock_params.add(
            "qpd_scale",
            params.ParameterRangeFloat("Offset to nm calibration value",
                                       "qpd_scale", 50.0, 0.0, 10000.0))
        lock_params.add("qpd_sum_min", 50.0)
        lock_params.add("qpd_sum_max", 1500.0)
        lock_params.add("is_locked_buffer_length", 10)
        lock_params.add("is_locked_offset_thresh", 0.01)

        # None Initialization.
        qpd = noneWidgets.QPD()
        stage = noneWidgets.NanoP()
        lock_fn = lambda (x): 0.0 * x
        control_thread = stageOffsetControl.StageQPDThread(
            qpd, stage, lock_fn, lock_params.get("qpd_sum_min"),
            lock_params.get("qpd_zcenter"),
            lock_params.get("is_locked_buffer_length"),
            lock_params.get("is_locked_offset_thresh"))

        ir_laser = noneWidgets.IRLaser()
        focusLockZ.FocusLockZQPD.__init__(self, parameters, control_thread,
                                          ir_laser, parent)
コード例 #3
0
ファイル: noneFocusLockZ.py プロジェクト: vaughangroup/scope1
 def __init__(self, hardware, parameters, parent=None):
     qpd = noneWidgets.QPD()
     stage = noneWidgets.NanoP()
     lock_fn = lambda (x): 0.0 * x
     control_thread = stageOffsetControl.StageQPDThread(
         qpd, stage, lock_fn, 50.0, parameters.get("qpd_zcenter"))
     ir_laser = noneWidgets.IRLaser()
     focusLockZ.FocusLockZQPD.__init__(self, parameters, control_thread,
                                       ir_laser, parent)
コード例 #4
0
    def __init__(self, parameters, parent=None):
        qpd = noneWidgets.QPD()
        stage = noneWidgets.NanoP()
        lock_fn = lambda (x): 0.0 * x
        control_thread = stageQPDControl.QControlThread(
            qpd, stage, lock_fn, 50.0, parameters.qpd_zcenter)
        ir_laser = noneWidgets.IRLaser()
        focusLockZ.FocusLockZ.__init__(self, parameters, control_thread,
                                       ir_laser, parent)

        # Since the stage is an ActiveX control & such controls
        # have to have a parent we have to change the stage class
        # after the focus lock dialog box has been initialized.
        stage = TPZ001.APTPiezo(parent=self)
        stage.hide()
        stage.moveTo(0, parameters.qpd_zcenter)
        control_thread.setStage(stage)
        control_thread.recenter()