Control Software
OLD PAGE ! It needs some updating, but still a lot of information is valid (Borowski, 2001).
The BM29 experimental station is highly computer interfaced. All motors and sample environment parameters can be controlled by the beamline workstation. This makes it possible to have control over all the sample environment parameters. It is relativly easy to add new motors if required by the users, but please contact us in advance, if you intend to bring additional equipment that you would like to control through the workstation.
The workstation is a HP-UX10 and the software control for the experiment is throught the SPEC package (for a complete documentation, you may try SPEC help collection of the BLISS group).
We encourage you to study the related sections of our home page before starting your experiment. It will help you in saving time for taking your data !
Users who are unfamiliar with basic UNIX commands should consult UNIXhelp for Users. This may also act as an on-line help if you do not remember UNIX commands during your experiments. Nevertheless, we will give compilation of the basic commands to survive in Basic Commands. For each proposal number, ESRF opens a temporary account on the NICE computer cluster. See below (Filetransfer/Access) for additional help on this topic.
All sections concerning computing are written in the following way:
Emono, qg1, reserved names of motors, and commands are written in green color, the names of applications in addition in capitals. Inputs and outputs on the terminal are written in red, things you have to type in are in bold letters, variables are in italic. For example mv motor position means that you have to type mv qg1 0 if you want to move motor qg1 to its zero value. login: hc359 means that the computer displays 'login' on the screen and you should type 'hc359'. The use of a character in combination with <Control> (or <Ctrl>) is used by ^C for + 'c'.
The workstation
The experiment is controlled by a HP workstation. There is a main terminal/display and an additional X-windows terminal which both can be used to run applications and to do data analysis. A Personal Computer is also available.
The typical screen on the workstation terminal may look like this:
the light brown window is the SPEC MONO application, the orange one is the EXPSLITS one. On the right top part, one can see the SIGMON window and below this, a terminal window (dtterm) opened by the user. The bar on the bottom of the screen with the different symbols is the menu bar which allows you to start the different application. The different applications are activated via mouse click. You may click on a part of the above picture to get more information on the different windows. A more detailled description of the menu bar follows, the SPEC applications are explained in Acquisition software.
The menu bar
Basic Commands
Basic UNIX commands
| cd | change to the main directory |
| cd dir_name | change to directory dir_name |
| user | change to the user directory where data files are stored |
| onl | change to the on-line directory for on-line data-analysis |
| post | change to the postscript file directory |
| mkdir dir_name | create directory dir_name |
| cp file1 file2 | copy file1 to file2 |
| rm file | remove file |
| emacs file | calls the emacs editor to modify file |
Basic SPEC commands
BM29 is currently controlled by two SPEC applications. These two applications are generally already running when the user arrives. If the are not running, they can be started using the application control panel on the workstation. When starting MONO, you have to answer some questions by simply typping .The two applications are corresponding to two windows on the beamline workstation, entitled by the name of the application:
MONO to control the monochromator, the primary and secondary slits, the mirror chamber, the sample holders. Basically all motors that you would like to move in a user-macro have to be defined in this application.
The main motors are:
| Emono mono qg1 tt1 pvg phg |
monochromator energy monochromator Bragg angle position of the piezo for detuning position of the motor for a coarser adjustment of the detuning vertical aperture of Primary Slits horizontal aperture of Primary Slits |
The second application EXPSLIT is used to move experimental tables and the experimental slits.
There are a certain number of basic commands to remember:
view motor status
| wa we wps wss wsam |
all motors in MONO only: Emono, mono, qg1 in MONO only: primary slits in MONO only: secondary slits in MONO only: positions of sample holders ect. |
move motor
| mv motor position | absolute move of motor to position |
| mvr motor delta_position | relative of motor by delta_position |
| umv motor position | like mv, but the position is written while moving |
The motor positions are stored in the array A: A[1],A[2],.... you can also print the value of for example the second motor using p A[2] (p for print).
>counting
| ct time ct |
counts for time seconds default: 1s |
The counting command read out the counters and display their contents on the screen. The counter values are stored in the array S: S[1],S[2],....
SPEC scan commands
| timescan time | counts without changing motor positions for time, (default 1 s) |
| ascan motor ini_pos fin_pos n time | linear scan of motor from ini_pos to fin_pos with n points, time s/point. motor will stay at fin_pos |
| dscan motor d_min d_pos n time | like ascan, but scanning from x+d_min to x+d_pos, where x is the start position, to which motor returns also after scan |
These basic SPEC scans are automatically plotted on the screen, it is possible to switch the displayed variable with the command plotselectn1 n2... where n1 n2 ... are the channel numbers in the counter array.
| for I0 for I0 I1 for log(I0/I1)) |
plotselect 1 plotselect 1 2 plotselect 4 (VDL card only) |
At the end of the scan it is possible to view other counters with
plotselect n
splot
(screen plot)
The displayed spectrum can be plotted on the laser printer with
pplot.
Important: You can stop each scan be typing ^C. This should be done for example if you started scannning a motor to a unwanted position. dscan will return to the old position after ^C. An error message may occur telling you that the motor didn't reached its final position. In addition, a mismatch between the values of the motor position in SPEC and from the controller may occur. In this case, always answer the question to change the value with no, unless you are sure about what you are doing. In general, all motors have limit switches (hard limit) and/or soft limits controlled by the software, so that it should not be possible to destroy anything.
The users are kindly ask not to change any configuration in the SPEC applications without contacting the beamline personnel.
macros
In SPEC it is possible to built higher level commands combining a sequence of basic instructions.
The commands we use to run the beamline for example, are such macros like scan to run an EXAFS scan.To quit the SPEC applications, always use ^D or quit. This will store the current definitions.
On-line data analysis
There are a set of commands to display on-line the data acquisition that is in progress, and to quickly compare or analyse collected data.These commands consist of a set of gnuplot script files and a Fortran analysis program (jesf). There are several www-based help pages for gnuplot and a LaTeX manual is available at the beamline.
The following commands have to be executed in an user terminal window. You have to
be in the on-line directory (/users/opd29/on_line) to be able to use the on-line
analysis package. Commands using the analysis program
jesf may work correctly only above the absorption edge.
| onl | change to the on-line directory |
| shab | shows the absorption spectra being recorded |
| shaq | shows sequentially the absorption spectra, I0 and I1, and qg1 |
| shaq2 | like shaq, but displays in the case of 3 channels I0,I1 and I2 |
| shof | shows succesive absorption spectra when using the film macro |
| shts | shows single enery absorption as a function of the sample temperature |
| shal | runs analysis program and shows chi, k2chi, modulus of FT (Fourier transform) and the signal to noise ratio |
| shex | runs analysis program and shows chi |
| shex2 | runs analysis program and shows k2chi |
| shfo | runs analysis program and shows modulus of FT |
User data analysis
You may want to analyse data and to compare different spectra. This can be done using several programs in combination with gnuplot. You should be in your user directory, where all your data are stored. If you use the output="complete" keyword (not implemented yet !!) in acq.par then you find the chi, k2chi, FT and signal to noise spectra in the user analysis directory (user_dir/analysis) and you can compare them directly by plotting them via gnuplot.Otherwise you can use manualy the following commands.
| user | change to the user directory |
| ls | list the directory content |
| avexas | run avexas program to average files. You will be asked to specify number of files, names and output file name |
| jesf | run jesf analysis program. You will
be asked to specify the input file name (ftn30 is default).
Output files are ftn92: signal to noise ratio ftn95: chi ftn96: k2chi ftn97: modulus of FT This files should then be copied via cp ftn9x out_file and can then be plotted via gnuplot |
See here for help on gnuplot, one of the online document (search in Google or so..) or consult the LaTeX documentation at the beamline.
Data acquisition software
The data aquisition on BM29 is controlled via the SPEC application. Further informations can be found under Computing or Basic commands. In this section, we will only provide the basic information to enable you to collect data. Data aquisition via SPEC on BM29 is performed using a script file called a macro, which controls the monochromator, counter reading and file handling. These macros can in principle be written by the user to perform specific tasks, but in general BM29's standard aquisition macros should be sufficient to cover most tasks. We have developed a series of macros to perform different x-ray absorption experiments in an optimized way. The three possible basic scan modes: EXAFS scan, sequence of fast XANES spectra and single energy x-ray absorption detection. The scanning mode is controlled by a couple of keywords, to which appropriate values have to be assigned by the user. The scan is then performed typing the name of the scan macro and eventually some parameters.
Parameter files
The values of the keywords are in general declared in 2 parameter files. This are the acq.par and the scan parameter file, which can have any name chosen by the user. These two files have to be in the user directory (change to this directory with user).
Important: SPEC is an interpreted language and case sensitive. As a consequence, your macros or definitions are not checked for typing errors. Typing detection="Absorption" or Detection="absorption" instead of detection="absorption" will result in a non interpreted value to a variable in the first case, which may cause a macro to stop, or create just a new variable in the second case. You should carefully check your definition for such errors.
The parameter files you need in your user directory are the general aquisition parameter file acq.par, the scan parameter file and eventually additional files for special purpose.
The acq.par file contains the general definitions that determine how the experiment is performed. These parameters are in general set by your local contact and do not in general need to be changed during an experiment. You can add comment using a hash (#).
Keywords in acq.par
| keyword | value | purpose |
|---|---|---|
| acquisition | VDL_2 | Photodiodes, Chopper on, 2 channels |
| VDL_3 | Photodiodes, Chopper on, 3 channels | |
| VCT6_2 | Ion Chambers, chopper off, 2 channel | |
| I0 Ion Chamber, I1 NaI detector for diffraction | ||
| VCT6_3 | Ion Chambers, chopper off, 3 channels | |
| 13_element_Ge | I0 Ion chamber, 13 fluorescence channels | |
| special | users defined user_acqui command | |
| detection | absorption | writes ln(I0/I1) in column 2 of the data file |
| fluorescence | writes I1/I0 in column 2 of the data file | |
| feedback | intensity | standard mode, corrects derivation from a chosen detuning |
| intensity_glitch | suggested for low-energy edges, needs additional definition file | |
| linear | linear correction | |
| off | no feedback | |
| feedback_method | find_RC | uses the quick BM29 algorithm (default) |
| setRC | uses slow standard algorithm to find RC parameters | |
| delqg, contr | additional parameters to control the correction, set by your local contact | |
| RCscan | execute | rocking curve is performed prior to each scan |
| separate | rocking curve is not performed | |
| sample_par1 sample_par2 |
cryo_head cryo_rodA cryo_rodB mono_thc pyrometer thermocouple off |
writes the temperature of the chosen sensor in the data file as sample_par1 or sample_par2 or switch it off (off) |
| cstring | on off | switches the writing of a user command in the data file on/off |
| output | printer | prints the results at the end of the scan on the laser printer |
| complete | like print, but writes in addition analysis files (chi, k2chi, FT, signal to noise) in the user analysis directory (not yet implemented !!!) | |
| postscript | make postscript files of the results | |
| none | no graphical output | |
| beam_check | yes | stops the acqusition in the case of beamloss |
| no | beam check is not performed | |
More information on feedback. An example of an
acq.par is given here.
Scan parameter file
The energy interval and spacing for an EXAFS scan are specified in a scan parameter file. The user can prepare several such files for different absorption edges or different energy sampling at the same edge. Examples of these files can be found in the ~/par_library directory. As an example we report below the file (Mn_K.par) suitable for collecting data at the Mn K-edge in constant k-mode. The meaning of the different variables is indicated in the parameter file after the hash. All energy values are in keV. There are some changes with respect to former versions. You can now just give the name of the element using its symbol (add underscore for one character symbols like W_) and the edge you would like to measure (K, L1, L2, L3) and MONO will know automatically the right energy and core hole width.
# setup energy mesh Elem = Mn # Element Hole = K # Edge, K, L1, L2, L3 Eini = 6.45 # first energy point Efin = 7.5 # last energy point DEpe = 0.005 # energy step in the pre-edge region Demin = 0.0002 # minimum energy step around the edge Dk = 0.03 # step in k-space above edge (1/Angstrom) # Gaf1=30. # starting point of intermediate region (step = DEpe) Gaf2=10. # last point of intermediate region (step = Demin)
You still can give the corresponding values for the edge energy and width manually by putting Elem = 0 for the corresponding edge. In this case, the values for Eedg and Gamma given in the scan parameter file will be used.The following figure shows scematically the resulting energy step versus the scanning energy:
Multiple edge scan and linear mesh
You can perform a scan over up to 5 edges (continuous energy interval). Then you need to define the additional parameter Ned for the number of edges and Elem2, Hole2, ect.Gamma2, Eedg2 are read if Elem2 = 0 and so on. Ned=0 can be used to perform a scan with linear energy mesh. The number of points in a scan is limited to 10000.
File transfer/Access
This file has not been updated since some time, specially this section. If you have any problems, please refer to ESRF visitor computing help link.
Concerning the presentation style of terminal in- and output, see the general information.
Temporary NICE account
Filetransfer to the NICE
cluster
Filetransfer from NICE to your
home workstation
Access to NICE from outside
ESRF
Temporary NICE account
For each proposal, ESRF opens a temporary account on the NICE cluster.This account can be used for sending or receiving mails, data analysis and storage; we also encourage you to use this account if you want to connect to your home workstation or to use things like netscape [for example to read this manual]. By using the beamline workstation, problems due to memory overload may occur resulting in increased acqusition deadtime or worse !
The NICE account is erased 6 weeks after your leave from ESRF. You are responsible for the transfer of your data during this time to your home (off-side) account. All data on the NICE account will be lost after this period.
The login name is the proposal number. Please use the password that was
sent with your proposal acceptance notification.
For instance proposal HC359 corresponds to the account
login: hc359
password: your_password
For security reasons, you may change the password at your first login with the UNIX command
passwd
The NICE cluster consist of several workstations, for example silver1,..., silver9. To connect to one of this machines from any terminal window/xterm at ESRF, type for example
telnet silver5 or telnet nice
Filetransfer to the NICE cluster
Your data files are stored during the acquisition on the beamline workstation.
You should transfer your data to the NICE cluster at least to transfer them
to your home workstation after the experiment.
It is advisable to transfer the data to NICE even during the
experiment, specially if you want to do additional data analysis. In
addition, the NICE cluster is automatically backed-up.
From the users directory on beamline workstation (zapata) type
ftp silver1
login: your_account
password: your_password
prompt
(this is optional, to avoid separate queries)
eventually change to a former created directory with
cd dir_name/path
mput *
(eventually type y or n if used without
prompt)
quit
Additional help on ftp can be obtain from UNIX via
man ftp.
Filetransfer from NICE to your home workstation
ESRF discourage the transfer of files over the network, however this does not apply to EXAFS since data occupy a limited amount of memory.
Several machines are available but you should use silver1
for this transfer purposes. First log in to silver1 as shown in
Temporary NICE account. Go to the directory where you
transfered your data from the beamline workstation.
Type
ftp out
users@node.domain
(This is your account in your home country)
Now you can eventually change to a former created directiry on your home account and transfer the data jsut like explained in Temporary NICE account using prompt, mput *, and so on. Quit the application when finished.
Access to NICE from outside ESRF
For the time that you have your temporary NICE account, You can access silver1 from outside ESRF. This can be used for example to prepare your experiment (transfer reference data-files to your NICE account, prepare or copy macros, install a directory structure ect.) or to transfer datawhen your back in your home institute via ftp. For this use:
telnet firewall.esrf.fr
silver1
Use you login name and password (temporary NICE account). ftp firewall.esrf.fr works in the same way for if you need to transfer data.