wiki:MyModel

Specific naming conventions must be followed if the Analysis package is to be able to correctly locate and identify the names of functions and macros. In addition, it provides consistency when generating new model functions. This "enforced" naming is essential for the FitManager to automatically find many of the necessary elements for a CurveFit, with a minimum of user input.

(1) The "base" name:

SphereForm (can have a MAXIMUM of 20 characters)

(2) From the base name the two setup Proc names are constructed:

"Plot"+base => PlotSphereForm

"PlotSmeared"+base => PlotSmearedSphereForm

(3) The setup Procedures create the parameter names and default coefficients. In order to keep a correspondence between the coefficients and their function, each model must have a unique SUFFIX. For SphereForm, the suffix is "sf". The coefficients and parameter wave names are:

(for the unsmeared calculation)

"coef_"+suffix => coef_sf

"parameters_"+suffix => parameters_sf

(or for the smeared calculation)

"smear_coef_"+suffix => smear_coef_sf

"smear_parameters_"+suffix => smear_parameters_sf

(4) The names for the two fit functions are then:

base => SphereForm -- this is the unsmeared model

"Smeared"+base => SmearedSphereForm -- this is the smeared model

(5) The unsmeared model (SphereForm) is simply a switch, using either Igor code or XOP code (if present).

"f"+base => fSphereForm -- this is the function, written in Igor's programing language

base+"X" => SphereFormX -- this the XOP version of the function, that may or may not exist.

Search and replace in the MyModel template will catch all of these changes.

Back Up to Code Documentation

Last modified 14 years ago Last modified on Jun 10, 2008 3:28:48 PM