Commit bfab0ca4 authored by Thomas Vincent's avatar Thomas Vincent

Check normalizer in all entries

parent 7291a74d
......@@ -304,12 +304,14 @@ class QSpaceConverter(object):
if normalizer is not None:
normalizer = str(normalizer)
# Check for valid input
# Check for valid input in all entries
xsocsH5 = XsocsH5.XsocsH5(self.__xsocsH5_f)
if normalizer not in xsocsH5.normalizers():
raise ValueError(
'normalizer %s is not available in measurement group' %
normalizer)
for entry in xsocsH5.entries():
if xsocsH5.measurement(
entry=entry, measurement=normalizer) is None:
raise ValueError(
'normalizer %s is not available in measurement group of entry %s' %
normalizer, entry)
self.__params['normalizer'] = normalizer
......
Markdown is supported
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