Python Core API Get Operations¶
get(paths, *, flat=False, flags=0, settingsonly=True, subscribedonly=False, basechannelonly=False, excludevectors=False)
¶
Return a dict with all nodes from the specified sub-tree.
Note: Flags are ignored for a path that specifies one or more leaf nodes.
Specifying flags, either as positional or keyword argument is
mandatory if an empty set would be returned given the
default flags (settingsonly).
High-speed streaming nodes (e.g. /devN/demods/0/sample
) are
are never returned.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paths |
str
|
Path string of the node. Multiple paths can be specified as a comma-separated list. Wild cards are supported to select multiple matching nodes. |
required |
flat |
bool
|
Specify which type of data structure to return. Return data either as a flat dict (True) or as a nested dict tree (False, default). |
False
|
flags |
Union[ziListEnum, int]
|
Flags specifying how the selected nodes are listed
(see |
0
|
settingsonly |
bool
|
Returns only nodes which are marked as setting (default: True). |
True
|
subscribedonly |
bool
|
Returns only subscribed nodes (default: False). |
False
|
basechannelonly |
bool
|
Return only one instance of a node in case of multiple channels (default: False). |
False
|
excludevectors |
bool
|
Exclude vector nodes (default: False). |
False
|
Returns:
Type | Description |
---|---|
LabOneResultNested
|
A dict with all nodes from the specified sub-tree. |
getAsEvent(path)
¶
Trigger an event on the specified node.
The node data is returned by a subsequent poll command.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path string of the node. Note: Wildcards and paths referring to streaming nodes are not permitted. |
required |
getAuxInSample(path)
¶
Returns a single auxin sample.
The auxin data is averaged in contrast to the auxin data embedded in the demodulator sample.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path string of the node |
required |
getByte(path)
¶
getComplex(path)
¶
getDIO(path)
¶
getDouble(path)
¶
getInt(path)
¶
getList(path, flags=8)
¶
DEPRECATED: superseded by get(...).
Return a list with all nodes from the specified sub-tree. Args: path: Path string of the node. Use wild card to select all. flags: Specify which type of nodes to include in the result. Allowed: ZI_LIST_NODES_SETTINGSONLY = 0x08 (default) ZI_LIST_NODES_ALL = 0x00 (all nodes)
getSample(path)
¶
Returns a single demodulator sample (including DIO and AuxIn).
For more efficient data recording use subscribe and poll methods!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path string of the node |
required |
Returns:
Type | Description |
---|---|
Dict[str, ndarray]
|
Single demodulator sample (including DIO and AuxIn). |