At Maloja
The running table is a pandas dataFrame-based table that is automatically filled each time a run is started from slic. The table is stored in the p-group in the folder /sf/maloja/data/pxxxxx/res
with the file name output.h5
.
The table can also be downloaded directly from the browser, in h5, excel and .csv formats.
More information and the code is available here: https://gitlab.psi.ch/augustin_s/stand
Designing the running table
There is a set of channels that always stored including the run number, the type of measurement, static or scan, in the latter case the initial and final values, the step, number of shots, etc. To add other channels:
Basic
- To chose the corresponding p-group for the table at the beginning of the beamtime, go to
~/bin/stand
(this will change in the future). - Open the script
maloja/spreadsheet.py
in the maloja folder. - Go to the section **spreadsheet_info ** and list the channels you want to appear in the table in the order you want them to appear.
- To add an empty channel (empty column, for more comments for instance)
name = ""
. To add a column with a fix value, such as for not-readable numerical parameters that change slowly, e.g. the settings of the electron spectrometer,name = xxx
, or for a stringname = "string"
- Save the file. Close and re-start slic (if running).
- To print the parameters to be saved in the stand table in a terminal type
print_overview()
(with slic running)
Changing the initial (default) columns
- Go to
slic/slic/core/acquisition/spreadsheet.py
There you can define the parameters (e.g. scanned parameter, number of steps, etc.) - Go to
maloja/maloja.py
There, what is printed in the running table is defined in the line:
spreadsheet = Spreadsheet(spreadsheet_info, placeholders=["comment", "sample"], host="satese-cons-01", port=9090)
The user can always add new channels to the maloja/spreadysheet.py
, that will be automatically be added to the end of the table. Simply add the channels to the list, save the file and re-start the slic used to lunch the runs.
Starting and stopping the table
Chose a console at the control room (typically Cons01) and open a terminal. Type stand
and run.
A browser window should appear and then every time a run is started in slic
a new line will appear in the table. You can open, visualize and modify the entries typing in the browser of any console the address:
http://satese-cons-01:8080
The address: http://satese-cons-01.psi.ch:8080
also works.
Note: you can modify any entry in the table, but those automatically filled should not be modified. Ideally you should modify the entries meant for it, like "Comments", "Sample" or similar.
Note: If when starting the table we get the following error message:
/photonics/home/gac-maloja/bin/stand: line 5: cd: /sf/maloja/data/p21234/res: Permission denied
It probably means that the gac-maloja account is not yet in the pgroup.
To stop the table simply press ctrl+c
in the stand terminal. The table can be deleted (be careful with this). For instance, in case something is wrong from the beginning or filled with many dummy tests, the table should be stopped, then the file output.h5 should be deleted or moved from the res
folder and then stand
can be restarted again.
To hide/unhide the terminal where stand is running
To see which screens are hidden you can type screen -ls
in a terminal.
To detach a terminal and hide it from the screens, select it and press ctrl+a ctrl+d.
To attach it again and make it appear in your screens tye screen -R
(if there is only one hidden). If there are several, check which terminals are hidden and then re -attach the proper one, for example:
screen -R 2613.pts-9.satese-cons-01
To force it to detach on anybody else's side and attach it on your side screen -dR
.
Operation at Alvra (version from 30-05-2022)
To start it, in the same computer where slic
is running open a terminal, type stand
and run. There should be only one running and in the same console as slic. If it runs in several there may be a conflict and it may not accept new entries, when new data is recorded.
The file is saved as output.h5 in the folder pgroup/res
and it overwrites the same file.
In order to change the columns printed go here:
/sf/alvra/config/src/python/slic/slic/slic/core/acquisition/spreadsheet.py
but keep in mind that once the first printing (in a pgroup) is done the order of the columns already there cannot be changed, any new columns will be added at the end.
For now, for every step in a scan, it prints a new line (to be rechecked in the future).
Note: There are backups created after every change in the table that are stored in a hidden folder:
(base) gac-alvra@saresa-cons-03:/sf/alvra/config/src/python/slic/slic/slic/core/acquisition$ ls /sf/alvra/data/p19634/res/.backup/