Commit bd137dbb authored by Thomas Vincent's avatar Thomas Vincent
Browse files

Add a way to get all positioners

parent 0d7951f4
......@@ -243,6 +243,24 @@ class XsocsH5(XsocsH5Base):
path = self.positioners_tpl.format(entry) + '/' + positioner
return self._get_scalar_data(path)
@_process_entry
def positioners(self, entry):
"""Returns names of positioners.
:return: List of dataset names in positioners
:rtype: List[str]
"""
positioners = []
path = self.positioners_tpl.format(entry) + '/'
with self._get_file() as h5_file:
for name, node in h5_file[path].items():
if (isinstance(node, _h5py.Dataset) and
node.dtype.kind in 'iuf'):
positioners.append(name)
return positioners
@_process_entry
def measurement(self, entry, measurement):
path = self.measurement_tpl.format(entry) + '/' + measurement
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment