Upload
truongthuy
View
219
Download
0
Embed Size (px)
Citation preview
Quick-XAFS
Introduction
X-ray absorption techniques such as x-ray absorption near-edge spectroscopy (XANES) and extended x-
ray absorption fine structure (EXAFS) can be used to determine the local coordination environment and
oxidation state of nano-crystalline and amorphous materials.1 These techniques are important to the
study of catalytic processes wherein the catalytic materials undergo change of phase through red-ox
reactions and or deactivation. Conventional x-ray absorption techniques can take a “snap shot” of the
catalyst phase during a reactions progress via ex situ methods where care is taken to prevent oxidation
or preferentially, via in situ methods where a passivated (oxidized) catalyst is reduced. However, during
in situ studies all data between the oxidized and reduced catalyst phase is lost due to the poor time
resolution of conventional X-ray absorption data acquisition techniques. The time over which the scan
takes place is slow: the monochromator accelerates, decelerates, stops, data is collected over a one or
two second integration time, etc.
In order to speed up the rate at which x-ray absorption data can be acquired two divergent techniques
have been employed. The x-ray dispersive technique utilizes a polychromatic x-ray beam and a bent
monochromator that allows for spatial resolution of energy levels across a photodiode array. These
techniques were pioneered as early as 1986 by Dartyge and colleagues.2 This technique allows for fast
data collection but generates noisy data because higher harmonics can not be easily detuned from the
spectra. Another technique used at X18B of the National Synchrotron Light Source employs a double
crystal monochromator that is coupled to a micro-stepping motor and cam. In this technique data is
collected “on the fly” while the monochromator selectively permits x-rays of a specific energy to pass
through it by Bragg diffraction. This technique has was used by Murphy and colleagues to reduce the
data acquisition time to 50% of the conventional x-ray absorption scan.3 Using this technique the time
of data acquisition is sped up because the monochromator needs to decelerate, stop, and accelerate
only when it reaches its maximum and minimum bragg angles. The resulting energy of the diffracted x-
rays ultimately varies as a quasi-sinusoidal function of time.
Since the studies of Murphy and colleagues many advances in data acquisition techniques have been
made which allow for quicker data acquisition and subsequently better time resolution of x-ray
absorption spectra. These improvements ultimately allow for the reliable application of quick x-ray
absorption techniques to study the kinetics of catalyst phase transformations. Quick x-ray absorption
techniques pioneered at Brookhaven National Laboratory’s (BNL) National Synchrotron Light Source
(NSLS) are proving to be reliable in imaging the in situ phase transformation of nano-particulate
catalysts. These QXAFS data are being comparatively analyzed with fractional conversion and product
selectivity data acquired via SCC gas handling systems to develop new theories, prove reaction
mechanisms and ultimately design more efficient catalysts and chemical processes.
[1] Koningsberger, D. Prins, R. Chemical Analysis 1988 92
[2] Dartyge, E. Depautex, C. Dubuisson, J. Fontane, A. Jucha, A. Leboucher, P. Tourillon Nuc. Inst. and
Methods A 1986 246 452-460
[3] Murphy, L. Dobson, B. Neu, M. Ramsdale, C. Stange, R. Hasnain, S. J. Synchrotron Rad. 1995 2 64-69
X18B Technique
Beamline X18B of the SCC is capable of collecting and processing quick-XAFS data. The current data
acquisition method collects 60K points/minute using a Keithley current amplifier, a sixteen channel VME
analog-digital-converter (ADC), and custom programmed Linux based software. The bragg angle of a
Si(111) double crystal monochromator is controlled via an assembly containing a micro-stepping motor,
a rotating cam, and a small brass lever arm directly attached to the monochromator tangent arm [Figure
1]. This setup results in high resolution quick-XAFS energy data that varies as sinusoidal function of time
with a frequency that is inversely proportional to the time resolution of the quick-XAFS scan. This data is
then processed with Crop Chop series software to provide users with individual and time resolved EXAFS
or XANES scans that can be analyzed in Athena or Origin.
Figure 1. A close up of the cam and the small brass lever arm. The rotating cam moves the small lever
arm that is coupled to the monochromator tangent arm up and down around the pivot-point.
Crop N’ Chop 2.0
Crop N’ Chop 2.0 (CNC) will process Quick X-ray absorption fine data (QXAD) collected at Brookhaven
National Laboratory National Synchrotron Light Source beam lines X18B, and X19A. This program
enables the user to create time resolved EXAFS or XANES scans of in-situ chemical transformations by
outputting ASCII data files that can be plotted in programs such as Origin. Ultimately, data processed
with Crop Chop series programs will enable Synchrotron Catalysis Consortium users to elucidate the role
that nano-catalysts play in chemical reactions.
About this Manual
This manual will help you to become familiar with the Crop N’ Chop 2.0 environment and its method of
Quick X-ray absorption spectroscopy data processing. It completes this objective by providing exercises
that will guide you through the processing and calibration of QXAD using CNC, related software, and
other techniques. After you complete basic exercises using the CNC software detailed information about
the algorithms and principles on which CNC operate are presented. This will enable you to tailor your
data collection techniques to ensure that the data you process with CNC is precise and presentable.
Section 1: An Introduction to Crop and Chop via Examples
1.1 Program Activation for CNC Copies Acquired via Email or the SCC website
1) Unzip the contents of the Crop and Chop 2.0.zip file. Programs such as WinZip or WinRAR can be used
for this purpose. Trial versions of these programs can be downloaded free of charge from
www.winzip.com and www.win-rar.com.
2) Rename the Crop and Chop executable file with extension .ex to .exe. Make sure that the file Crop
and Chop 2.0.ex file is not confused with the example files that are named CC20.ex1, CC20.ex2, etc.
1.2 Example: Basic File Processing
1) CC20.ex1 is located in the directory which contains the Crop and Chop 2.0 executable. CC20.ex1 is an
ASCII file containing data collected at X18B from a Cu foil which should be viewed with WordPad.
a) There are seven rows, one of which is labeled time. The time contained in this row is the start time of
the Quick X-ray absorption scan in Linux time.
b) Note that in the file there are 5 columns below the first seven rows. These columns correspond to
time, Io, It, PIPS and the Heidenhain encoder respectively.
2) Run the Crop N’ Chop executable.
3) “Enter the edge energy in eV of the element under investigation.” The CC20.ex1 is a Cu foil QXANES
scan which was collected in fluorescence mode. The edge energy of Cu foil is ‘8979’ eV. Enter this value
and press enter on the keyboard.
a) Crop and Chop 2.0 will implement a check to ensure that you have entered the correct value of Eo. If
the proper value of Eo was entered type ‘yes’ and press enter on the keyboard.
b) Or else enter ‘no’ and press enter to repeat step 3.
4) “Enter the Heidenhain encoder value at Eo.” The Heindenhain encoder value is the digital signal that
corresponds to the Bragg angle of the monochromator. A linear relationship with a fixed slope is used to
model the relationship between the digital signal and the Bragg angle of the monochromator. Therefore,
one point in the spectra must be specified in order to model the energy of the X-rays that are permitted
to pass through the monochromator at any time in the scan. Eo is chosen because it can be identified
easily with the condition that it occurs where dMu/dE=max. The process of determining this value will
be explained in Section 4. For this series of spectra it was determined that the Heidenhain encoder value
at Eo was ‘-4040478839701’. Enter this value and press enter on the keyboard.
a) Crop and Chop will implement a check to ensure the correct value of Heidenhain encoder value was
entered. If the proper value was entered type ‘yes’ and press enter on the keyboard.
b) Or else enter ‘no’ and press enter to repeat step 4.
5) Next CNC will request the range of data that you would like to have processed in the scan. This data
contained in this QXANES scan has an energy range which is roughly from 8920 eV to 9100 eV.
a) “Enter how far below the edge in eV data should be processed.” Enter ‘50’ and press enter.
b) “Enter how far above the edge in eV data should be processed.” Enter ‘100’ and press enter.
c) CNC will implement a check to ensure the correct energy range has been entered. The energy range
should be from 8929 to 9079. If the proper energy range was entered type ‘yes’ and press enter on the
keyboard. Or else enter ‘no’ and press enter to repeat step 5.
d) Note that we did not extend our data processing range to the limits of the range of data that was
collected. The Crop and Chop algorithm will not split the data files if we give it the maximum and
minimums of our energy range. When you are processing your data play with the limits to find the
largest range of data that will allow CNC to chop your QXAD files into the proper number of spectra.
6) “Would you like to process multiple files which are arranged in chronological order?” Enter ‘no’. This
function accesses CNC’s Agglomerate function which can be used to process QXAFS data files that were
collected successively with SCC QXAD acquisition techniques.
7) “What would you like to name the directory were your files will be stored?” Enter ‘Cuf’ and press
enter.
8) “Enter the number of files that you would like to have processed.” Enter ‘1’ and press enter. In this
example only CC20.ex1 will be processed. CNC has the capability of processing many files during one
execution so that you do not have to go through each of the steps in Crop and Chop every time that you
need to process a new file.
9) “Enter the names of the files that you would like to process separated by a space.” Enter ‘CC20.ex1’.
10) At this point the screen will read “Processing File CC20.ex1” and subsequently 5 new files are
created because each time that the CC20.ex1 data was inside of the input data range (8929 to 9079 eV)
a new file was created containing data for one QXAFS scan.
11) The program exits. Now it is time to understand the output of CNC.
12) In the directory containing the CNC executable there will be a folder called Cuf. In this folder there
will be one folder named CC20.ex1 which will contain all of the data processed by CNC. If we had
processed multiple files there would have been multiple output folders each labeled with the name of
the input data files that were processed by CNC.
13) Inside of the folder CC20.ex1 there will be two folders, one labeled Noisy, and the other labeled
Smooth, and there will be two files EovsT.txt, and log.txt.
a) QXAD taken directly from the CC20.ex1 is contained within the folder Noisy. There are 6 data files
contained within Noisy which are labeled beginning with CC20.ex1. There is one file that is labeled
CC20.ex1.master.txt which contains all of the data inside of the 5 other files. These other files contain
data from each of the individual XANES scans in the QXANES run. The 5 scan files a named with a
number corresponding to the start time of that particular QANES scan which precedes .txt. b) Data
smoothed by CNC are contained within the folder Smooth. The data files there follow the same
nomenclature as those that are contained within Noisy with exception of the addition of “smooth” in
the file names. These files can be viewed with graphing software or Athena.
c) The file EovsT.txt is data that contains the Eo for each of the 5 scans as determined from the
transmission and fluorescence data. Note the first and last columns of data contain incorrect Eo values.
This is due to the fact that the 1st and 5th data files contain data from only a part of a XANES scan;
therefore, when CNC finds the Energy at which dMu/dE is a maximum it finds the wrong Eo. In your
independent studies use caution before presenting the data in EovT.txt. The values as dMu/dE are
calculated in CNC’s smoothing routine.
d) The log.txt file contains data that were used in the processing of CC20.ex1 and is important for
troubleshooting in your independent studies.
1.3 Example: The CC Agglomeration function and 3D Time Resolved Spectra
This example will teach you how to process multiple files which were collected successively using SCC
QXAFS data acquisition techniques with the Agglomeration function in CNC. After you successfully
execute CNC you will create a 3D plot of the QXAFS scans using Origin. In this section the symbol >>
leads you through the nested menu in Origin. For example the sequence File>>Open directs you to pull
down the File menu and select Open.
1) Complete steps 1 through 5 of Section 1.2.
2) “Would you like to process multiple files which are arranged in chronological order?” Enter ‘yes’ and
press enter on the keyboard. By entering yes you have called the Agglomeration function in CC.
3) “What would you like to name the directory and output files?” Enter ‘CuA’ and press enter. When the
Agglomeration function is called the output files will not contain the name of the input data files like the
example in section 1.2.
4) “How many files are you planning to process?” Enter ‘2’ and press enter. Three example files are
placed in the same folder as your CC executable.
5) “Enter the names of the files that you would like to process in chronological order and separated by a
space.” Enter ‘CC20.ex2 CC20.ex3’ and press enter. This is the same format that you would use if you
were planning on processing multiple files without calling the Agglomeration function.
6) The files CC20.ex2, and CC20.ex3 each contain 5 minutes of QXAFS data. After you press enter there
will be a brief pause and the prompt will display messages in the following format “File CC20.ex2
agglomerated”, etc. After the three files are agglomerated the file Agglomeration.txt is opened for
reading as indicated by the following prompt “Processing file ./CuA/Agglomeration.txt” The file
Agglomeration.txt contains all of the data that was in the files CC20.ex2 and CC20.ex3. Then you will see
the message “File# 1”, “File# 2”, ……….. “File# 40”. These prompts just show that 40 scans were collected
and processed by CNC. The program exits.
7) Open up the folder CuA located in the same directory as your CNC executable. Inside of the CuA
folder the setup is similar to that of the CNC output when Agglomeration is not called. Inside of CuA
there are two folders and three files which are Noisy, Smooth, Agglomeration.txt, EovsT.txt, and log.txt
respectively. a) The two folders Noisy, and Smooth, and the two files EovsT.txt, and log.txt are exactly
follow the same format as those created without the CNC Agglomeration function. See step 13 of
section 1.2 for details. b) The file Agglomeration.txt contains all of the spectral data from the files
CC20.ex2, and CC20.ex3 and the start time of CC20.ex2. It is an intermediate in the CNC processing
algorithm and generally will not be of any use elsewhere.
8) The file used to create a 3D time resolved spectral plot is located within CuA\Smooth\ and is named
CuA.master.smooth.txt. In this file you will notice that there are 9 columns: Energy, Time, Io, It, PIPS,
T_Mu, dT_Mu/dE, F_Mu, dF_Mu/dE. Where the T and F are for transmission and fluorescence
respectively. The important columns for this example are: Energy, Time, F_Mu, and dF_Mu/dE.
9) The subsequent instructions were developed based on OriginPro 7.5 software; your results may vary
depending on your version of software.
10) Open Origin. File>>Open find the directory where CuA.master.smooth.txt is located and change the
Files of type: tab along the bottom of the open window to read ASCII Data (*.dat;*.csv;*.txt). Select
CuA.master.smooth.txt and press open in the lower right hand screen of the open window.
11) Maximize the window that appears on the Origin screen and notice that there are the 9 columns
each of which is labeled by the name of the column in the ASCII file and a designation in parenthesize
which will be either an X or a Y. These correspond to the default axis that each column corresponds to in
a plot. The next step is to select the column labeled with Io, right click on it, and Set As>>Disregard.
Repeat these steps for the columns It, PIPS, TMu, dTMu/dE, and dFMu/dE.
12) Select the column FMu, right click on it, and Set As>>Z. Ensure that the column is highlighted and
Edit>>Convert to Matrix>>Random XYZ.
13) A window labeled Random XYZ gridding will pop up. In the upper right hand corner ensure that the
tab labeled Select Gridding Method is set to Renka-Cline and click on the OK button at the bottom of the
window.
14) A window labeled “Attention!” will display that “Duplicate XY pairs found, replace with mean Z
value.” click on the OK button.
15) With the Matrix1 screen active select Plot>>3D Color Map Surface. A plot of the matrix data will
appear. The edges will be distorted because the data in not in a uniform grid. No detailed features will
be present at this point because Origin plots by default in speed mode. This is so that each time a small
change to the figure is made Origin does not have to reload 10 MB of graphics.
16) Do not alter the data in the matrix; change the axis ranges so that the imaginary data is not
presented. This can be done by double clicking on the axis of interest and clicking on the “Scale” tab that
will be in the popup window. Set the x-axis range to 8940 to 9070, the y-axis range to 10 to 610 and the
z-axis range to 0.25 to 0.7.
17) Right click on the plot and select Plot Details. A window “Plot Details” will appear. On the left side of
the window there will be a tab “Layer1”, click on the “+” to the left of it this will open up a “Matrix1”
tab. Now on the right side of “Plot Details” window select the tab labeled “Grids” inside of the Grids tab
there will be a tab “Grid Line Width” in this tab, set the grid line width to 0.2.
18) With the Graph1 window active File>>Export Page. After a “Save As” window appears click the
“Save” button.
19) Open up your newly created file. It should be similar to Figure 2 below. Origin has a variety of other
features that will allow you to further tailor your image. However, this process will be left for your
independent studies.
Figure 2. The example figure produced from Section 1.3 example. Results in your independent studies
may vary and are strongly dependent upon the resolution of your data.
Section 2: Crop and Chop 2.0 Output
In the Crop N’ Chop 2.0 series software there are two main output systems. The output format is
dependent upon whether or not CNC has called the Agglomeration function. When CNC is run in
standard mode (Agglomeration is not called) there will be a series of folders inside of the user input
directory name which contain data corresponding to the file that the folder is named after. In
Agglomeration this system is not used because all data is processed from the file Agglomeration.txt and
therefore a series of folders are not required to organize the data within the user specified directory
name. The names of the files that are output when Agglomeration has been called by CNC are specified
by the directory where the data was stored because there is no longer a specific file that is associated
with the QXAFS scan. Effective use of the SCC data collection techniques and CNC can produce the data
which is present in Figure 3 at the end of this section.
2.1 The Noisy Folder
All QXAD that is collected using SCC techniques is inherently noisy because the integration times over
which signals are collected are on the order of 0.001 seconds. The Noisy folder is used as a storage point
for all of the data that is directly taken from the SCC QXAFS files. The noisy folder is located within the
user input directory name if Agglomeration was called and is located within the input file name if
Agglomeration was not called. In either case the format within the Noisy folder is identical.
Inside of the Noisy folder there are a series of files all of which are labeled by the following conventions.
The name of the file comes first and is followed by a period. After this a number is placed directly before
.txt. This number corresponds to the start time of this specific scan. This can be verified by opening a
given file and noting that the number with which a file is named corresponds to the first value of the
fourth column rounded down to the nearest integer value. Along with all of the files that contain a
number directly preceding the .txt extension there is a file which contains the .master.txt extension. This
file contains all of the data from the files in noisy and is useful to view the data in a 3D plot. (See section
1.3) The format inside of each of the files is exactly the same. In general there are 10 columns. The
following respectively lists there order and function.
1) Energy – calculated directly from Mono_Deg and Bragg’s law. Used to define the energy of x-rays
permitted to pass through the monochromator at every instant in the QXAFS scan.
2) Encoder – The raw signal converted to base 10 by the VME encoder from the base 2 signal output by
the Heidenhain encoder. This signal is collected by the SCC on-site QXAD collection computer and
corresponds to Bragg angle of the monochromator.
3) Mono_Deg – the Bragg angle of the monochromator calculated from the Encoder signal and the
model linear model of the Bragg angle as a function of the Encoder signal. (See Section 3.1 and 3.2)
4) RunTime – The time of the QXAFS scan offset such that the QXAD file was initialized is 0 by the SCC
data acquisition system is zero.
5) Io – The signal collected by the Io detector. Proportional to the incoming flux of x-ray photons
incident on the QXAFS sample.
6) It – The signal collected by the It detector. Proportional to the flux of x-ray photons transmitted
thought the QXAFS sample.
7) PIPS – The signal collected by the solid state pips detector. Proportional the flux of x-ray photons
emitted from the QXAFS sample by fluorescence, errors can be induced in this value due to heating of
PIPS detector or Compton scattering of the x-rays incident on the QXAFS scattering. Care should be
taken to reduce these errors are inherent to the fluorescence experiment.
8) Mu – The transmission coefficient – the log of Io divided by It.
9) PIPS/Io – The transmission coefficient calculated based on fluorescence data – PIPS/Io.
2.2 The Smooth Folder
The contents of the smooth folder are similar to those of the Noisy folder. The smooth files are named
with the root name followed by “.smooth.”. The one file has a .master.txt extension and the others have
the time at which the scan started as a extension followed by .txt. This makes it easy to differentiate
between data files which have been processed by CNC’s smoothing algorithm. The data in the
smoothing file depends on the number of points smoothed in CNC’s smoothing algorithm with
exception of the Energy and Time columns which are not smoothed by the SGS algorithm. These files are
kept raw because they allow for tracking of values between the noisy and the smoothed data. In general
an increase in window size of CNC’s smoothing algorithm will decrease the resolution of our data but
can increase the precision of each smoothed data point. (See Section 3.3)
The format inside of each of the files is exactly the same. In general there are 9 columns. The following
respectively lists there order and function.
1) Energy – The energy of the x-rays that were incident on the QXAFS sample at the center point of the
SGS window. The linear regression of smoothed data fitted vs. Energy.
2) Time – The time at which the center point of the SGS window was collected.
3) Io – The smoothed Io detector signal.
4) It – The smoothed It detector signal.
5) PIPS – The smoothed solid state PIPS detector signal.
6) T_Mu – The smoothed transmission coefficient.
7) dT_Mu/dE – The derivative of the transmission coefficient.
8) F_Mu – The smoothed transmission coefficient based on the fluorescence data.
9) dF_Mu/dE – The derivative of the transmission coefficient based on the fluorescence data.
2.3 The EovsT.txt File
The EovsT.txt file is used to generate time plots of the Eo progression. This is important if a QXAFS study
is taking place while the sample is being oxidized or reduced. When a sample is undergoing an in situ
oxidization electrons are being withdrawn from the atom under investigation. This results in core level
electrons which are deshieled from the nucleus of the atom. Thus, the electrostatic potential and
binding energy between the core level electrons and the nucleus increases. This is manifested in the
spectra by an increase in the Eo as defined by the energy at which dMu/dE is a maximum. In this case all
of the Eo is defined with the help of CC’s SGS algorithm which in the process of smoothing the data will.
It is suggested that this file be used to create kinetic plots of the in situ chemical transformations.
The output of the EovsT.txt file is contained within 6 columns. Three of these columns are devoted to Eo
data based on the transmission data and the following three are devoted to calculating the Eo data
based fluorescence. The first and last values contained in each of the columns should be checked
carefully because they may have collected the max derivative of Mu with respect to E from a partial
QXAFS scan that never collected data at the sample’s actual Eo.
2.4 The log.txt File
The log.txt file contains the calibration data that was used in the CC algorithm as well as the size of the
smoothing window used by the SGS algorithm, and notes on the author of CC. It is used for
troubleshooting in the case that CC does not execute well.
2.5 The Agglomeration.txt File
This file is output by the Agglomeration function and therefore is only present when Agglomeration is
called in CC. It contains data in the exact format of the input files except that the columns are labeled
with appropriate titles. These are Time, Io, It, PIPS, and encoder. The first five rows of the data file
contain one important piece of information. This piece of information is contained in the row that is
labeled “#Start Time:”. The value that is placed after this label is the time at which the first file in the
series of files that were agglomerated was created.
Figure 3. Data was on an in situ CuO to Cu(0) in-situ chemical transformation under a flow of 5% H2
collected at X18B processed with CNC and plotted with OriginPro 7.5. (a) Time resolved XANES collected
at a time resolution of 15 seconds per XANES scan. (b) A plot of dMu/dE based on fluorescence data.
Note the discontinuous shift in Eo. (c) Data collected via the SCC residual gas analyzer on the
concentration of the H2 and H2O in the reactor effluent stream. (d) A plot of the shift of dMu/dE max
bound by the condition that it occur at Energy
Section 3: The Crop and Chop Algorithm
3.1 Energy Calculation and Calibration
To determine the energy level that correlates to the Quick-XAFS data point the monochromator
diffraction angle must be known and applied to Bragg’s law (eq 1).
(1)
In Bragg’s law n is an integer representing the harmonic of electromagnetic radiation permitted to pass
through the monochromator crystal and can be assumed to be 1 if proper detuning procedures are used
(~30% at X18B), ? is the wavelength of the electromagnetic wave, d is the lattice spacing in the
monochromator crystal, and ? is the monochromator diffraction angle. At beam line X18B a Si(111)
double crystal monochromator with a lattice spacing of 3.1355Å is used to select x-rays from the
polychromatic synchrotron x-ray beam. After the wavelength of the x-ray is calculated it is a matter of
converting to energy via Plank’s constant and the speed of light (eq 2).
(2)
The Quick-XAFS setup at X18B measures the monochromator angle through an analogue to digital
converter at a resolution of 12 bits/0.01o. Therefore, Quick-XAFS files collected at X18B contain a signal
with a linear relationship to the monochromator angle. The slope of the angle as linear function of the
encoder signal is -409600/1o, a value which is dictated by the energy resolution of the analogue to
digital converter. The last degree of freedom in the linear fit of the encoder signal is the offset. However,
this value changes each time that the monochromator is cross referenced. Currently, the offset is
determined by finding the encoder value at Eo in a reference scan. The model of the Bragg angle (?) as a
function of the encoder value (enc) shown below where enco and ?o are the encoder value and Bragg
angle at Eo for a sample.
(3)
In order to use Quick-XAFS technology at X18B to the fullest extent a standard sample with a known Eo
should be scanned at each monochromator tangent arm setting, and immediately proceeding each
Quick-XAFS system start up or system crash.
3.2 Crop N’ Chop
The first step in the CC algorithm is to convert the digital signal from the VME encoder into energy. The
resulting energy varies as a sinusoidal function of time [Figure 3]. The program then starts at the first
point in the input data files and determines whether or not it is within the user input energy range. It
then implements this check to successive points. When CC counts that a specified number of
consecutive points - in the CC algorithm the variable Buffer controls this number - are within the energy
range of interest it initializes a file, resets its counter, and writes subsequent data to the new file. During
the writing process it is continuously searching for a number of consecutive points equal to Buffer that
occur outside of the energy range. When this occurs CC closes the file it was writing to and omits all data
that occurs until a number of consecutive points equal to Buffer are found to be within the energy range
of interest. At this point CC will initialize a new file and write subsequent data to the file. Etc.
As an example the data in Figure 3 is provided, the user input range of the spectra are 111 eV above and
39 eV below the edge energy of 8979 eV, an adequate range of data for XANES analysis. Starting at time
zero and continuing to the end of the run CC would omit roughly all data above 9090 eV and all data
below 8930 eV. While doing so it would create 5 files each containing one individual spectrum and one
master file containing all spectra. However, the first and the last file would only contain part of a
spectrum and therefore should be omitted from presentation.
Use of CC requires some knowledge of the data that is being processed. The most important pieces of
knowledge to have for the file splitting method are the upper and lower limits of your data. If the upper
or lower limits input into the CC algorithm were outside of the data range the output data files would
contain multiple spectra. For example, if the data in Figure 3 were processed with a lower limit set to 59
eV below the edge Crop Chop would only output 3 data files. You should model the energy range of your
data using the upper and lower limits of the monochromator angle. Also, the rates of change of the
monochromator angle can require new values of the CC algorithm variable Buffer.
Figure 4. Example quick-XAFS data collected at X18B. This is the encoder data contained within the file
CC20.ex1.
The smoothing algorithm in CC serves two purposes. The first of which is to smooth data collected with
SCC data acquisition techniques and the second is to provide dMu/dE as a function of the spectrum
energy. The CC smoothing algorithm operates by selecting a number of consecutive points and least
squares fitting the data to a line of the form in equation 4.
(4)
The fits that the CNC smoothing routing completes are Io, It, PIPS, Mu, and PIPS/Io as a function of
Energy. After the fit parameters a and b are determined the center point of the window of raw data is
estimated and written to the smooth output. CNC iterates this process until all data has been smoothed.
Values of b are also stored in the smooth output to model dMu/dE. Eo is then defined by the value at
which dMu/dE is a maximum.
In the CNC smoothing routine one parameter N, the number of data points smoothed, can have
dramatic effects on the efficiency of the CNC smoothing algorithm. N should be chosen such that the
energy range within N data points is less than 2 eV and so that N is greater than 5 data points. If the
former condition is not satisfied it will be difficult to determine accurately from CNC smoothing data the
correct value of Eo and many of the high frequency trending in the absorption coefficient will be
attenuated. The latter term is important because the data are noisy and therefore to obtain a precise
approximation of the center point of the window of data many points should be used to minimize the
noise contained within the smoothed data.
Section 4: Calibrating the Energy of a QXAS
1) Open up CC20.ex1 using plotting software of your choice. Note: Excel can only work with data that is
in less than 65536 rows and 256 columns. Excel’s 2D plots can not contain over 32,000 data points.
2) Create a plot of the encoder signal and the fluorescence vs. scan time. The encoder signal is contained
in column 5 and the fluorescence can be calculated by dividing column 4 by column 2. Time data is
contained in column 1.
3) The next step is to find the encoder value at Eo. In figure 4 the red point in the encoder data was used
to serve this purpose. Its value was ‘-4040478845710’ the Eo that it corresponds to is 8979 eV. Find you
own value of Eo. It should be within 6 orders of magnitude of the value above.
Figure 5. A plot that was used to determined the first guess of the encoder value at Eo. The actual
encoder point which was used for this purpose is in red.
4) Use CC to process CC20.ex1 and use your values of Eo and the encoder value at Eo as calibration
parameters.
5) Open up the EovsT.txt file to find what Eo was determined to be. Using the calibration data present in
this example the Eo of the sample was determined to be approximately 8988 eV. However, now the
time at which Eo occurred in the QXANES run is know.
6) The time at which Eo occurs should be roughly 11.842145 seconds in the first scan. Now the signal
form the encoder can be found at this time. This will correspond to the encoder value at Eo. To find this
encoder value open up the Noisy folder and open up the file named CC20.ex1.7.txt or the file which is
corresponds to the second XAFS scan in the QXAFS run. The encoder value was ‘-4040478840157’ which
is very close to the calibration data provided in Section 1.3.
7) The next step is to use the new encoder value to reprocess CC20.ex1 and see if the log.txt file
contains the proper values of Eo for the sample.
8) Steps 4 – 8 can be repeated to get a more precise calibration of the data but it is not recommended
that more than 1 or 2 repetitions are completed.
Improvements
In the future the following improvements to Crop N’ Chop software will be made.
1) A user input parameter that allows toggling between a first and second order polynomial to be used
in least squares fitting fro the smoothing routing.
2) A self calibrating routine that uses a standard quick-XANES or quick-EXAFS scan to determine the
Encoder value at Eo.
3) EXAFS data processing capacities: normalization, conversion to k-space, background fitting with cubic
splines to determine ?, Fourier transform into r-space. To make visualization of in-situ local coordination
changes simplified.
4) A graphical user interface (GUI).
Author
Nathan D. Hould
Research Assistant
Synchrotron Catalysis Consortium
NSLS - Brookhaven National Laboratory
Graduate Student
Department of Chemical Engineering
University of Delaware
http://www.yu.edu/scc/page.aspx?id=3998
E-mail: [email protected]