A Standard Experiment
This part explains you how to perform a standard experiment. What we mean by this is a
transmission EXAFS experiment on a suitable sample.
The information written here give you an idea of how to perform an experiment, what is needed from the
side of the control software, i.e. commands, macros, parameter files, etc., slits and sample
alignment, basic understanding of electronics, and standard on-line analysis.
This part is therefore useful for all experiments to understand the underlying concepts of the beamline operation and you should be well familiar with it. The only things changing for other experiments may be the name of motors, the form of signals you look at (alignment..), etc... Experiment may here be used some times in term of a single acquisition scan, and not always in the sense of a whole (4 day or whatever) experiment. Some commands will not be always necessary to execute, but we mention them to introduce them to you and you may be free to use them whenever you think it's appropriate, like EXPERIMENT> wsam or EXPERIMENT> we.
Principle steps
These are the principles steps to perform an experiment:
- Sample preparation
- Preparation of the beamline
- Sample mounting
- Beam and sample alignment
- Data acquisition
- On-line analysis
The different steps are explained below. We do not give all details here for clarity. There are detailed manuals available on all points (like changing the ion chamber's gas filling or mounting a sample). The aim here is to give you an overview. We remind you the EXPERIMENT:: rtsam refers to the motor rtsam in the EXPERIMENT application (in the case of a macro it will be for example HEAT> heat_loop).
We will call for convenience the room temperature sample holder itself sometimes
simply rtsam although we probably mean the whole assembly (motor, vacuum
feedthrough, sample holder itself etc...).
On-line analysis will only discussed shortly. Another step is to transfer your
file to your home institute, which you will find described in a different part.
-
Sample preparation
At this level, we assume that you already have a suitable sample. We will explain in some part, what we understand as a suitable sample, and how to prepare (or at least how we think you could prepare) such a sample in the case of powder materials.
For this example, we assume that you want to measure a Cu metal foil (our excuses to those who may find this example rather boring, but it may as well be any interesting sample in form of a pellet or foil containing Cu...). We assume that the sample has a thickness close to the optimal one. The following example was run in single bunch mode, therefore the average intensity is approximately a factor 20 down in comparison with a normal user experiment. So don't worry if you have more counts in comparison with the values appearing here...
-
Preparation of the beamline
Preparation of the beamline will mean in this context that you want to optimise some things for your experiment.
- Before you start, you check that the front-end is open (green) on the beamline idappli application window (Fig. 2.0). The crystals should always be kept under beam (if possible), to ensure constant thermal load. The HEAT> heat_loop macro should be running, your local contact will in general check this...
- We assume that you want only to work at room temperature and use the room temperature sample holder EXPERIMENT:: rtsam.
- As you want to work on the Cu K edge (E0 = 8.979 keV), absorption of the photon beam through air is still considerable and you may want to eliminate the air path between the first ion chamber and rtsam by putting a vacuum pipe.
- You want to optimise the detectors. Let's say you use the ion chambers.
Then you use the program pression on any terminal window logged
in as opd29 on the beamline workstation to calculate the right fillings,
(e.g. 30% and 70 % absorption yields 0.08 bar and 0.26 bar Ar at
9 keV respectively). You evacuate the chambers, after having checked that
the high voltage is turned off.
Fill the chambers with the required gas pressure. You want in general a total pressure of approximately 2 bar to avoid sparking and will fill up the chambers to this pressure using a light gas, i.e. He. As the pressures in this example are low, it is more convenient to start with the buffer gas. Put for example 1.7 bar He, after add the additional 0.08 bar and 0.26 bar Ar for the first (I0) and rear chamber (I1) respectively. Watch out to have sufficient pressure in the forline to do so (> 2 bar).
If you wish to use the third chamber for a reference sample, proceed in the same way using the same filling as I1.
Switch on the high voltage (1000 V in general).
Fig. 2.0: idappli application window. Here, you get information on the beam mode (injection, user, no-beam, etc.), beam current and dead-time, general machine news. You can also open and close the front-end (FE)
-
Mount the sample
We assume that you want only to work at room temperature and use the room temperature sample holder EXPERIMENT:: rtsam.- Dismount the room temperature sample holder rtsam from its housing. You don't need in general to disconnect the power cable. If you feel you need, switch off the corresponding power supply in the electronic crates! Otherwise you risk to damage the power supply.
- Mount the sample(s) on rtsam, and note the order of your samples
and their approxmiate positions.
Let at least one free position (1 cm or so...) in order to be able to let pass the initial beam. Let's assume here that we mount 3 samples, a pellet at approx. rtsam = 120, and a Ni and Cu foil in a double sample holder at rtsam = 95 and 105, respectively (rtsam moves down for higher values !).Fig. 2.1: Mounting the samples on rtsam.
- Mount rtsam back on it's 4-way cross housing and evacuate the system (not really important for higher energies).
- Don't let any primary pump (except those serving as backing pumps of a turbo for example for the cryostat) run for a real data acquisition as vibration transfer may be a source of noise in the spectra.
- Interlock the hutch.
-
Beam and sample alignment
We assume that you have the third flourescence screen fl3 inserted (normally the case).- Check sample holder positions, EXPERIMENT> wsam
sample postions: RT sample: 50.000 Ref sample: 105.000 Cry sample: 7.000
eventually move the sample holder on a free position, e.g. here: EXPERIMENT> mv rtsam 25 - check energy of the monochromator: EXPERIMENT> we
shows the current position of the monochromator energy Emono,
angle mono, piezo position qg1.
Energy Thetab Queen1 Emono mono qg1 User 15.0001 14.6194 -3749.0000 Dial 15.0000 14.5254 -3749.0000 - move the monochromator to the energy of interest if necessary, for
example E= 9 keV for Cu K edge, EXPERIMENT> mv
Emono 9
(umv instead of mv will allow you to follow the actual position during the move of the motor).
EXPERIMENT> mv_Emonof(value) will move to value with backlash correction. All energies are in keV !
If you forgot where the edge is (...) try out
EXPERIMENT> whatE Cu K
edge energy of element Z= 29 : E= 8.979 keV core hole width Gamma= 0.00155 keV
Arguments are the element (one caracter symbols are followed by an underscore '_') and the edge (K, L1, L2 or L3). The core hole width due to the lifetime broadening is given as well. - After the interlock procedure is completed, you can open the safety
shutter,
EXPERIMENT> shopen - Find the rocking curve, EXPERIMENT> set_RC
0.5
A graph will show you I0 and I1 intensities as a function of the piezo position qg1.
Fig. 2.2: Rocking curve plot from SPEC (obviously done with to low range on I0 (blue curve)).
Possible problems:
- The intensity distribution should reflect a rather Lorentzian lineshape. If this is not the case, the beam is touching somewhere, i.e. you need to do some alignment.
- The lineshape is Lorentzian, but with a flat top: You saturate the corresponding electrometer and need to change to a more suitable range.
- You do not see any signal (although you may see the beam on fl3 for example): you likely didn't switch on the high voltage, or you didn't open the safety shutter, or there is no beam...
- If you do not see an I1 signal, your sample is likely to be not centered and the sample holder covering the beam. Don't worry now...
- Optimising the electrometer ranges
The BM29 electrometer are from Novelec and are called MCCE (well, it's the control unit, anyway that's the part you are working with). mccestat shows the settings, ranges, etc.:
1585.EXPERIMENT> mccestat electrometer #1 [device: D29/e1/ch1] type : 3 freq. : 100 Hz range : 3e-8 Amper CC polarity: positive electrometer #2 [device: D29/e1/ch2] type : 2 freq. : 100 Hz range : 3e-9 Amper CC polarity: positive electrometer #3 [device: D29/e2/ch1] type : 2 freq. : 100 Hz range : 1e-8 Amper CC polarity: positive
mccerange n will give you the same information for channel n only.
type = 3 is medium sensitivity (range: 1e-8 A to 1e-5 A)
type = 2 is high sensitivity (range: 1e-10 A to 3e-7 A).
Ranges given are full range, possible values are either 1e-n or 3e-n.
freq should be 100 Hz, polarity positive for ion chambers and diodes and you should not need to change thoses parameters.
mccerange will change the range. Either you go through the questions and set all ranges or use mccerange n to change channel n.
The current BM29 set-up uses the signal output from the electrometer modules in the experimental hutch transmitted via a fibre optical cable. The optical signal is converted using the VDL card, which is as well used in lock-in operation (when a chopper is needed, for example with photo-diodes). the converted signal is fed into the VCT6 counter cards. This card give approximately 1e6 offset on the signal. The dynamic of the MCCE is 1e7. Therefore you will read a value between 99900 (or so, the offset value) and approximately 1.1e7 on the counters in SPEC, corresponding to no counts and saturated counter, respectively.
dark_currentf(1,0) will measure this offset for you:
1631.EXPERIMENT> dark_currentf(1,0) Beam shutter `bsh1' was OPEN, now is CLOSED Beam shutter `bsh1' was CLOSED, now is OPEN dark counts in 1 s: I0=995026, I1=988448, I2=1021460
Let's say you did setRC 0.5, and ct give youSeconds = 1 I0 = 1.23851e+06 (1.23851e+06/s) I1 = 1.91361e+06 (1.91361e+06/s) I2 = 1.0215e+06 (1.0215e+06/s) FL01 = 0 (0/s) ... ... ...That means that you actually count
I0: 1.23851e+06-995026 = 243484 counts and
I1: 1.91361e+06-988448 = 925162 counts
In a XAFS scan, this offset will be automatically subtracted from the data, but sometimes you need to think about it when you directly look on the counters in SPEC. So let's for example we want to check the range of the first electrometer channel, change it to the next more sensitive one (which would be 1e-8) and verify by counting 1 second:
1655.EXPERIMENT> mccestat 1 electrometer #1 [device: D29/e1/ch1] type : 3 freq. : 100 Hz range : 3e-8 Amper CC polarity: positive 1656.EXPERIMENT> mccerange 1 1e-8 New range for electrometer #1 [D29/e1/ch1] : 1e-8 Amper CC 1657.EXPERIMENT> ct Wed Dec 13 19:11:06 2000 Seconds = 1 I0 = 1.80601e+06 (1.80601e+06/s) I1 = 1.90956e+06 (1.90956e+06/s) I2 = 1.02143e+06 (1.02143e+06/s) FL01 = 0 (0/s) ... ... ...Now you get
I0: 1.80601e+06+06-995026 = 810984 counts, which is a factor 10/3 more than before, as you would expect. As you are in full range = 1e-8 A now, this corresponds to an measured current of
810984/1e7*1e-8 A = 0.811 nA (ok.. this is single bunch !).
You can read those values as well off from the displays on the MCCE heads. So normally you want to work in the middle of the range, which would be some 3e6 to 6e6 counts, but again, this depends on sample absoption before and above edge, etc.. You as well do not want to change the ranges between samples. It takes about 20 minutes to fully thermically stabilise the circuits after changing the range - Sample alignment by eye
If you see the beam on fl3, move to the sample position, here: mv rtsam 15. You should see the sample holder moving on fl3. You may centre the sample by eye, for example by moving back and forth in small steps and choose a suitable position on the sample. Suitable means as homogeneous as posible, no holes, etc... mvr rtsam 1 will for example move the sample holder 1 mm in positive direction, mvr rtsam -2 corresponds to -2 mm in oposite direction. You should do the alignment at an energy just above the absorption edge you want to study. By this you better see possible sample inhomogeneties etc. You may make use of the absorption contrast, i.e. looking both below and above the edge energy.
In the case that you are working with the cryostat, the vertical movement motor is crysam, if you mounted a sample chamber/environment on the Time-and-Precision small table, it will be t2z, if it is on the Huber stages it will be hubz.Important
In terms of sample alignment, we in general mean vertical alignment of the sample. Only if you mount the sample on a small table like the Huber stage, you will have vertical (hubz) and horizontal movements (huby transversal and hubx longitudinal to the beam direction).
Although some other sample holders can be indirectly moved via other motors, we strongly recomment not to do so. For example cht is the cryostat horizontal translation, but actually you will move only the cryostat housing when moving this motor, not the top part of the cryostat where the sample holder is clamped. By doing this, you risk to have the sample holder touching the cryostat somewhere and you risk vibration transfer to you sample resulting in increased noise in the data! To align the beam horizontally on your sample, you will in general choose the opening of the experimental slits horizontal gap ehg to correspond to a suitable size and the move the offset of the experimental slits eho to align the beam on the sample.
Possible problems:
- You do not see the beam. You may play with the monitor settings. If sample or detectors are too absorbing (which should not be the case in an ideal transmission experiment, but it is very often in an fluorescence experiment), this way of centering is not suitable.
- You get a message like (commands given as well):
1703.EXPERIMENT> mv rtsam 150 Move to 150 exceeds high limit of 145 on motor 0, unit 5, "rtsam". Motion canceled
You tried to move the sample holder outside its software limits. - You get a message like (commands given as well, example here for
cryostat sample holder):
1704.EXPERIMENT> mv crysam 24 Clockwise hard limit on motor 6, unit 3, "crysam". Warning: Motor "Cry_Sample" didn't reach final position.
Although you are within the software limits of the motor, you exeeded the allowed range and a hardware limit switch is protecting the motor. This may happend if you did not set the motor to the right value (easy for the cryostat sample holder), or the value was lost (should not happen). Move in opposit direction and set motor to sensible value. - You do not see any signal (although you may see the beam on fl3 for example): you likely didn't switch on the high voltage, or you didn't open the safety shutter, or there is no beam...
- If you do not see an I1 signal, your sample is likely to be not centered and the sample holder covering the beam. Don't worry now...
-
Sample alignment using an intensity scan
A more accurate way to center the sample is looking at the transmitted intensity as a function of the sample position. The concept still holds for fluorescences/TEY experiments, but then you will look at the corresponding signal, which will not give you a drop in the intensity but an increase, etc.
Scan the sample holder around the position you mounted the samples. You want to look at the transmitted intensity, i.e. I1. You need to select the corresponding counter. To select I1 for the plot, use
plotselect i1.
It doesn't matter actually if you forgot to choose the counter before doing the scan: you can always do the selection after the scan and redisplay it using plotselect i1; splot. This feature is useful if you want to look at different channels/counter of the same scan. You can as well extract a scan and plot it via gnuplot or whatever you fancy. If you are in your user directory, and the Extract_M_scan.pl script is there, Extract_M_scan.pl 420 EXP081200 > M420 will extract scan 420 of the SPEC file EXP081200 to a file called M420...
Back to the example... You mounted the samples as in Fig 2.1, a pressed pellet and a sample holder with 2 foils, Cu and Ni. The Cu one is at around rtsam =105, so you could do ascan rtsam 80 130 100 0.2 to scan rtsam from 80 to 130 using 100 steps and counting 0.2 seconds on each point. Positions are in mm, this is therfore already a rather fine scan. You may want to start with 1 mm steps first... The ascan results in a plot like
Fig. 2.3: Plot from SPEC to center the sample vertically. It shows the last ascan command typed in.
The figure shows the non attenuated beam up for rtsam < 91 and rtsam> 127. The middle of the Ni sample is at 96.5, for Cu at 106.5. The distance between the sample holes is 10 mm, so this is ok... The other thing that you notice is that the foils are nicely homogeneous (on this scale at least), while the pellet that we mounted, is a rather good example for a bad sample. If you really want to measure this, you may center the sample at rtsam = 120. The small signal between the samples is due to the absorption of the aluminium sample holders (3 mm), the spike at 111.5 is a thin slit between the two sample holders we used.
Ok... finally. We go to our sample position, Cu foil at rtsam = 106.5
mv rtsam 106.5.
- Check sample holder positions, EXPERIMENT> wsam
-
Data acquisition
-
Parameter files
You prepared in your user directory on the workstation a parameter file for your scan. You actually need two, acq.par contains the general parameters, like if you work in transmission or fluorescence: the keyword detection will be set to detection="absorption" or detection="fluorescence" respectively ect. These keywords need a string, therefore the quotes. In general, this will be set-up by you local contact. The different parameters are described elsewhere and you do not need to know about them at the moment.
The other file is a parameter file you may want to change for different scans, for example because you want different resolutions, measure at different edges, etc. This parfile should be in your user directory and can have any name, we in general use for example Cu_K.par, Cu_XK.par for different parameter files used to measure at the Cu K edge. Cu_K.par may look like this, where you can use the hash to put a comment, like here done to indicate the meaning of the parameters :# setup energy mesh Cu K-edge Ned = 1 # number of edges (0 implies a linear mesh between Eini and Efin) elem[0] = "Cu" # element hole[0] = 0 # edge (0=K-edge, 1,2,3=L1,2,3-edge) Eini = 8.840 # starting energy Efin = 9.360 # final energy DEpe = 0.0010 # pre-edge step in keV Demin = 0.00050 # minimum step in keV (edge region) Dk = 0.030 # constant step in XAFS, in wave vector units Gaf1 = 30 # Gaf1, Gaf2 defines the intermediate region Gaf2 = 10 # between pre-edge and fine steps... setRC_step = 4000 # width of scan for rocking curves (in piezo units) Tmesh = 0 # flag for increasing counting time at at high k Tfin = 0.0 # ... useful for fluorescence measurements
-
Loading and changing files, Emesh
You need to load the parameter files to do a scan.
scan_par Cu_K.par 0.5 2., means that you use the values defined in this file for the scan using 50% detuning (0.5) and 2 seconds per point. There is the possibility to do an increasing counting time using the parameters Tmesh and Tfin (explain elsewhere). The result should be:1700.EXPERIMENT> scan_par Cu_K.par 0.5 2. getting parameters from /data/bm29/external/XXXX/Cu_K.par Getting acq.par from /data/bm29/external/XXXX/ getting parameters from /data/bm29/external/XXXX/acq.par Reading file "/data/bm29/external/XXXX/acq.par".
Possible problems:
- If UNIX paths are not set right, SPEC can not find the files.. p user_dir diplays the path to your directory.
- You may not use the right filename..
- Try to use positive detuning to avoid problems with the detuning algorithm!
Emesh calculates energy mesh of the scan and displays the relevant parameters to you. If you use Tmesh (i.e. other values than Tmesh = 0), then it will tell you as well the approximate total scan time.
You may modify the parameter file via your prefered editor in you user directory, reload it and look at the changes via Emesh, for example if you want less points, shorter spectral range, etc...1704.EXPERIMENT> Emesh Spectrum contains 1 edge # 1 8.979 0.00155 > pre edge region Inital energy 8.679 8.9325 > edge region EXAFS # 1 up to k = 19.8757 spectrum will contain 754 points .... Converting 754 points to mesh in mono steps ....
-
XAS scan
Fine. Let's do a scan! You may want to add a comment in the file header. You can do this using the keyword user_comment, like user_comment = "Cu foil: test scan in single bunch mode". This is again a string, so do not forget the quotes! In principle, you can write several lines using the line delimiter '\n', but you should start a new one with a hash (#), otherwise our on-line analysis programs may not be happy. You can check the values of all varibels by printing them, like p user_comment.
To do the scan, it is just
scan Cu_SB1.dat,
where you can give the filename you want to write the data to. If the files already exist, it will not be overwritten, but scan will create a file called Cu_SB1.dat.1 for you, Cu_SB1.dat.2, and so on...
The scan macro will do the following things:- calculate (again) the scan parameters
- go to the final energy Efin and determine parameters of the rocking curve.
- go to the start energy Eini and determine parameters of the rocking curve.
- do eventually some dummy points to stabilise the feedback algorithm (if dummy_points= "yes").
- perform the scan, printing the file header and the data as well on the screen and in your data file.
-
-
On-line analysis
- Great. We have the scan running. So we may like to look at the data.
We do not use a SPEC plotting to do so... It seemed much better
to us to have all data separately saved in individual files. We simply
use gnuplot to
display the data, which is very easy for you, as
there are just predefined macros to do this and you are free to create
your own once (but please do not overwrite ours...), or just display manually
the data.
Warning:- You should not work on the data file (in this case Cu_SB1.dat in your data directory itself to avoid access conflicts!!! Work always in the on_line directory while the scan is still running. A copy of the data is written to the file ftn30 in this directory.
- There are different macros available.
There are more macros, but this should be enough for the moment. All programs are running in a loop, that means they up-date the data while running. You can best run them as a background process, like shab & if you are familiar in killing the process, when you want. If not, just run them in an terminal window, probably on a second monitor and get rid off them with CRTL C if you want/need. shal does run even before the edge, but this obviously does not make much sense. The estimated noise figure makes sense for a jump around 1, for other values (this approach does not make much sense for flourescence experiments...) you may need to divide by the jump. shal prints you as well the noise values on the screen, together with the values for the jump and the edge energy etc. A shal output may look like:shab display the absorption signal shaq display the absorption signal, I0 and I1, the position of the piezo (feedback to stay on the same position of the rocking curve) shaq2 like shaq, but for a scan with reference sample in sref, displays as well the signal of the reference shal preforms extraction of the XAFS signal and displays chi, k^2*chi, its Fourier transform and a noise evaluation.
tolomeo:~/on_line % shal ------------------------------ JESF program by A. Filipponi ------------------------------ NOME DEL FILE ? >>> FILE NAME: ftn30 ENERGY is in keV! >>> 753 DATA ENERGY POINTS! energies are in eV 11 3 2 2 2 2 0 0 0 0 0 EDGE= 8977.94 SLOPE= 239.5899 JUMP= 1.14519 EWL= 8980.017 hwl= -.289444 edge is at point 107 1 58 r m s noise = 3.15514E-04 noise evaluation from point 170 in 29 intervals 170 190 r m s noise = 5.86950E-03 190 210 r m s noise = 1.92141E-03 210 230 r m s noise = 2.73539E-03 230 250 r m s noise = 2.70958E-03 250 270 r m s noise = 2.89750E-03 ... ... ...The following figure shows the resulting plots at the end of our test scan:
Fig. 2.4: On-line analysis, Cu foil example in Single Bunch mode.
From top to bottom: absorption; chi*k^2; Fourier transform of chi*k^2; noise evaluation.
The algorithm used to estimate the noise doesn't give a reliable value close to the edge. You can see, that even in Single Bunch (example was done with around 9 mA beam current), signal to noise is 4000 (ok.. on Cu foil, but still not bad...) !
- Great. We have the scan running. So we may like to look at the data.
We do not use a SPEC plotting to do so... It seemed much better
to us to have all data separately saved in individual files. We simply
use gnuplot to
display the data, which is very easy for you, as
there are just predefined macros to do this and you are free to create
your own once (but please do not overwrite ours...), or just display manually
the data.