MicroManager Camera

class acq4.devices.MicroManagerCamera.MicroManagerCamera(manager, config, name)[source]

Bases: Camera

Camera device that uses MicroManager to provide imaging support.

Requires pymmcore to be installed along with MicroManager with matching API versions.

MicroManager-specific configuration options:

  • mmAdapterName (str, required): MicroManager adapter name (e.g., ‘HamamatsuHam’) Find this in MicroManager hardware wizard when setting up the camera

  • mmDeviceName (str, required): MicroManager device name (e.g., ‘HamamatsuHam_DCAM’) Find this in MicroManager hardware wizard when setting up the camera

  • path (str, optional): Path to MicroManager installation directory Uses default MicroManager installation if not specified

Standard Camera configuration options (see Camera base class):

  • parentDevice (str, optional): Name of parent optical device (microscope, etc.)

  • transform (dict, optional): Spatial transform relative to parent device
    • pos: Position offset [x, y]

    • scale: Scale factors [x, y] in m/pixel

    • angle: Rotation angle in radians

  • params (dict, optional): Camera parameters to set at startup
    • exposure: Default exposure time

    • binning: Pixel binning [x, y]

Setup instructions: 1. Ensure pymmcore API version matches MicroManager API version

  • MicroManager API: Help -> About in MicroManager GUI

  • pymmcore API: import pymmcore; print(pymmcore.__version__.split(‘.’)[3])

  1. Test camera operation in MicroManager GUI first

  2. Note adapter and device names from hardware wizard

Example configuration:

Camera:
    driver: 'MicroManagerCamera'
    mmAdapterName: 'HamamatsuHam'
    mmDeviceName: 'HamamatsuHam_DCAM'
    parentDevice: 'Microscope'
    transform:
        pos: [0, 0]
        scale: [4.088e-6, -4.088e-6]
        angle: 0
    params:
        exposure: 10e-3
        binning: [4, 4]
getParam(param)[source]
getParams(params=None)[source]
getROI()[source]
isRunning()[source]
listParams(params=None)[source]

List properties of specified parameters, or of all parameters if None

newFrames()[source]

Return a list of all frames acquired since the last call to newFrames.

quit()[source]
setParam(param, value, autoCorrect=True, autoRestart=True)[source]
setParams(params, autoRestart=True, autoCorrect=True)[source]
Set camera parameters. Options are:

params: a list or dict of (param, value) pairs to be set. Parameters are set in the order specified. autoRestart: If true, restart the camera if required to enact the parameter changes autoCorrect: If true, correct values that are out of range to their nearest acceptable value

Return a tuple with:
0: dictionary of parameters and the values that were set.

(note this may differ from requested values if autoCorrect is True)

1: Boolean value indicating whether a restart is required to enact changes.

If autoRestart is True, this value indicates whether the camera was restarted.

setROI(rgn)[source]
setupCamera()[source]

Prepare the camera at least so that get/setParams will function correctly

startCamera()[source]

Calls the camera driver to start the camera’s acquisition. Call start instead of this to actually record frames.

stopCamera()[source]

Calls the camera driver to stop the camera’s acquisition. Note that the acquisition may be _required_ to stop, since other processes may be preparing to synchronize with the camera’s exposure signal.

The MicroManagerCamera device provides camera control through the MicroManager interface, allowing ACQ4 to work with a wide variety of cameras supported by MicroManager’s plugin system.

Note: This device has been marked as potentially stale. It may require updates to work with current MicroManager versions.

Configuration

The MicroManagerCamera requires specific MicroManager configuration parameters:

  • mmAdapterName: The MicroManager adapter name (e.g., ‘HamamatsuHam’)

  • mmDeviceName: The MicroManager device name (e.g., ‘HamamatsuHam_DCAM’)

  • path: Optional path to MicroManager installation directory

Example configuration:

Camera:
    driver: 'MicroManagerCamera'
    mmAdapterName: 'HamamatsuHam'
    mmDeviceName: 'HamamatsuHam_DCAM'
    path: '/Applications/Micro-Manager'

Dependencies

  • pymmcore (Python wrapper for MicroManager Core)

  • MicroManager installation with matching API versions

  • Appropriate MicroManager device adapters for your camera hardware