Environment variables for scans

All scan commands in this chapter require a few environment variables to be set:

p17/door/exp.01 [8]: senv ActiveMntGrp mg_haspp17
ActiveMntGrp = mg_haspp17
p17/door/exp.01 [11]: senv ScanDir /home/p17user/temp
ScanDir = /home/p17user/temp
p17/door/exp.01 [12]: senv ScanFile FirstTest.fio
ScanFile = FirstTest.fio
p17/door/exp.01 [13]: senv JsonRecorder True
JsonRecorder = True
p09/door/exp.01 [14]: senv FlagFioWriteMotorPositions True
FlagFioWriteMotorPositions = True

ActiveMntGrp The active measurement group contains the devices to be used during scans. More information about measurement groups can be found in 4.4.

ScanDir The directory where the output files are written.

ScanFile The prefix and the extension of the output file name. The scan number which is part of the file name will be automatically generated. This variable can also be a list, like

   senv ScanFile "['FirstTest.fio', 'FirstTest.spe']"

JsonRecorder If enabled, allows the data to be sent to the SardanaMonitor.

FlagFioWriteMotorPositions If true, all motor positions will be written to the .fio files. If this takes too long, consider to store positions for selected motors only, see 4.1.1 (example from P10).

FioAdditions The name of a Python script which generates output being stored in the header of the .fio files. The output is a json-encoded list of strings or a dictionary. Lists are stored in the comment section, the dictionaries in the parameter section. This feature is disabled by deleting the environment variable FioAdditions or by setting it to None. Examples can be found here 4.1.1 and here 4.1.1.

PreScanSnapshot Extends the header of .spe files. The configuration of the snapshot is done by expconf. Can be inspected by, e.g.:

  p09/door/haso107d1.01 [9]: import HasyUtils 

  p09/door/haso107d1.01 [10]: HasyUtils.getEnv( "PreScanSnapshot")
                 Result [10]: 
  [('tango://haso107d1:10000/p09/vmexecutor/d1.05/Position', 'd1_s1cx'),
   ('tango://haso107d1:10000/p09/vmexecutor/d1.06/Position', 'd1_s1cy'),
   ('tango://haso107d1:10000/p09/vmexecutor/d1.07/Position', 'd1_s1dx'),
   ...

The feature is disabled by:

p09/door/haso107d1.01 [16]: senv PreScanSnapshot [""]
PreScanSnapshot =



Subsections
2019-11-13