pymmcore_plus.core
¶
CMMCorePlus and its supporting classes.
This includes the object-oriented views onto devices, properties and config groups, the enums that replace pymmcore's integer constants, and hardware sequencing helpers.
Submodules
| Name | Description |
|---|---|
events |
Signals emitted by CMMCorePlus.events. |
Classes
| Name | Description |
|---|---|
AutoFocusDevice |
|
CameraDevice |
|
CoreDevice |
|
GalvoDevice |
|
GenericDevice |
|
HubDevice |
|
ImageProcessorDevice |
|
MagnifierDevice |
|
SLMDevice |
|
SequencedEvent |
Subclass of MDAEvent that represents a sequence of triggered events. |
SerialDevice |
|
ShutterDevice |
|
SignalIODevice |
|
StageDevice |
|
StateDevice |
|
XYStageDevice |
Functions
| Name | Description |
|---|---|
iter_sequenced_events |
Iterate over a sequence of MDAEvents, yielding SequencedEvents when possible. |
Classes¶
AutoFocusDevice
¶
AutoFocusDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
CameraDevice
¶
CameraDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
startSequenceAcquisition
¶
Start sequence acquisition.
isExposureSequenceable
¶
isExposureSequenceable() -> bool
Return True if camera supports exposure sequence.
loadExposureSequence
¶
Load exposure sequence.
startExposureSequence
¶
Start exposure sequence.
stopExposureSequence
¶
Stop exposure sequence.
CoreDevice
¶
CoreDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
GalvoDevice
¶
GalvoDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
pointAndFire
¶
Set Galvo to (x, y) and fire the laser for a predetermined duration.
setSpotInterval
¶
setSpotInterval(pulseTime_us: float) -> None
Set the SpotInterval for the specified galvo device.
setIlluminationState
¶
setIlluminationState(state: bool) -> None
Set the galvo's illumination state to on or off.
addPolygonVertex
¶
Add a vertex to the polygon.
GenericDevice
¶
GenericDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
HubDevice
¶
HubDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
ImageProcessorDevice
¶
ImageProcessorDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
MagnifierDevice
¶
MagnifierDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
SerialDevice
¶
SerialDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
ShutterDevice
¶
ShutterDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
SignalIODevice
¶
SignalIODevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
Bases: Device
SLMDevice
¶
SLMDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
StageDevice
¶
StageDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
isContinuousFocusDrive
¶
isContinuousFocusDrive() -> bool
Return True if device supports continuous focus.
isStageLinearSequenceable
¶
isStageLinearSequenceable() -> bool
Return True if device supports linear stage sequence.
startStageSequence
¶
Start stage sequence.
stopStageSequence
¶
Stop stage sequence.
getStageSequenceMaxLength
¶
getStageSequenceMaxLength() -> int
Return maximum length of stage sequence.
loadStageSequence
¶
Load stage sequence.
StateDevice
¶
StateDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
XYStageDevice
¶
XYStageDevice(
device_label: str = UNASSIGNED,
mmcore: CMMCorePlus | None = None,
adapter_name: str = "",
device_name: str = "",
type: DeviceType = UnknownType,
description: str = "",
)
position
property
writable
¶
Return the position of the XY stage in microns.
setXYPosition
¶
Set the position of the XY stage in microns.
setRelativeXYPosition
¶
Set the relative position of the XY stage in microns.
setOriginXY
¶
Zero the current XY stage's coordinates at the current position.
setAdapterOriginXY
¶
Enable software translation of coordinates for the current XY stage.
The current position of the stage becomes (newXUm, newYUm). It is recommended that setOriginXY() be used instead where available.
isXYStageSequenceable
¶
isXYStageSequenceable() -> bool
Return True if device supports XY stage sequence.
startXYStageSequence
¶
Start XY stage sequence.
stopXYStageSequence
¶
Stop XY stage sequence.
getXYStageSequenceMaxLength
¶
getXYStageSequenceMaxLength() -> int
Return maximum length of XY stage sequence.
loadXYStageSequence
¶
Load XY stage sequence.
SequencedEvent
¶
Bases: MDAEvent
Subclass of MDAEvent that represents a sequence of triggered events.
Attributes:
| Name | Type | Description |
|---|---|---|
index |
ReadOnlyDict
|
A read-only dictionary. |
channel |
Channel | None
|
|
exposure |
float | None
|
|
min_start_time |
float | None
|
|
pos_name |
str | None
|
|
x_pos |
float | None
|
|
y_pos |
float | None
|
|
z_pos |
float | None
|
|
slm_image |
SLMImage | None
|
|
sequence |
MDASequence | None
|
|
properties |
list[PropertyTuple] | None
|
|
roi |
CameraROI | None
|
|
metadata |
dict[str, Any]
|
|
action |
HardwareAutofocus | AcquireImage | CustomAction
|
Attributes¶type : Literal["acquire_image"] This action can be used to acquire an image. |
keep_shutter_open |
bool
|
|
reset_event_timer |
bool
|
|
events |
tuple[MDAEvent, ...]
|
|
exposure_sequence |
tuple[float, ...]
|
|
x_sequence |
tuple[float, ...]
|
|
y_sequence |
tuple[float, ...]
|
|
z_sequence |
tuple[float, ...]
|
|
slm_sequence |
tuple[bytes, ...]
|
|
property_sequences |
dict[tuple[str, str], list[str]]
|
|
-
API Reference
pymmcore-plus
pymmcore_plusCMMCorePlus Hardware sequencingcanSequenceEvents - User Guide Running Acquisitions
Functions¶
iter_sequenced_events
¶
iter_sequenced_events(
core: CMMCorePlus, events: Iterable[MDAEvent]
) -> Iterator[MDAEvent | SequencedEvent]
Iterate over a sequence of MDAEvents, yielding SequencedEvents when possible.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
core
|
CMMCorePlus
|
The core object to use for determining sequenceable properties. |
required |
events
|
Iterable[MDAEvent]
|
The events to iterate over. |
required |
Returns:
| Type | Description |
|---|---|
Iterator[MDAEvent | SequencedEvent]
|
A new iterator that will combine multiple MDAEvents into a single SequencedEvent
when possible, based on the sequenceable properties of the core object.
Note that |
Re-exports¶
These can also be imported from this module, but each is documented under its shortest import path (linked below).
| Name | Description |
|---|---|
ActionType |
Action that triggered a device property handler. |
CFGCommand |
Commands used in Micro-Manager configuration (.cfg) files. |
CFGGroup |
Names of built-in config groups and presets (System, Startup, etc...). |
CMMCorePlus |
Wrapper for CMMCore with extended functionality. |
ConfigGroup |
Convenience object for dealing with a set of related Configuration objects. |
Configuration |
Encapsulation of configuration information. |
Device |
Convenience object-oriented device API. |
DeviceAdapter |
Convenience view onto a device-adapter library. |
DeviceDetectionStatus |
DeviceDetectionStatus from device discovery. |
DeviceInitializationState |
DeviceInitializationState returned by getDeviceInitializationState. |
DeviceProperty |
Convenience view onto a device property. |
DeviceType |
Type of a Micro-Manager device. |
FocusDirection |
Direction a focus stage moves (towards or away from the sample). |
Keyword |
Standard property and device names (the g_Keyword_* constants). |
Metadata |
Subclass of pymmcore.Metadata with a pythonic interface. |
PixelFormat |
Subset of GeniCam Pixel Format names used by pymmcore-plus. |
PortType |
Type of a port device (serial, USB, HID). |
PropertyType |
Type of a device property value. |