Skip to content
Snippets Groups Projects
Commit cbb4a7cf authored by David Hammer's avatar David Hammer
Browse files

Merge branch 'feed-parameter-optimizer' of...

Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer
parents 1c8f21cb d6cef850
No related branches found
No related tags found
2 merge requests!59Interface CrystFEL with Karabo and allow automatic parameter tunning with rcrystfel,!53Train picker arbiter kernel
......@@ -350,13 +350,15 @@ class CrystfelRunner(PythonDevice):
self.KARABO_ON_INPUT("input", self.input_handler)
# note: loading with cfelpyutils.geometry does not tell us peak_list value
# extra note: we need to avoid taking ';' and ' ' into the path!
# (Hence the large regexp on the right-hand side)
self._geom_data_path = None
self._geom_peak_path = None
with open(self.get("crystfelArgs.geometryPath"), "rt") as fd:
for line in fd:
if (match := re.match(r"data\s*=\s*(.*)$", line)):
if (match := re.match(r"data\s*=\s*([a-zA-Z0-9/\._]*)", line)):
self._geom_data_path = match.group(1)
elif (match := re.match(r"peak_list\s*=\s*(.*)$", line)):
elif (match := re.match(r"peak_list\s*=\s*([a-zA-Z0-9/\._]*)", line)):
self._geom_peak_path = match.group(1)
if None not in (self._geom_data_path, self._geom_peak_path):
break
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment