set_fscan_title is not working with fast_start_pos which uses many position
I did tune a fscan at ID15A during help desk.
There macros was using fast_start_pos
with multiple start position (as numpy array)
set_fscan_title
was using template containing {fast_start_pos:g}
, which fail to format such numpy array.
I did hotfix the beamline the following way:
diff --git a/fscan/fscaninfo.py b/fscan/fscaninfo.py
index a88c300..c8f5e7d 100644
--- a/fscan/fscaninfo.py
+++ b/fscan/fscaninfo.py
@@ -10,6 +10,7 @@ class FScanInfo(ScanInfo):
self._scan_info["npoints"] = npoints
def set_fscan_title(self, template, pars={}):
+ template = template.replace("{fast_start_pos:g} ", "")
parstxt = template.format(**pars.to_dict())
self._scan_info["title"] = "{0} {1}".format(self._scan_name, parstxt)
Here is the real place of the default template
(bliss_dev) l-id15-3:~/local/fscan.git % git grep "{fast_start_pos:g}"
fscan/fscan2d.py: "{fast_motor_name} {fast_start_pos:g} {fast_step_size:g} {fast_npoints:d} " +\
fscan/fscaninfo.py: template = template.replace("{fast_start_pos:g} ", "")
There is probably a good way to fix it.
But in the case of this specific experiment, ID15 was using a list of about 800 fast_start_pos
.
So it's maybe not a good idea to write all of them in the scan title anyway.
Replacing {fast_step_size:g}
by {fast_step_size}
is probably not a good idea.
Maybe storing something like fast_step_size[0]...fast_step_size[-1]
instead?