poolsynchronization
This module is part of the Python Pool library. It defines the classes for the synchronization
Classes
PoolSynchronization
- class PoolSynchronization(main_element, name='Synchronization')[source]
Bases:
PoolAction
Synchronization action.
It coordinates trigger/gate elements and software synchronizer.
- start_action(ctrls, synch_description, moveable=None, software_synchronizer_initial_domain=None, *args, **kwargs)[source]
Start synchronization action.
- Parameters:
ctrls (
List
) – list of enabled trigger/gate controllerssynch_description (
SynchDescription
) – synchronization descriptionmoveable (
Union
[PoolMotor
,PoolPseudoMotor
,None
]) – (optional) moveable object used as the synchronization source in the Position domainPoolPseudoMotor
software_synchronizer_initial_domain (
Optional
[Any
]) – (optional) - initial domain for software synchronizer, can be eitherTime
orPosition
- Return type:
SynchDescription
- class SynchDescription(iterable=(), /)[source]
Bases:
list
Synchronization description. It is composed from groups - repetitions of equidistant synchronization events. Each group is described by
SynchParam
parameters which may have values inSynchDomain
domains.- property repetitions
- property delay_time
- property active_time
- property total_time
- property passive_time
- property integration_time
- to_dial(sign, offset)[source]
Convert position domain group parameters to dial position
Maintain time domain group parameters (if present) as they are.
Formula is: pos = sign * dial + offset.
- Parameters:
- Return type:
- Returns:
new synchronization description in dial position
- static from_json(synch_description_json)[source]
JSON decode synchronization description data structure and cast SynchParam and SynchDomain keys from strings to enums.
Todo
At some point remove the backwards compatibility for memorized values created with Python 2. In Python 2 IntEnum was serialized to “<class>.<attr>” e.g. “SynchDomain.Time” and we were using a class method
fromStr
to interpret the enumeration objects.