Skip to content

Constants#

All of the constants in the pymmcore library are in the top level pymmcore namespace, making it a bit difficult to know what type or enumeration they refer to.

All of these constants are reimplemened in the pymmcore_plus library as enum.IntEnum and are available in the pymmcore_plus namespace.

For example, the integer corresponding to the AfterLoadSequence action type could be accessed as pymmcore.AfterLoadSequence or pymmcore_plus.ActionType.AfterLoadSequence.

In [1]: import pymmcore

In [2]: pymmcore.AfterLoadSequence
Out[2]: 4

In [3]: from pymmcore_plus import ActionType

In [4]: ActionType.AfterLoadSequence
Out[4]: <ActionType.AfterLoadSequence: 4>

In [5]: int(ActionType.AfterLoadSequence)
Out[5]: 4

Additionally, it becomes easier to see what constants are available for each type or enumeration.

In [6]: list(ActionType)
Out[6]:
[
    <ActionType.NoAction: 0>,
    <ActionType.BeforeGet: 1>,
    <ActionType.AfterSet: 2>,
    <ActionType.IsSequenceable: 3>,
    <ActionType.AfterLoadSequence: 4>,
    <ActionType.StartSequence: 5>,
    <ActionType.StopSequence: 6>
]

Lastly, many of the methods that return integers in pymmcore.CMMCore have been re-implemented in pymmcore_plus.CMMCorePlus to return the appropriate enumeration.

import pymmcore

core = pymmcore.CMMCore()
# ...  load config and devices
core.getDeviceType("Camera")  # 2


import pymmcore_plus

core = pymmcore_plus.CMMCorePlus()
# ...  load config and devices
core.getDeviceType("Camera")  # <DeviceType.CameraDevice: 2>

ActionType #

AfterLoadSequence = pymmcore.AfterLoadSequence class-attribute #

AfterSet = pymmcore.AfterSet class-attribute #

BeforeGet = pymmcore.BeforeGet class-attribute #

IsSequenceable = pymmcore.IsSequenceable class-attribute #

NoAction = pymmcore.NoAction class-attribute #

StartSequence = pymmcore.StartSequence class-attribute #

StopSequence = pymmcore.StopSequence class-attribute #

CFGCommand #

ConfigGroup = pymmcore.g_CFGCommand_ConfigGroup class-attribute #

ConfigPixelSize = pymmcore.g_CFGCommand_ConfigPixelSize class-attribute #

Configuration = pymmcore.g_CFGCommand_Configuration class-attribute #

Delay = pymmcore.g_CFGCommand_Delay class-attribute #

Device = pymmcore.g_CFGCommand_Device class-attribute #

Equipment = pymmcore.g_CFGCommand_Equipment class-attribute #

FieldDelimiters = pymmcore.g_FieldDelimiters class-attribute #

FocusDirection = pymmcore.g_CFGCommand_FocusDirection class-attribute #

ImageSynchro = pymmcore.g_CFGCommand_ImageSynchro class-attribute #

Label = pymmcore.g_CFGCommand_Label class-attribute #

ParentID = pymmcore.g_CFGCommand_ParentID class-attribute #

PixelSizeAffine = pymmcore.g_CFGCommand_PixelSizeAffine class-attribute #

PixelSize_um = pymmcore.g_CFGCommand_PixelSize_um class-attribute #

Property = pymmcore.g_CFGCommand_Property class-attribute #

CFGGroup #

PixelSizeUm = pymmcore.g_CFGGroup_PixelSizeUm class-attribute #

System = pymmcore.g_CFGGroup_System class-attribute #

System_Shutdown = pymmcore.g_CFGGroup_System_Shutdown class-attribute #

System_Startup = pymmcore.g_CFGGroup_System_Startup class-attribute #

DeviceDetectionStatus #

DeviceDetectionStatus from device discovery.

CanCommunicate = pymmcore.CanCommunicate class-attribute #

Communication verified, parameters have been set to valid values.

CanNotCommunicate = pymmcore.CanNotCommunicate class-attribute #

Communication attributes are valid, but the device does not respond.

Misconfigured = pymmcore.Misconfigured class-attribute #

Some information needed to communicate with the device is invalid.

Unimplemented = pymmcore.Unimplemented class-attribute #

There is as yet no mechanism to programmatically detect the device.

DeviceInitializationState #

DeviceInitializationState returned by getDeviceInitializationState.

InitializationFailed = pymmcore.InitializationFailed class-attribute #

InitializedSuccessfully = pymmcore.InitializedSuccessfully class-attribute #

Uninitialized = pymmcore.Uninitialized class-attribute #

DeviceNotification #

Attention = pymmcore.Attention class-attribute #

Done = pymmcore.Done class-attribute #

StatusChanged = pymmcore.StatusChanged class-attribute #

DeviceType #

Any = AnyType class-attribute #

AnyType = pymmcore.AnyType class-attribute #

AutoFocus = AutoFocusDevice class-attribute #

AutoFocusDevice = pymmcore.AutoFocusDevice class-attribute #

Camera = CameraDevice class-attribute #

CameraDevice = pymmcore.CameraDevice class-attribute #

Core = CoreDevice class-attribute #

CoreDevice = pymmcore.CoreDevice class-attribute #

Galvo = GalvoDevice class-attribute #

GalvoDevice = pymmcore.GalvoDevice class-attribute #

Generic = GenericDevice class-attribute #

GenericDevice = pymmcore.GenericDevice class-attribute #

Hub = HubDevice class-attribute #

HubDevice = pymmcore.HubDevice class-attribute #

ImageProcessor = ImageProcessorDevice class-attribute #

ImageProcessorDevice = pymmcore.ImageProcessorDevice class-attribute #

Magnifier = MagnifierDevice class-attribute #

MagnifierDevice = pymmcore.MagnifierDevice class-attribute #

SLM = SLMDevice class-attribute #

SLMDevice = pymmcore.SLMDevice class-attribute #

Serial = SerialDevice class-attribute #

SerialDevice = pymmcore.SerialDevice class-attribute #

Shutter = ShutterDevice class-attribute #

ShutterDevice = pymmcore.ShutterDevice class-attribute #

SignalIO = SignalIODevice class-attribute #

SignalIODevice = pymmcore.SignalIODevice class-attribute #

Stage = StageDevice class-attribute #

StageDevice = pymmcore.StageDevice class-attribute #

State = StateDevice class-attribute #

StateDevice = pymmcore.StateDevice class-attribute #

Unknown = UnknownType class-attribute #

UnknownType = pymmcore.UnknownType class-attribute #

XYStage = XYStageDevice class-attribute #

XYStageDevice = pymmcore.XYStageDevice class-attribute #

FocusDirection #

AwayFromSample = FocusDirectionAwayFromSample class-attribute #

FocusDirectionAwayFromSample = pymmcore.FocusDirectionAwayFromSample class-attribute #

FocusDirectionTowardSample = pymmcore.FocusDirectionTowardSample class-attribute #

FocusDirectionUnknown = pymmcore.FocusDirectionUnknown class-attribute #

TowardSample = FocusDirectionTowardSample class-attribute #

Unknown = FocusDirectionUnknown class-attribute #

Keyword #

ActualExposure = pymmcore.g_Keyword_ActualExposure class-attribute #

ActualInterval_ms = pymmcore.g_Keyword_ActualInterval_ms class-attribute #

AnswerTimeout = pymmcore.g_Keyword_AnswerTimeout class-attribute #

BaudRate = pymmcore.g_Keyword_BaudRate class-attribute #

Binning = pymmcore.g_Keyword_Binning class-attribute #

CCDTemperature = pymmcore.g_Keyword_CCDTemperature class-attribute #

CCDTemperatureSetPoint = pymmcore.g_Keyword_CCDTemperatureSetPoint class-attribute #

CameraChannelIndex = pymmcore.g_Keyword_CameraChannelIndex class-attribute #

CameraChannelName = pymmcore.g_Keyword_CameraChannelName class-attribute #

CameraID = pymmcore.g_Keyword_CameraID class-attribute #

CameraName = pymmcore.g_Keyword_CameraName class-attribute #

Channel = pymmcore.g_Keyword_Channel class-attribute #

Closed_Position = pymmcore.g_Keyword_Closed_Position class-attribute #

ColorMode = pymmcore.g_Keyword_ColorMode class-attribute #

CoreAutoFocus = pymmcore.g_Keyword_CoreAutoFocus class-attribute #

CoreAutoShutter = pymmcore.g_Keyword_CoreAutoShutter class-attribute #

CoreCamera = pymmcore.g_Keyword_CoreCamera class-attribute #

CoreChannelGroup = pymmcore.g_Keyword_CoreChannelGroup class-attribute #

CoreDevice = pymmcore.g_Keyword_CoreDevice class-attribute #

CoreFocus = pymmcore.g_Keyword_CoreFocus class-attribute #

CoreGalvo = pymmcore.g_Keyword_CoreGalvo class-attribute #

CoreImageProcessor = pymmcore.g_Keyword_CoreImageProcessor class-attribute #

CoreInitialize = pymmcore.g_Keyword_CoreInitialize class-attribute #

CoreSLM = pymmcore.g_Keyword_CoreSLM class-attribute #

CoreShutter = pymmcore.g_Keyword_CoreShutter class-attribute #

CoreTimeoutMs = pymmcore.g_Keyword_CoreTimeoutMs class-attribute #

CoreXYStage = pymmcore.g_Keyword_CoreXYStage class-attribute #

DataBits = pymmcore.g_Keyword_DataBits class-attribute #

Delay = pymmcore.g_Keyword_Delay class-attribute #

DelayBetweenCharsMs = pymmcore.g_Keyword_DelayBetweenCharsMs class-attribute #

Description = pymmcore.g_Keyword_Description class-attribute #

EMGain = pymmcore.g_Keyword_EMGain class-attribute #

Elapsed_Time_ms = pymmcore.g_Keyword_Elapsed_Time_ms class-attribute #

Exposure = pymmcore.g_Keyword_Exposure class-attribute #

Gain = pymmcore.g_Keyword_Gain class-attribute #

Handshaking = pymmcore.g_Keyword_Handshaking class-attribute #

HubID = pymmcore.g_Keyword_HubID class-attribute #

Interval_ms = pymmcore.g_Keyword_Interval_ms class-attribute #

Label = pymmcore.g_Keyword_Label class-attribute #

Meatdata_Exposure = pymmcore.g_Keyword_Meatdata_Exposure class-attribute #

Metadata_ImageNumber = pymmcore.g_Keyword_Metadata_ImageNumber class-attribute #

Metadata_ROI_X = pymmcore.g_Keyword_Metadata_ROI_X class-attribute #

Metadata_ROI_Y = pymmcore.g_Keyword_Metadata_ROI_Y class-attribute #

Metadata_Score = pymmcore.g_Keyword_Metadata_Score class-attribute #

Metadata_TimeInCore = pymmcore.g_Keyword_Metadata_TimeInCore class-attribute #

Name = pymmcore.g_Keyword_Name class-attribute #

Offset = pymmcore.g_Keyword_Offset class-attribute #

Parity = pymmcore.g_Keyword_Parity class-attribute #

PixelType = pymmcore.g_Keyword_PixelType class-attribute #

Port = pymmcore.g_Keyword_Port class-attribute #

Position = pymmcore.g_Keyword_Position class-attribute #

ReadoutMode = pymmcore.g_Keyword_ReadoutMode class-attribute #

ReadoutTime = pymmcore.g_Keyword_ReadoutTime class-attribute #

Speed = pymmcore.g_Keyword_Speed class-attribute #

State = pymmcore.g_Keyword_State class-attribute #

StopBits = pymmcore.g_Keyword_StopBits class-attribute #

Transpose_Correction = pymmcore.g_Keyword_Transpose_Correction class-attribute #

Transpose_MirrorX = pymmcore.g_Keyword_Transpose_MirrorX class-attribute #

Transpose_MirrorY = pymmcore.g_Keyword_Transpose_MirrorY class-attribute #

Transpose_SwapXY = pymmcore.g_Keyword_Transpose_SwapXY class-attribute #

Type = pymmcore.g_Keyword_Type class-attribute #

Version = pymmcore.g_Keyword_Version class-attribute #

PixelType #

GRAY16 = 'GRAY16' class-attribute #

GRAY32 = 'GRAY32' class-attribute #

GRAY8 = 'GRAY8' class-attribute #

RGB32 = 'RGB32' class-attribute #

RGB64 = 'RGB64' class-attribute #

UNKNOWN = '' class-attribute #

for_bytes(depth: int, n_comp: int = 1) -> PixelType classmethod #

PortType #

HIDPort = pymmcore.HIDPort class-attribute #

InvalidPort = pymmcore.InvalidPort class-attribute #

SerialPort = pymmcore.SerialPort class-attribute #

USBPort = pymmcore.USBPort class-attribute #

PropertyType #

Float = pymmcore.Float class-attribute #

Integer = pymmcore.Integer class-attribute #

String = pymmcore.String class-attribute #

Undef = pymmcore.Undef class-attribute #

to_json() -> str #

to_python() -> type | None #