Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F fscan
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • BlissBliss
  • fscan
  • Issues
  • #3
Closed
Open
Issue created Jul 16, 2021 by Valentin Valls@valentin.vallsOwner

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?

Assignee
Assign to
Time tracking