FilterWheel

class acq4.devices.FilterWheel.FilterWheel(dm, config, name)[source]

Bases: Device, OptomechDevice

Optical filter wheel device for swapping FilterSet devices.

The Filter wheel device class adds control and display for a filter wheel that selects between many filters or filter sets. Filters must be defined in the configuration prior to the FilterWheel; see FilterSet for more information.

  • Maintains list of the filters in the wheel positions with their description

  • Support for selecting a filter wheel position

  • Support for filter wheel implementation during task : specific filter wheel position during one task, different positions as task sequence

Configuration examples:

FilterWheel:

driver: ‘FilterWheel’ parentDevice: ‘Microscope’ slots:

# These are the names of FilterSet devices that have been defined elsewhere 0: “DIC_FilterCube” 1: “EGFP_FilterCube” 2: “EYFP_FilterCube”

createTask(cmd, parentTask)[source]
deviceInterface(win)[source]

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

getFilter(position=None)[source]

Return the Filter at position.

If position is None, then return the currently active Filter.

getPosition()[source]

Return the current position of the filter wheel.

getPositionCount()[source]

Return the number of filter positions.

The number returned indicates all available positions, regardless of the presence or absence of a filter in each position.

By default this returns the largest configured slot number, but subclasses may override this method.

getSpeed()[source]
isMoving()[source]

Return the current position of the filter wheel.

listFilters()[source]

Return a dict of available {slot_n: filter} pairs.

loadPreset(name)[source]

Load a preset filter wheel position by name.

setPosition(pos)[source]

Set the filter wheel position and return a FilterWheelFuture instance that can be used to wait for the move to complete.

setSpeed(speed)[source]
sigFilterChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

sigFilterWheelSpeedChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

slotNames()[source]

Return a dict of names for each slot in the wheel.

speedChanged(speed)[source]

Sublclasses should call this method when the filterwheel speed has changed.

stop()[source]

Immediately stop the filter wheel.

taskInterface(taskRunner)[source]

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

The FilterWheel device provides control for motorized filter wheels used in microscopy and imaging systems.

Configuration

Basic configuration for filter wheel devices includes filter position mapping and communication settings.

Example configuration:

FilterWheel:
    driver: 'FilterWheel'
    port: '/dev/ttyUSB0'  # Serial port
    filters:
        0: 'Open'
        1: 'DAPI'
        2: 'GFP'
        3: 'Texas Red'
        4: 'Cy5'
        5: 'ND 0.6'

Features

Filter Management: * Named filter positions for easy identification * Position validation and error checking * Fast switching between filter positions

Integration: * Task interface for automated filter changes * Synchronization with imaging sequences * Coordinate with other optical devices

Monitoring: * Position feedback and status reporting * Error detection and handling * Movement completion signaling

Dependencies

  • Specific filter wheel hardware and drivers

  • Serial or USB communication interface

  • Filter wheel controller (if required)