The function createScanInfo() returns a dictionary containing some useful information about the scan.
p99/door/haspp99.01 [1]: HasyUtils.createScanInfo?
Type: function
String form: <function createScanInfo at 0x7feb9a367cf8>
File: /usr/lib/python2.7/dist-packages/HasyUtils/MsUtils.py
Definition: HasyUtils.createScanInfo(title=None)
Docstring:
Depending on whether createScanInfo() is called in an after-scan-scenario or
a pre-scan-scenario the title has to be supplied or not.
title == None (after-scan-scenario): the function takes the title from ScanHistory
returns None, if ScanID != serialno (history), probably because
the last scan has been aborted (ctrl-c)
title != None (pre-scan-scenario): if ScanHistory is not valid because createScanInfo()
is called from a hook, the title has to be supplied.
pre_scan_hook example:
scanInfo = HasyUtils.createScanInfo( self.getParentMacro().getCommand())
returns a data structure describing the scan, see below, used e.g. mvsa and CursorApp
{
motors: [{'start': 1.0, 'stop': 1.1, 'name': 'e6cctrl_h'},
{'start': 0.0, 'stop': 0.1, 'name': 'e6cctrl_k'},
{'start': 0.1, 'stop': 0.2, 'name': 'e6cctrl_l'}],
serialno: 1238,
title: 'hklscan 1.0 1.1 0.0 0.1 0.1 0.2 20 0.1',
}
or
{
motors: [{'start': 0.0, 'stop': 1.0, 'name': 'exp_dmy01'},
{'start': 1.0, 'stop': 2.0, 'name': 'exp_dmy02'},
{'start': 2.0, 'stop': 3.0, 'name': 'exp_dmy03'}],
serialno: 1239,
title: 'a3scan exp_dmy01 0.0 1.0 exp_dmy02 1.0 2.0 exp_dmy03 2.0 3.0 20 0.1',
}
serialno is taken from the environment.
An example can be found here 13.2.7.