atomiq.components.optoelectronics.camera

Classes

Camera

A Camera

TriggeredRPCCamera

Camera that is configured via RPC but triggered via a TTL

Module Contents

class atomiq.components.optoelectronics.camera.Camera(config_dict, default_config, *args, **kwargs)[source]

Bases: atomiq.components.primitives.Component

A Camera

This is an abstract class to represent a camera.

A camera needs to have a configuration (exposure time, readout mode, binning, subarray, etc). Since cameras usually need quite some config options to be set, this class works with named configuration sets stored in a dict. An example looks like the following:

config_dict = {
     "camera_usecase1" : {
             "option_xy": 2.3,
             "option_zy": "external",
             ...
     },
     "camera_usecase2": {
         "option_xy": 2e-3,
         "option_zy": "internal",
     },
     ...
}
Parameters:
  • config_dict (dict) -- Dictionary holding the configuration sets for the camera

  • default_config (artiq.language.types.TStr) -- key from the config dict to use if none is specified in the configure() function

kernel_invariants
config_dict
default_config
abstractmethod _set_config(config)[source]
Parameters:

config (artiq.language.types.TStr)

configure(config='')[source]

Configure the camera, i.e. set exposure time, readout mode, binning, etc. Named configuration options are available from the config_dict provided upon object creation. We load the one with the key given in config. If no key is given, load the default defined upon object creation.

Parameters:

config (artiq.language.types.TStr)

abstractmethod arm()[source]

Arm the camera such that a subsequent call of the start() method can start the exposure immediately. Arming typically cannot meet realtime requirements. However, once armed, the camera can start exposure on a trigger in realtime

abstractmethod start()[source]

Start exposure of the camera

abstractmethod stop()[source]

Stop exposure of the camera

class atomiq.components.optoelectronics.camera.TriggeredRPCCamera(rpc_camera, fire_ttl, fire_pulsetime=100 * us, *args, **kwargs)[source]

Bases: Camera, atomiq.components.primitives.Triggerable

Camera that is configured via RPC but triggered via a TTL

Parameters:
  • rpc_camera (Component) -- The ARTIQ RPC object that represents the camera. It needs to provide the RPC functions configure(identifier: int, configuration: dict, metadata: dict) to configure the camera, start() to arm the camera (i.e. wait for trigger), and abort() to stop waiting for trigger or stop exposure.

  • fire_ttl (Switchable) -- The logic signal that triggers the exposure.

  • fire_pulsetime (artiq.language.types.TFloat) -- The time the logic signal remains high to trigger the camera (default 100us)

kernel_invariants
camera
fire_ttl
fire_pulsetime
_set_config(config)[source]
Parameters:

config (artiq.language.types.TStr)

arm()[source]

Arm the camera such that a subsequent call of the start() method can start the exposure immediately. Arming typically cannot meet realtime requirements. However, once armed, the camera can start exposure on a trigger in realtime

stop()[source]

Stop exposure of the camera

fire(channel='')[source]

Uses the fire_ttl component to trigger the camera. Pulses the TTL for fire_pulsetime (as defined in components) and thereby advances the time cursor by this amount.

Parameters:

channel (artiq.language.types.TStr) -- Not used.

start()[source]

Start exposure of the camera (alias for fire() ).