Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Add ascanct parameter output #1652

Merged

Conversation

johanfforsberg
Copy link

Adds a table with some helpful output of the motor settings that are about to be used in a continuous scan.

In order to implement this, we had to change how the header of the scan table is output; it is now printed when the first point arrives, and not immediately. This also prevents some issues with info/debug messages appearing after the header.

The original issue #692 also suggests showing the restored settings after the scan but for similar reasons (see issue #1651) it is currently commented out. It can be added in whenever that issue is solved.

Example:

Door_2_1 [5]: ascanct mot10  0 10 10 0.1 0.1
ScanDir is not defined. This operation will not be stored persistently. Use "expconf" or "newfile" to configure data storage (or eventually "senv ScanDir <abs directory>")
Scan #31 started at Thu Jul  8 13:05:35 2021. It will take at least 0:00:00
Motor positions and relative timestamp (dt) columns contains theoretical values
 Motor    Velocity   Acceleration   Deceleration  Start   End  
 mot10       5            2              2          -5     16  

 #Pt No    mot10      ct09      ct10      ct11      ct12       dt   
   0         0        0.1       0.2       0.3       0.4        2    
...

Opinions on how the output should be formatted are very welcome.

Fixes #692

@teresanunez
Copy link

Thanks for the implementation. I thinks it is nice like this. The only comment that I could do: perhaps
should be put something about what the number of the header are ?. I mean to specify that they are
parameters computed and used for internal use in the continuous scan. I don´t know, it is only a
question/doubt. I am not sure if every user would not what is that.

@yimli
Copy link
Collaborator

yimli commented Jul 9, 2021

Thanks for you comment. It is somehow not very clear that what the number of the table means. So should we add a explanation sentence before the information table? Maybe that will make the output look heavy?

@johanfforsberg
Copy link
Author

We have updated the output a bit:

 Motor   Velocity[u/s]   Acceleration[s]   Deceleration[s]    Start[u]   End[u] 
 mot10         10               2                 2             -10        22   
 mot11         0                0                 0              2         2    

Also note that this table will be output for each waypoint, e.g. when doing a mesh scan, interleaved with the scan output. This is necessary since the motor settings will be changed.

@teresanunez teresanunez merged commit 418b7db into sardana-org:develop Jul 9, 2021
@reszelaz
Copy link
Collaborator

I think this PR makes the following tests fail:

=========================== short test summary info ============================
FAILED ../../../usr/local/lib/python3.5/dist-packages/sardana-3.1.2a0-py3.5.egg/sardana/macroserver/macros/test/test_scanct.py::AscanctTest::test_ascanct_macro_runs
FAILED ../../../usr/local/lib/python3.5/dist-packages/sardana-3.1.2a0-py3.5.egg/sardana/macroserver/macros/test/test_scanct.py::AscanctTest::test_ascanct_macro_runs_2
FAILED ../../../usr/local/lib/python3.5/dist-packages/sardana-3.1.2a0-py3.5.egg/sardana/macroserver/macros/test/test_scanct.py::AscanctTest::test_ascanct_macro_runs_3
FAILED ../../../usr/local/lib/python3.5/dist-packages/sardana-3.1.2a0-py3.5.egg/sardana/macroserver/macros/test/test_scanct.py::AscanctTest::test_ascanct_macro_runs_4
FAILED ../../../usr/local/lib/python3.5/dist-packages/sardana-3.1.2a0-py3.5.egg/sardana/macroserver/macros/test/test_scanct.py::A2scanctTest::test_a2scanct_macro_runs
FAILED ../../../usr/local/lib/python3.5/dist-packages/sardana-3.1.2a0-py3.5.egg/sardana/macroserver/macros/test/test_scanct.py::MeshctTest::test_meshct_macro_runs

I think the tests need to be adapted to the new output lines.

@reszelaz
Copy link
Collaborator

I will work on the tests to fix the CI.

reszelaz added a commit that referenced this pull request Jul 12, 2021
ascanct and meshct tests are performing validation of macro outputs.
#1652 introduced a table with motor parameters showed with macro
output and this breaks the tests. Adapt tests to ignore the table with
motor parameters.
@reszelaz
Copy link
Collaborator

Those tests are already fixed with 99a18fd.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add information about continuous scan parameters in ascanct macros
4 participants