atomiq.components.optoelectronics.camera ======================================== .. py:module:: atomiq.components.optoelectronics.camera Classes ------- .. autoapisummary:: atomiq.components.optoelectronics.camera.Camera atomiq.components.optoelectronics.camera.TriggeredRPCCamera Module Contents --------------- .. py:class:: Camera(config_dict, default_config, *args, **kwargs) Bases: :py:obj:`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: .. code-block:: python config_dict = { "camera_usecase1" : { "option_xy": 2.3, "option_zy": "external", ... }, "camera_usecase2": { "option_xy": 2e-3, "option_zy": "internal", }, ... } :param config_dict: Dictionary holding the configuration sets for the camera :param default_config: key from the config dict to use if none is specified in the :func:`configure` function .. py:attribute:: kernel_invariants .. py:attribute:: config_dict .. py:attribute:: default_config .. py:method:: _set_config(config) :abstractmethod: .. py:method:: configure(config = '') 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. .. py:method:: arm() :abstractmethod: 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 .. py:method:: start() :abstractmethod: Start exposure of the camera .. py:method:: stop() :abstractmethod: Stop exposure of the camera .. py:class:: TriggeredRPCCamera(rpc_camera, fire_ttl, fire_pulsetime = 100 * us, *args, **kwargs) Bases: :py:obj:`Camera`, :py:obj:`atomiq.components.primitives.Triggerable` Camera that is configured via RPC but triggered via a TTL :param rpc_camera: 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. :param fire_ttl: The logic signal that triggers the exposure. :param fire_pulsetime: The time the logic signal remains high to trigger the camera (default 100us) .. py:attribute:: kernel_invariants .. py:attribute:: camera .. py:attribute:: fire_ttl .. py:attribute:: fire_pulsetime .. py:method:: _set_config(config) .. py:method:: arm() 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 .. py:method:: stop() Stop exposure of the camera .. py:method:: fire(channel = '') 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. :param channel: Not used. .. py:method:: start() Start exposure of the camera (alias for :meth:`fire` ).