microscope.cameras.ximea module

Ximea cameras.

Changing settings flushes the buffer

It is not possible to set some parameters during image acquisition. In such cases, acquisition is stopped (camera is disabled) and the restarted (camera is enabled). However, stopping acquisition discards any image in the camera memory that have not yet been read.

Modifying the following settings require acquisition to be stopped:

  • ROIs

  • binning

  • trigger type (trigger source)

For more details, see the [XiAPI manual](https://www.ximea.com/support/wiki/apis/XiAPI_Manual#Flushing-the-queue).

Hardware trigger

Ximea cameras in the MQ family accept software triggers even if set for hardware triggers (see vendor issues #3`<https://github.com/python-microscope/vendor-issues/issues/3>). However, `XimeaCamera.trigger() checks the trigger type and will raise an exception unless the camera is set for software triggers.

class microscope.cameras.ximea.TrgSelectorMap(value)[source]

Bases: enum.Enum

An enumeration.

XI_TRG_SEL_FRAME_START = <TriggerMode.ONCE: 1>
class microscope.cameras.ximea.TrgSourceMap(value)[source]

Bases: enum.Enum

An enumeration.

XI_TRG_EDGE_FALLING = <TriggerType.FALLING_EDGE: 2>
XI_TRG_EDGE_RISING = <TriggerType.RISING_EDGE: 1>
XI_TRG_SOFTWARE = <TriggerType.SOFTWARE: 0>
class microscope.cameras.ximea.XimeaCamera(serial_number: Optional[str] = None, **kwargs)[source]

Bases: microscope.abc.Camera

Ximea cameras

Parameters

serial_number – the serial number of the camera to connect to. It can be set to None if there is only camera on the system.

abort()[source]

Stop acquisition as soon as possible.

get_cycle_time()[source]

Return the cycle time in seconds.

get_exposure_time()float[source]

Return the current exposure time in seconds.

get_trigger_type()int[source]

Return the current trigger mode.

One of

TRIGGER_AFTER, TRIGGER_BEFORE or TRIGGER_DURATION (bulb exposure.)

initialize()None[source]

Initialise the camera.

Open the connection, connect properties and populate settings dict.

set_exposure_time(value: float)None[source]

Set the exposure time on the device in seconds.

set_trigger(ttype: microscope.TriggerType, tmode: microscope.TriggerMode)None[source]

Set device for a specific trigger.

soft_trigger()None[source]
property trigger_mode
property trigger_type