Ifeffit::Demeter::Fit::Sanity - pre-fit sanity checks
This documentation refers to Ifeffit::Demeter version 0.0.1
my $fitobject = Ifeffit::Demeter::Fit ->
new({gds => \@gds_objects,
data => [$data_object],
paths => \@path_objects,
});
$command = $fitobject -> fit;
When the fit method is run, a series of sanity check on the data contained in the fit object is run. The sanity checks all live in this module.
This module contains all the sanity checks used on the data in a fit object before a fit is run. These check were segregated into a separate file for the sake of neatness. This file forms part of the base of the Ifeffit::Demeter::Fit class and serves no independent function. That is, using this module directly in a program does nothing useful -- it is purely a utility module for the Fit object.
The user should never need to call the methods explicitly since they are called whenever a fit or summation is made. However they are documented here so that the scope of such checks made is clearly understood.
See the discussion of verify_fit in the documentation for the Ifeffit::Demeter::Fit class to see how warnings and errors are returned from these methods.
S_defined_not_used
This method checks to see if any guess parameter have been defined but not used in any def or restraint math expression or path parameter math expression.
S_used_not_defined
This method checks to see if any parameters have been used in the math expressions for a parameter or path parameter but have not been defined in any way.
S_binary_ops
This method checks for the string ++, --, ***, //, or
^^ in all math expressions, these being common typos in math
expression.
S_function_names
This method identifies all function names used in math expressions as text followed by an open paren. It verifies that any such function is one available in Ifeffit.
S_unique_group_names
This method makes sure that all data and path objects have unique groups names to avoid name collisions in Ifeffit.
S_gds_unique_names
This method makes sure that all GDS objects have unique names.
S_parens_not_match
This method makes sure that all math expressions have matching parens.
S_data_parameters
This method performs a number of simple checks on the data parameters, for instance that kmax is greater than kmin.
S_nidp
This method checks that the number of guess parameters does not exceed the number of independent points in the fit (in the Nyquist sense).
S_rmin_rbkg
This method makes sure that Rmin in the fit is not smaller than Rbkg used in the background removal. This is only possible for data imported directly from Athena or data which in some other specifies what Rbkg was during the background removal.
S_exceed_ifeffit_limits
This method checks that the number of paths, data sets, and parameters used in the fit does not exceed Ifeffit's compiled in limitations.
S_program_var_names
This method makes sure that no GDS objects use names that collide with Ifeffit program variables names. This is, perhaps, overly cautious. This collision is not always a problem. But when it is, it is awfully confusing and hard to track down. It's easier to just enforce some rules on what names the user can choose.
See the Ifeffit::Demeter manpage for a description of the configuration system.
There are no known bugs in this module.
Please report problems to Bruce Ravel (bravel AT anl DOT gov)
Patches are welcome.
Bruce Ravel (bravel AT anl DOT gov)
http://cars9.uchicago.edu/~ravel/software/
Copyright (c) 2006-2007 Bruce Ravel (bravel AT anl DOT gov). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
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.