Importing chi(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:

  1. #!/usr/bin/perl
  2. use Demeter;
  3. my $data = Demeter::Data -> new(file      => "cu10k.chi",
  4.                                 name      => '10K copper data',
  5.                                 fft_kmin  => 3,    fft_kmax  => 14,
  6.                                );
  7. $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 the rare 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.