Next: How can I synchronize
Up: SLS Detectors Software
Previous: What is the meaning
Contents
The software gives the possibility to setup several loops, actions and scan utilities which are then handled during the acquisition.
The software will also take care to generate the file names and increment the indexes accordingly.
Figure 1.7 shows in which sequence the various scripts and loops are executed when calling the acquire command. The loops are drawn using the
symbol, while the scripts using the
.
If you prefere to handle the acquisition from your acquisition enviroment, simply leave al scripts and scans disabled and call the acquition from your acquisition enviroment.
Only the frames and cycles loops are defined in firmware and guarantee a precise timing of the acquisition which cannot replaced by any other method (you can synchronize to your beamline by hardware connection of the IO signals as described in 1.8).
Hereafter a description of the meaning of the various loops:
- Measurement loop
- executes offline several times the entire sequence of the acquisition. At the end of each measurement the file index is incremented.
- Scan 0 loop
- is a high level scan loop which can be used e.g to loop on an enviroment variable (temperature, humidity...) or even to change sample.
The list of steps or range of the scan0 variable must be set as scan0steps or scan0range. For small steps of the scan variable, avoid overwriting of the files specifying all the necessary digits in the filename by properly setting the precision with scan0prec.
- Scan 1 loop
- is a low level scan loop which can be used e.g to loop on an enviroment variable (temperature, humidity...) or to move the sample in case of radiation damage.
The list of steps or range of the scan1 variable must be set as scan1steps or scan1range. For small steps of the scan variable, avoid overwriting of the files specifying all the necessary digits in the filename by properly setting the precision with scan1prec.
- Position loop
- The detector is moved in the angular positions specified by the positions command.
The command for moving the detector should be defined as described in 1.10.
All data acquired during a position loop will be merged together, unless the number of positions is set to 0. In this case single frames will be converted to angle without merging.
Avoid using the position loop together with many frames/cycles.
- Cycles loop
- is executed in real time and defines e.g. the number of triggers that will be accepted. The total number of images will be given by frames times cycles.
- Frames loop
- is executed in real time and defines e.g. the images acquired per trigger. The total number of images will be given by frames times cycles.
Executing a script simply consists in a system call with the arguments specified below. The various scripts are executed only if they are enabled and different than none.
The scripts must be executable and the capability of parsing the arguments passed by the acquition program is left to the user writing the scripts. some example scripts writte in awk can be found in the examples directory.
Hereafter a short description of how the scripts are called and with which options:
- Start script
- is executed at the very beginning of the measurement and can be used e.g. to initialize all the devices needed for the acquisition or open the beamline valves. The script is executed as:
script nrun=i par=p
where i is the file index and p is the start script parameter.
- Scan0 script
- There are a few predefined scan modes i.e. threshold changing the detector threshold in DAC units, energy chaning the calibrated detector threshold in eV, trimbits chaning the trimbits of the detector (advanced: do not use) and position changing the detector position (if the motor movement is correctly setup as described in 1.10). Otherwise the scan0script is executed as:
script nrun=i fn=fn var=v par=p
where i is the file index, fn is the file name, v is the value of the scan0 variable at the present step of the scan0 loop and p is the scan 0 script parameter.
- Scan1 script
- There are a few predefined scan modes i.e. threshold changing the detector threshold in DAC units, energy chaning the calibrated detector threshold in eV, trimbits chaning the trimbits of the detector (advanced: do not use) and position changing the detector position (if the motor movement is correctly setup as described in 1.10). Otherwise the scan1script is executed as:
script nrun=i fn=fn var=v par=p
where i is the file index, fn is the file name, v is the value of the scan1 variable at the present step of the scan1 loop and p is the scan 1 script parameter.
- Script before
- is called just before the beginning of the data taking and can be used e.g. to open the shutter.
The script is executed as:
script nrun=i fn=fn par=p sv0=v0 sv1=v1 p0=p0 p1=p1
where i is the file index, fn is the file name, p is the script before parameter, v0 and v1 are the values of the scan0 and scan1 variables at the present step of the scan loops and p0 and p1 are the scan0 and scan1 script parameters.
- Header before script
- is called before every step of the data taking (i.e. for each position, but at the beginning of the frames train if several acquisition have been programmed in real time) and can e.g. be used to dump the exact settings of the detector and beamline to reproduce or analyze the data offline.
The script is executed as:
script nrun=i fn=fn par=p
where i is the file index, fn is the file name, and p is the header before parameter.
- Header after script
- is called after every step of the data taking (i.e. for each position, but at the end of the frames train if several acquisition have been programmed in real time) and can e.g. be used to dump the exact settings of the detector and beamline to reproduce or analyze the data offline.
The script is executed as:
script nrun=i fn=fn par=p
where i is the file index, fn is the file name, and p is the header after parameter.
- Script after
- is called just after the end of the data taking and can be used e.g. to close the shutter.
The script is executed as:
script nrun=i fn=fn par=p sv0=v0 sv1=v1 p0=p0 p1=p1
where i is the file index, fn is the file name, p is the script after parameter, v0 and v1 are the values of the scan0 and scan1 variables at the present step of the scan loops and p0 and p1 are the scan0 and scan1 script parameters.
- Stop script
- is executed at the very end of the measurement and can be used e.g. to switch off all devices. The script is executed as:
script nrun=i par=p
where i si the file index and p is the stop script parameter.
Next: How can I synchronize
Up: SLS Detectors Software
Previous: What is the meaning
Contents
Thattil Dhanya
2019-04-08