poolmeasurementgroup
¶
This module is part of the Python Pool library. It defines the base classes for
Functions
Classes
-
build_measurement_configuration
(user_elements)[source]¶ Create a minimal measurement configuration data structure from the user_elements list.
Minimal configuration data structure:
dict <str, dict> with keys: - 'controllers' : where value is a dict<str, dict> where: - key: controller's full name - value: dict<str, dict> with keys: - 'channels' where value is a dict<str, obj> where: - key: channel's full name - value: dict<str, obj> with keys: - 'index' : where value is the channel's index <int>
Note
The build_measurement_configuration function has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the function) may occur if deemed necessary by the core developers.
PoolMeasurementGroup¶

-
class
PoolMeasurementGroup
(**kwargs)[source]¶ Bases:
sardana.pool.poolgroupelement.PoolGroupElement
-
add_user_element
(element, index=None)[source]¶ Override the base behavior, so the TriggerGate elements are silently skipped if used multiple times in the group
-
configuration
¶
-
timer
¶
-
integration_time
¶ the current integration time
-
monitor_count
¶ the current monitor count
-
acquisition_mode
¶ the current acquisition mode
-
synchronization
¶ the current acquisition mode
-
moveable
¶ moveable source used in synchronization
-
latency_time
¶ latency time between two consecutive acquisitions
-
sw_synch_initial_domain
¶ software synchronizer initial domain (SynchDomain.Time or SynchDomain.Position)
-
nb_starts
¶ current number of starts
-
prepare
(multiple=1)[source]¶ Prepare for measurement.
Delegate measurement preparation to the acquisition action.
..todo:: remove multiple argument
-
start_acquisition
(value=None, multiple=1)[source]¶ Start measurement.
Delegate start measurement to the acquisition action. Provide backwards compatibility for starts without previous prepare.
..todo:: remove value and multiple arguments.
-
acquisition
¶ acquisition object
-
ConfigurationItem¶

-
class
ConfigurationItem
(element, attrs=None)[source]¶ Bases:
object
Container of configuration attributes related to a given element.
Wrap an element to pretend its API. Manage the element’s configuration. Hold an information whether the element is enabled. By default it is enabled.
Note
The ConfigurationItem class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the class) may occur if deemed necessary by the core developers.
-
element
¶ Returns the element associated with this item
-
ControllerConfiguration¶

-
class
ControllerConfiguration
(element, attrs=None)[source]¶ Bases:
sardana.pool.poolmeasurementgroup.ConfigurationItem
Container of configuration attributes related to a given controller.
Inherit behavior from
ConfigurationItem
and additionally hold information about its enabled/disabled channels. By default it is disabled.Note
The ControllerConfiguration class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the class) may occur if deemed necessary by the core developers.
TimerableControllerConfiguration¶

-
class
TimerableControllerConfiguration
(element, attrs=None)[source]¶ Bases:
sardana.pool.poolmeasurementgroup.ControllerConfiguration
Container of configuration attributes related to a given timerable controller.
Inherit behavior from
ControllerConfiguration
and additionally validate timer and monitor configuration.Note
The TimerableControllerConfiguration class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the class) may occur if deemed necessary by the core developers.
ExternalControllerConfiguration¶

-
class
ExternalControllerConfiguration
(element, attrs=None)[source]¶ Bases:
sardana.pool.poolmeasurementgroup.ControllerConfiguration
Container of configuration attributes related to a given external controller.
Inherit behavior from
ControllerConfiguration
.Note
The ExternalControllerConfiguration class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the class) may occur if deemed necessary by the core developers.
ChannelConfiguration¶

-
class
ChannelConfiguration
(element, attrs=None)[source]¶ Bases:
sardana.pool.poolmeasurementgroup.ConfigurationItem
Container of configuration attributes related to a given experimental channel.
Inherit behavior from
ConfigurationItem
.Note
The ChannelConfiguration class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the class) may occur if deemed necessary by the core developers.
SynchronizerConfiguration¶

-
class
SynchronizerConfiguration
(element, attrs=None)[source]¶ Bases:
sardana.pool.poolmeasurementgroup.ConfigurationItem
Container of configuration attributes related to a given synchronizer element.
Inherit behavior from
ConfigurationItem
. By default it is disabled.Note
The ChannelConfiguration class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the class) may occur if deemed necessary by the core developers.
MeasurementConfiguration¶

-
class
MeasurementConfiguration
(parent=None)[source]¶ Bases:
object
Configuration of a measurement.
Accepts import and export from/to a serializable data structure (based on dictionaries/lists and strings). Provides getter methods that facilitate extracting of information e.g. controllers of different types, master timers/monitors, etc.
Note
The build_measurement_configuration function has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the function) may occur if deemed necessary by the core developers.
-
DFT_DESC
= 'General purpose measurement configuration'¶
-
get_acq_synch_by_channel
(channel)[source]¶ Return acquisition synchronization configured for this element.
Parameters: channel ( PoolBaseChannel
orChannelConfiguration
) – channel to look for its acquisition synchronizationReturns: acquisition synchronization Return type: AcqSynch
-
get_acq_synch_by_controller
(controller)[source]¶ Return acquisition synchronization configured for this controller.
Parameters: controller ( PoolController
orControllerConfiguration
) – controller to look for its acquisition synchronizationReturns: acquisition synchronization Return type: AcqSynch
-
get_timerable_ctrls
(acq_synch=None, enabled=None)[source]¶ Return timerable controllers.
Allow to filter controllers based on acquisition synchronization or whether these are enabled/disabled.
Parameters: - acq_synch (
AcqSynch
) – (optional) filter controller based on acquisition synchronization - enabled (
bool
orNone
) –(optional) filter controllers whether these are enabled/disabled:
True
- enabled onlyFalse
- disabled onlyNone
- all
Returns: timerable controllers that fulfils the filtering criteria
Return type: list<
ControllerConfiguration
> # noqa- acq_synch (
-
get_zerod_ctrls
(enabled=None)[source]¶ Return 0D controllers.
Allow to filter controllers whether these are enabled/disabled.
Parameters: enabled ( bool
orNone
) –(optional) filter controllers whether these are enabled/disabled:
True
- enabled onlyFalse
- disabled onlyNone
- all
Returns: 0D controllers that fulfils the filtering criteria Return type: list< ControllerConfiguration
> # noqa
-
get_synch_ctrls
(enabled=None)[source]¶ Return synchronizer (currently only trigger/gate) controllers.
Allow to filter controllers whether these are enabled/disabled.
Parameters: enabled ( bool
orNone
) –(optional) filter controllers whether these are enabled/disabled:
True
- enabled onlyFalse
- disabled onlyNone
- all
Returns: synchronizer controllers that fulfils the filtering criteria Return type: list< ControllerConfiguration
> # noqa
-
get_master_timer_software
()[source]¶ Return master timer in software acquisition.
Returns: master timer in software acquisition Return type: ChannelConfiguration
# noqa
-
get_master_monitor_software
()[source]¶ Return master monitor in software acquisition.
Returns: master monitor in software acquisition Return type: ChannelConfiguration
# noqa
-
get_master_timer_software_start
()[source]¶ Return master timer in software start acquisition.
Returns: master timer in software start acquisition Return type: ChannelConfiguration
# noqa
-
get_master_monitor_software_start
()[source]¶ Return master monitor in software start acquisition.
Returns: master monitor in software start acquisition Return type: ChannelConfiguration
# noqa
-