Thorlabs MFC1

class acq4.devices.ThorlabsMFC1.ThorlabsMFC1(man, config, name)[source]

Bases: Stage

Driver for Thorlabs MFC1 motorized focus controller.

Provides Z-axis control for microscope focusing with optional ROE integration.

Configuration options:

  • port (str, required): Serial port (e.g., ‘COM9’)

  • scale (tuple, optional): (x, y, z) scale factors for position (default: (1, 1, 1)). Only Z-axis is used.

  • motorParams (dict, optional): Low-level motor parameters to pass to driver

  • roe (str, optional): Name of ROE device to integrate Z-axis control When specified, ROE Z-axis movements control the MFC1 focus

  • limits (list, optional): [min, max] Z-axis position limits

  • parentDevice (str, optional): Name of parent device (typically a stage)

  • transform (dict, optional): Spatial transform relative to parent device

Example configuration:

FocusMotor:
    driver: 'ThorlabsMFC1'
    port: 'COM9'
    parentDevice: 'SutterStage'
    scale: [1.0, 1.0, 1e-6 * 85e-6 / 10e-3]
    limits: [-5e-3, 5e-3]
capabilities()[source]

Return a structure describing the capabilities of this device:

{
    'getPos': (x, y, z),      # bool: whether each axis can be read from the device
    'setPos': (x, y, z),      # bool: whether each axis can be set on the device
    'limits': (x, y, z),      # bool: whether limits can be set for each axis
}

The axes described in the above data structure correspond to the mechanical actuators on the device; they do not necessarily correspond to the axes in the global coordinate system or the local coordinate system of the device.

Subclasses must reimplement this method.

deviceInterface(win)[source]

Return a widget with a UI to put in the device rack

mfcPosChanged(pos, oldpos)[source]
property positionUpdatesPerSecond

Return the rate at which the device reports position updates.

quit()[source]
setHolding(hold)[source]
setRoeEnabled(enable)[source]
setZero()[source]

Reset the device position to 0 (without moving the motor).

stop()[source]

Stop moving the device immediately. When you call MoveFuture.stop() from here, look closely at infinite recursions.

targetPosition()[source]

If the stage is moving, return the target position. Otherwise return the current position.