poolacquisition

This module is part of the Python Pool library. It defines the class for an acquisition

Classes

PoolAcquisition

Inheritance diagram of PoolAcquisition
class PoolAcquisition(main_element, name='Acquisition')[source]

Bases: PoolAction

Acquisition action which is internally composed for sub-actions.

Handle acquisition of experimental channels of the following types: * timerable (C/T, 1D and 2D) synchronized by software or hardware trigger/gate/start * 0D

Synchronized by T/G elements or sofware synchronizer.

event_received(*args, **kwargs)[source]

Callback executed on event of software synchronizer.

Reacts on start, active, passive or end type of events

prepare(config, acq_mode, value, synch_description=None, moveable=None, software_synchronizer_initial_domain=None, nb_starts=1, **kwargs)[source]

Prepare measurement process.

Organize sub-action arguments and loads configuration parameters to the hardware controllers.

is_running()[source]

Checks if acquisition is running.

Acquisition is runnin if any of its sub-actions is running.

run(*args, **kwargs)[source]

Runs acquisition according to previous preparation.

release_action()[source]
clear_elements()[source]

Clears all elements from this action

add_element(element)[source]

Adds a new element to this action.

Parameters:

element (sardana.pool.poolelement.PoolElement) – the new element to be added

remove_element(element)[source]

Removes an element from this action. If the element is not part of this action, a ValueError is raised.

Parameters:

element (sardana.pool.poolelement.PoolElement) – the new element to be removed

Raises:

ValueError

get_elements(copy_of=False)[source]

Returns a sequence of all elements involved in this action.

Parameters:

copy_of (bool) – If False (default) the internal container of elements is returned. If True, a copy of the internal container is returned instead

Returns:

a sequence of all elements involved in this action.

Return type:

seq<sardana.pool.poolelement.PoolElement>

get_pool_controller_list()[source]

Returns a list of all controller elements involved in this action.

Returns:

a list of all controller elements involved in this action.

Return type:

list<sardana.pool.poolelement.PoolController>

get_pool_controllers()[source]

Returns a dict of all controller elements involved in this action.

Returns:

a dict of all controller elements involved in this action.

Return type:

dict<sardana.pool.poolelement.PoolController, seq<sardana.pool.poolelement.PoolElement>>

property pool_controllers

Returns a dict of all controller elements involved in this action.

Returns:

a dict of all controller elements involved in this action.

Return type:

dict<sardana.pool.poolelement.PoolController, seq<sardana.pool.poolelement.PoolElement>>

read_value(ret=None, serial=False)[source]

Reads value information of all elements involved in this action

Parameters:
  • ret (dict) – output map parameter that should be filled with value information. If None is given (default), a new map is created an returned

  • serial (bool) – If False (default) perform controller HW value requests in parallel. If True, access is serialized.

Returns:

a map containing value information per element

Return type:

dict<:class:~`sardana.pool.poolelement.PoolElement`, :class:~`sardana.sardanavalue.SardanaValue`>