XAS Normalization

GX-TXT DEV112 P011-bis

Normalize XAS spectra and check intervals, diagnostics and results of the workflow for spectral families.

GX-TXT P011-bis · module 1.0.2. XAS normalization estimates or applies an E0, fits the pre-edge and post-edge background and scales the μ(E) spectrum by the edge step. The diagnostics record E0, windows, step, order and state for each member.

Prepare an XAS family in eV

In the search of the tested build no Generator for XAS normalization turned up. Use the teaching family of four spectra (ZIP), created with transitions at slightly different energies. The first column contains energy in eV, the next four the μ values.

  1. Create a Session, open Acquisition and select the XAS handler. Choose processed_family, separator whitespace, header absent, Energy column 1, first data column 2. Leave the last column at 0 to include up to the end. Choose eV as the energy unit.
  2. Add the file, use xas.demo.family_ev as ID and spectrum.family as contract, then choose Import current.
  3. In Datasets enable the family. In Preview and Metadata check members, axis spectral_x in eV and μ in spectral_y. The original family in keV was rejected by the Run. If you have a file in keV, you must convert the numerical energy values, multiplying them by 1,000, and only then import them with eV units.
Teaching family in eV added to the acquisition batch as spectrum.family.
Teaching family in eV added to the acquisition batch as spectrum.family.

Determine E0 and the fit windows

In Configuration → Modules → Analysis & Services press Enable module on the entry XAS normalization. Check Health, then open Analysis. Select Run / recalculate now and assign xas.demo.family_ev to primary. + Add source adds an alias. Remove releases the main source or removes an added alias. The example computation uses only primary and the canonical variables of the family.

E0
auto searches for the maximum of the smoothed derivative for each member. manual applies the value entered in Manual E0 [eV]. The manual value must fall within the useful domain.
Pre-edge lower / upper offset from E0 [eV]
Limits of the pre-edge fit, relative to E0. Use two increasing, typically negative values, for example −100 and −50. Empty delegates to the automatic choice.
Post-edge lower / upper offset from E0 [eV]
Limits of the post-edge fit, typically positive. The manual test uses 30 and 110. Empty chooses the windows automatically. Both windows must contain enough points for their fit.
Post-edge polynomial order
auto chooses the order based on the data in the region. 0 fits a constant level, 1 a straight line, 2 a quadratic polynomial. Check the effective order in the report.
Automatic E0 derivative smoothing points
Number of points of the moving-average smoothing of the derivative used for automatic E0. The default is 5. The choice manual uses the given E0 directly.
Normalized output
normalized subtracts the background and scales by the edge step. flattened also removes the residual post-edge trend using the fit. Compare the two results on the same input and with the same windows.
Family member normalization failure
skip_with_report continues on the valid members and records the rejected ones. error stops if a member fails. After the Run, check the count and the diagnostics, even when all the published spectra pass.
Output Dataset ID
Assign an ID, for example xas.family.flat. The diagnostics use the suffix .diagnostics. Use separate IDs to compare preparations.
Configuration of the normalization of a family with automatic E0 and flattened output.
Configuration of the normalization of a family with automatic E0 and flattened output.

Run the family and read the diagnostics

For the first case choose E0 auto, empty offsets, order auto, output flattened and ID xas.family.flat. Open Run, update the plan and start the selective analysis. In the test the Session published four members and zero rejects. The E0 values are 7113, 7116, 7118 and 7121 eV, with steps from about 1.25009 to 1.25016 and a first-order post-edge fit.

To compare other fits, set manual E0 7116 eV, pre-edge −100 and −50 eV, post-edge 30 and 110 eV and normalized. Both the order 0 and the order 2 tests succeeded, with distinct IDs.

In Results read xas_normalization_report.txt. In Datasets open the result and xas.family.flat.diagnostics. Use Preview, Metadata and Canonical table to inspect units, representation, values, windows and state. Plots is empty in the tested case. To display the family you can open the normalized Dataset in the XAS viewer.

Results after the normalized family completed.
Results after the normalized family completed.
Diagnostics table for the four members after the Run with manual E0 and quadratic fit.
Diagnostics table for the four members after the Run with manual E0 and quadratic fit.

Check the state for a single spectrum

The XAS handler can import singolo.csv (ZIP) with processed_single, separator comma, header present, energy column 1 and μ 2, eV units and contract spectrum.scientific. With this input, the tested build left the normalized Dataset in the Session and ended with FAILED while publishing the diagnostics. The problem recurred with automatic E0 and with manual E0 7112 eV, order 1. Check the Run state and that .diagnostics exists before using the output. The family path in eV described above completed the publication.

FAILED state after normalizing a single spectrum, with partial publication.
FAILED state after normalizing a single spectrum, with partial publication.