# xaid_mu2chi

##

## Module characteristics

- Goal: to extract the XAFS signal Chi(k) from the absorption spectrum Mu(Energy)
- Method: Preedge linear fit substraction, postedge multi-spline fit. Total control on fit limits and knots, spline polynomial degree, jump and edge values. Three types of normalization: experimental, constant and Eisenberg-Lengeler.
- Input: A single two column file with Mu(Energy) data. It may also receive data from other XAID modules (like DELIA and EXODUS). It can process multiple files.
- Output: Export signal to a spec file, or passed data to other the XAID applications (XAID_FF, EXODUS, XPLOT) module for better visualization and further processing.
- Tricks:
  - After changing any parameter, press "Enter" to refresh calculations.

## Example of use

### Quick start

1. Load the file Ge_calib.dat in the Examples directory of the xaid installation directory. Fot that, use File->Load Data->Load Example File. A plot of the spectrum is obtained:

2. Click the button. Default values of preedge limits (Emin and Emax), Eo, jump and knot positions are filled. The extraction is performed and the plot is changed to visualize Chi(k):

3. Play with the plot X value and Y value to visualize intermediate steps of the calculation. Change the parameters.

4. Compute the Fourier Transform by exporting Chi(k) to XAID_FF (using Tools->xaid_ff (FT)), or save data using File-Export to spec file

### Step by step

1. Load a 2-colums ASCII file with input data (Energy in the first column and Mu(Energy) in the second one) by using the File->Load data->from file(s) menu.
2. Preparation of the data (optional): XAID_MU2CHI must use eV as energy units. If the input file has another unit, fill the conversion factor in the box: Abscissas factor to eV. For example, set 1000 if your file is in keV. You may use the Raw_Data->Cut item to select the good interval for the analysis, or may be Raw_Data->Interpolation to change the number of points. The option Raw_Data->Generic Operation allows to redefine the input set by performing arithmetic operations.
3. Pre-edge fitting Select the Emin and Emax limits, either by entering the values, or by clicking two points (using )
4. Selecting of Eo and Jump, perhaps with the help of the buttons
5. Post edge spline This is the more delicate part and the quality of your Chi(k) signal depends on the ability to perform a good fit. Use The default option using puts the knots equi-spacied in the available k interval. A technical trick: negative values are presented (although they do not exist physically). This is to obtain smoother fits in the case of selecting the full interval. You may use the zoom options to better visualize the fits.
6. Extraction Once you have a satisfactory post-edge spline on the screen, a normalization is applied to obtain the Chi(k) signal. Three options are available, that apply different extraction algorithms:
   - Experimental: {chi(E)=(mu(E)-mu_at(E))/(mu_at(E)-mu_bck(E)) }
   - Constant: {chi(E)=(mu(E)-mu_at(E))/jump}
   - Lengeler-Eisenberg: {chi(E)=(mu(E)-mu_at(E))/jump*LE(E)} with LE(E) = 1- (8/3) [(E-Eo)/Eo]
7. End After the extraction you can save the result to a file using File->Export to spec file or inject the result in the Fourier filter application XAID_FF. By default the negative k values are kept, but it will be possible to cut your spectrum in another application (XPLOT or EXODUS).

## Preference parameters

The File->Preferences... option starts a window with the application preferences:

The start and end preedge points define the default limits when using . The first one is the number of eV after the first point of the spectrum. The second one is the number of eV below the edge (maximum of the derivative).The postedge defaults are equi-spaced knots in k, from Eo+(end preedge) to the maximum k available.

Then the K limits for the plot and the Fourier Transform parameters are defined. The Fourier Transform is plotted when the plot X value is set to R.

The last option is important for batch calculations, as it will allow automatic computation of the default Emin, Emax, Eo, Jump and knot positions after loading each individual spectral data.

## Batch calculations

XAID_MU2CHI can perform extractions for multiple data:

- If the spectra are in individual files, use File->Load Data->from files(s) and make a multiple selection. XAID_MU2CHI will proccess each file and all the results are written to an output spec formatted file xaid_mu2chi.spec

- If the different spectra are contained in a SPEC file.
  Load the spec file in EXODUS, select the wanted data, and use the option Export: XAID/Mu2Chi. It is recommended that you first export a single spectrum, work in XAID_MU2CHI to define the wanted extraction parameters, and select the wanted X value and Y value for the plot. Then, without quitting the XAID_MU2CHI window, export multiple lines (i.e., spectra) to XAID/Mu2Chi and each individual spectrum will be processed. The output is passed back to EXODUS as a new data set
- XAID_MU2CHI is used from the DELIA application, designed to perform batch calculations.

Note that after loading individual data, the extraction parameters are set to the default if selected in the Preferences. Otherwise are kept unchanged prom the previous spectrum.