Demeter

Description Perl tools for X-ray Absorption Spectroscopy
Demeter > Perl Modules > Demeter::Data::E0
Source

NAME

Demeter::Data::E0 - Calibrate and align XAS mu(E) data

VERSION

This documentation refers to Demeter version 0.9.26.

DESCRIPTION

This subclass of Demeter::Data contains methods for calibrating mu(E) data and adjusting e0.

METHODS

calibrate

This calibrates data by setting a chosen energy value to a new value. This method simultaneously sets the bkg_e0 and bkg_eshift Data attributes.

  $e0 = $data -> calibrate($edge_point, $edge_energy);

Both arguments are optional. If the $edge_point is 0 or not given, then the current value of bkg_e0 will be used. If the $edge_energy is not given, then the tabulated energy for the absorber species and edge will be used. If $edge_energy is 0 or not given and the Data object does not have valid values for the bkg_z and fft_edge attributes, an exception will be thrown. The return value is the new value of the edge energy.

align

This method aligns each item in a list of data objects to the Data object on which the method is called. That is, align each Data object in the argument list to the calling object.

  $standard_data -> align(@list_of_data_to_align);

Each argument must be a Data object. The return value is the energy shift of the last Data object in the list.

align_with_reference

This method align each item in a list of data objects to the Data object on which the method is called using the reference channels, if available. That is, align each Data object in the argument list to the calling object, using their reference channels.

  $standard_data -> align_with_reference(@list_of_data_to_align);

Each argument must be a Data object. The return value is the energy shift of the last Data object in the list.

alignwr

This is an alias for align_with_reference.

e0

This method is used to set the edge energy for mu(E) data either to a number or a calculated value.

  $e0 = $data -> e0($how);

The $how argument can be any of the following. If $how is omitted, it defaults to "ifeffit".

ifeffit

Use the internal algorithm from the data processing backend (Ifeffit/Larch) for finding the edge energy. This is very similar to, but not exactly the same as, the first peak of the first derivative. Ifeffit and Larch actually uses a simple peak-finding algorithm to distinguish the edge from noise in the pre-edge. The result of this is that an energy is often chosen that is one or two data points above what the human eye would recognize as the peak of the first derivative.

zero

Find the zero crossing of the second derivative of mu(E). Starting from the current value of the edge energy (or from the value returned by the backend algorithm if the edge energy has not yet been set), step forward and backward until the parity of the second derivative spectrum switches. Then, linearly interpolate between the values bracketing the parity change to find the zero value.

fraction

Find the point in the edge of the normalized spectrum whose y-value is a given fraction of the edge step. By default, this fraction is 0.5, but that can be set by the bkg_e0_fraction attribute of the Data object. This point is linearly interporlated from the normalized data. The data are normalized again and the fractional point is found again until its energy value changes by less than 0.001 volts, up to a maximum of five iterations.

atomic

Use the tabulated value of the zero-valent atomic binding energy as the edge energy.

Data object

If the $mode is another Data object, set the edge energy of this Data object to the value of the other one.

number

If the $mode is recognizable as a number, set the edge energy to that value.

CONFIGURATION

See Demeter::Config for a description of the configuration system.

DEPENDENCIES

Demeter's dependencies are in the Build.PL file.

BUGS AND LIMITATIONS

Please report problems to the Ifeffit Mailing List (http://cars9.uchicago.edu/mailman/listinfo/ifeffit/)

Patches are welcome.

AUTHOR

Bruce Ravel, http://bruceravel.github.io/home

http://bruceravel.github.io/demeter/

LICENCE AND COPYRIGHT

Copyright (c) 2006-2018 Bruce Ravel (http://bruceravel.github.io/home). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlgpl.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.