poolbasechannel
This module is part of the Python Pool library. It defines the base classes for experiment channels
Classes
PoolBaseChannel
- class PoolBaseChannel(**kwargs)[source]
Bases:
PoolElement
Base class for Pool experimental channel
Todo
Value ref API should be exposed only on the channels which belongs to referable controllers.
- ValueAttributeClass
alias of
Value
- ValueBufferClass
alias of
ValueBuffer
- ValueRefAttributeClass
alias of
ValueRef
- ValueRefBufferClass
alias of
ValueRefBuffer
- AcquisitionClass
alias of
PoolAcquisitionSoftware
- has_pseudo_elements()[source]
Informs whether this channel forms part of any pseudo element e.g. pseudo counter.
- Return type:
- Returns:
has pseudo elements
- get_pseudo_elements()[source]
Returns list of pseudo elements e.g. pseudo counters that this channel belongs to.
- Return type:
Sequence
[ReferenceType
]- Returns:
weak references to pseudo elements
- add_pseudo_element(element)[source]
Adds pseudo element e.g. pseudo counter that this channel belongs to.
- Parameters:
element (
PoolPseudoCounter
) – pseudo element- Return type:
- remove_pseudo_element(element)[source]
Removes pseudo element e.g. pseudo counters that this channel belongs to.
- Parameters:
element (
PoolPseudoCounter
) – pseudo element- Return type:
- get_value_attribute()[source]
Returns the value attribute object for this experiment channel
- Return type:
- Returns:
the value attribute
- get_value_buffer()[source]
Returns the value attribute object for this experiment channel
- Return type:
SardanaBuffer
- Returns:
the value attribute
- get_value_ref_attribute()[source]
Returns the value attribute object for this experiment channel
Note
The get_value_ref_attribute method 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.
- Return type:
- Returns:
the value attribute
- get_value_ref_buffer()[source]
Returns the value attribute object for this experiment channel
Note
The get_value_ref_buffer method 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.
- Return type:
SardanaBuffer
- Returns:
the value attribute
- property acquisition
acquisition object
- read_value()[source]
Reads the channel value from hardware.
- Returns:
a
SardanaValue
containing the channel value- Return type:
- put_value(value, quality=AttrQuality.Valid, propagate=1)[source]
Sets a value.
- Parameters:
value (
SardanaValue
) – the new valuequality (
AttrQuality
) – the new qualitypropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Return type:
- get_value(cache=True, propagate=1)[source]
Returns the channel value.
- Parameters:
- Return type:
- Returns:
the channel value
- property value: SardanaAttribute
channel value
- extend_value_buffer(values, idx=None, propagate=1)[source]
Extend value buffer with new values assigning them consecutive indexes starting with idx. If idx is omitted, then the new values will be added right after the last value in the buffer. Also update the read value of the attribute with the last element of values.
- Parameters:
values (
SardanaValue
) – values to be added to the bufferpropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Return type:
ValueBuffer
- append_value_buffer(value, idx=None, propagate=1)[source]
Extend value buffer with new values assigning them consecutive indexes starting with idx. If idx is omitted, then the new value will be added with right after the last value in the buffer. Also update the read value.
- Parameters:
value (
SardanaValue
) – value to be added to the bufferpropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Return type:
ValueBuffer
- read_value_ref()[source]
Reads the channel value ref from hardware.
Note
The read_value_ref method 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.
- Returns:
a sardana value containing the channel value
- Return type:
- put_value_ref(value_ref, propagate=1)[source]
Sets a value ref.
Note
The put_value_ref method 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.
- Parameters:
value_ref (
SardanaValue
) – the new valuepropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Return type:
ValueRef
- get_value_ref()[source]
Returns the channel value ref.
Note
The get_value_ref method 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.
- Return type:
- Returns:
the channel value
- property value_ref: SardanaValue
channel value ref
- extend_value_ref_buffer(value_refs, idx=None, propagate=1)[source]
Extend value ref buffer with new values assigning them consecutive indexes starting with idx. If idx is omitted, then the new values will be added right after the last value ref in the buffer. Also update the read value ref of the attribute with the last element of values.
Note
The extend_value_ref_buffer method 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.
- Parameters:
value_refs (
SardanaValue
) – values to be added to the bufferidx (
Optional
[int
]) – index at which to append the value_refspropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Return type:
ValueRefBuffer
- append_value_ref_buffer(value_ref, idx=None, propagate=1)[source]
Append new value ref to the value ref buffer at the idx position.
If idx is omitted, then the new value ref will be added right after the last value ref in the buffer. Also update the read value ref.
Note
The append_value_ref_buffer method 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.
- Parameters:
value_ref (
SardanaValue
) – value ref to be added to the bufferidx (
Optional
[int
]) – index at which to append the value_refpropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Return type:
ValueRefBuffer
- clear_value_ref_buffer()[source]
Clear value ref buffer.
Note
The clear_value_ref_buffer method 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.
- get_value_ref_pattern()[source]
Returns the channel value reference pattern.
Note
The get_value_ref_pattern method 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.
- Return type:
- Returns:
the channel value
- set_value_ref_pattern(value_ref_pattern, propagate=1)[source]
Set a value reference pattern in the kernel (not in the hardware).
Note
The set_value_ref_pattern method 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.
- is_value_ref_enabled()[source]
Check if value reference is enabled.
Note
The is_value_ref_enabled method 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.
- Return type:
- Returns:
the channel value
- set_value_ref_enabled(value_ref_enabled, propagate=1)[source]
Set value reference enabled flag in the kernel (not in the hardware).
Note
The set_value_ref_enabled method 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.
- is_referable()[source]
Check if channel has referable capability.
Note
The is_referable method 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.
- get_integration_time()[source]
Return the integration time for this object.
- Return type:
- Returns:
the current integration time
- set_integration_time(integration_time, propagate=1)[source]
Set the integration time for this object.
- property shape
channel value shape