| Description | Perl tools for X-ray Absorption Spectroscopy |
Demeter::Fit::Feffit - Convert a feffit.inp file into a Fit object
This documentation refers to Demeter version 0.9.26.
Convert an old-style feffit.inp file into the equivalent Demeter Fit object.
$inp = Demeter::Fit::Feffit->new(file=>$inpfile);
$fit = $inp -> convert;
$fit -> fit;
This can be used to drive a Demeter-based Feffit act-alike or it can be used, along with the demeter template set, to convert a feffit.inp into a Demeter-based perl script.
Most features of Feffit are handled correctly, including include files. A few of the more obscure Feffit options are not handled at all. Several Feffit options do not have Ifeffit or Demeter analogs, and so are ignored. All the various synonyms of the feffit path parameters are correctly recognized, however this makes no attempt to follow the same (somewhat erratic) abbreviations of some parameters recognized by Feffit.
Simply point this class at a feffit.inp file by specifying the file attribute at creation or via it's standard Moose accessor:
$inp = Demeter::Fit::Feffit->new(file=>$inpfile);
or
$inp = Demeter::Fit::Feffit->new;
$inp->file($inpfile);
The feffit.inp file will be parsed into an intermediate data structure when the file attribute is set.
The only outward looking method is convert, which turns the intermediate data structure into a Fit object. See Demeter::Fit for what to do with that.
There are no configuration options for this class.
See Demeter::Config for a description of Demeter's configuration system.
Demeter's dependencies are in the Build.PL file.
The algorithm for recognizing a multiple k-weight fit in the feffit.inp file is somewhat simplistic. If a "multiple data set" fit (in the sense that the next data set keyword is in the feffit.inp file) has two data sets with the same input data file and different k-weights. No attempt is made to verify that the fitting model used for each data set is, in fact, the same. Since the MKW fit is usually implemented in Feffit using an include file, this seems like a safe approach. But it is, in fact, possible to use a different model with the different k-weights.
cull_mkw only works for a single data set, multiple k-weight fit.
Only uses integer part of kw value.
cormin, case insensitivity, pathparam synonyms, local, epsdat, epsr, rlast, iwindow, ikwindow, irwindow
from fitinp.f:
wins(1) = 'hanning'
wins(2) = 'fhanning'
wins(3) = 'gaussian window'
wins(4) = 'kaiser-bessel'
wins(5) = 'parzen'
wins(6) = 'welch'
wins(7) = 'sine'
Please report problems to the Ifeffit Mailing List (http://cars9.uchicago.edu/mailman/listinfo/ifeffit/)
Patches are welcome.
Bruce Ravel, http://bruceravel.github.io/home
http://bruceravel.github.io/demeter/
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.