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:
sardana.pool.poolelement.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
sardana.pool.poolacquisition.PoolAcquisitionSoftware
-
has_pseudo_elements
()[source]¶ Informs whether this channel forms part of any pseudo element e.g. pseudo counter.
- Returns
has pseudo elements
- Return type
bool
-
get_pseudo_elements
()[source]¶ Returns list of pseudo elements e.g. pseudo counters that this channel belongs to.
- Returns
pseudo elements
- Return type
seq<
PoolPseudoCounter
>
-
add_pseudo_element
(element)[source]¶ Adds pseudo element e.g. pseudo counter that this channel belongs to.
- Parameters
element (
PoolPseudoCounter
) – pseudo element
-
remove_pseudo_element
(element)[source]¶ Removes pseudo element e.g. pseudo counters that this channel belongs to.
- Parameters
element (
PoolPseudoCounter
) – pseudo element
-
get_value_attribute
()[source]¶ Returns the value attribute object for this experiment channel
- Returns
the value attribute
- Return type
-
get_value_buffer
()[source]¶ Returns the value attribute object for this experiment channel
- Returns
the value attribute
- Return type
SardanaBuffer
-
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.
- Returns
the value attribute
- Return type
-
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.
- Returns
the value attribute
- Return type
SardanaBuffer
-
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: 0>, 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
-
get_value
(cache=True, propagate=1)[source]¶ Returns the channel value.
- Parameters
cache (bool) – if
True
(default) return value in cache, otherwise read value from hardwarepropagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- Returns
the channel value
- Return type
-
set_value
(value)[source]¶ Starts an acquisition on this channel
- Parameters
value (
Number
) – the value to count
-
property
value
¶ 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
-
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
-
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
-
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.
- Returns
the channel value
- Return type
SardanaValue
-
property
value_ref
¶ 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 (
int
) – index at which to append the value_refspropagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
-
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 (
int
) – index at which to append the value_refpropagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
-
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.
- Returns
the channel value
- Return type
str
-
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.
- Parameters
value_ref_pattern (
str
) – the new value reference patternpropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
-
property
value_ref_pattern
¶ channel value reference pattern
-
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.
- Returns
the channel value
- Return type
bool
-
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.
- Parameters
value_ref_enabled (
bool
) – the new value reference enabledpropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
-
property
value_ref_enabled
¶ channel value reference enabled
-
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.
- Returns
the current integration time
- Return type
float
-
set_integration_time
(integration_time, propagate=1)[source]¶ Set the integration time for this object.
- Parameters
integration_time (
float
) – integration time in seconds to setpropagate (
int
) – 0 for not propagating, 1 to propagate, 2 propagate with priority
-
property
integration_time
¶ channel integration time
-