2.2. χ(k) data files

On occassion, you will need to import a data file containing χ(k) data, that is, data that have already been processed to have the background removed and to be properly normalized. This is allowed in DEMETER but is strongly discouraged. Many features of DEMETER that are nominally related to the χ(k) data still make use of earlier aspects of the data processing. An example of this is explained in the section on sanity checking of fitting models. One of those sanity checks is to have the beginning of the fitting range in R-space come before the Rbkg value used in the background removal. That check cannot possibly happen for a Data object that begins as imported χ(k) data.

Importing χ(k) data is done like so:

#!/usr/bin/perl
use Demeter;

my $data = Demeter::Data -> new(file      => "cu10k.chi",
                                name      => '10K copper data',
                                fft_kmin  => 3,    fft_kmax  => 14,
                               );
$data -> plot('k');

For a data file containing χ(k) data, it is usually not necessary to explicitly identify the data as such. DEMETER will analyze the contents of the data file and recognize it as χ(k) data. In case that χ(k) data is not recognized as such, it can be explicitly specified like so:

$data -> datatype('chi');

Note also that data that are imported as χ(k) cannot be plotted in energy. Attempting to do so will trigger an error and end your program. Note that you can set attributes related to normalization or background removal for a χ(k) Data object without consequence. Those attribute values will mostly never be used but there is no penalty for accessing them.




DEMETER is copyright © 2009-2016 Bruce Ravel – This document is copyright © 2016 Bruce Ravel

This document is licensed under The Creative Commons Attribution-ShareAlike License.

If DEMETER and this document are useful to you, please consider supporting The Creative Commons.