Copyright (C) 2009 - 2024  Thomas Moeller

I. Physikalisches Institut, University of Cologne


License:

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
(Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>)


This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

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.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------------------------




MAGIX:
------

Produced for the CATS project


The modeling of astronomical observations requires specialized numerical codes
and knowledge about how to use them. The program MAGIX provides a framework to
easily interface existing codes to an iterating engine that allows automatic
minimizations to constrain model parameters and provide error estimates.

MAGIX can be started by simply typing "./magix_start.py" and the command prompt.
In order to get help type "./magix_start.py --help" or read the readme.txt file.

If no screen output is desired, type "./magix_start.py --quiet" followed by the
path of the i/o control file (see below).

If you do not want to plot the resulting fit function or if you have problems
with the installation of the matplotlib package, type "./magix_start.py --noplot"
followed by the path of the i/o control file (see below).

MAGIX looks for the directory "Modules" in the current working directory, which
contains all necessary python and fortran modules. Do not rename or move this
directory.

MAGIX consists of four modules:

- Read experimental data using import filters for .dat and .fits files
- Read model parameters from xml-file defining model ranges, start values
  and fit attributes. (Fit attributes declare, if a model parameter should be
  optimized by the fit process of hold constant.)
- Start the fit process using several fit algorithm (Levenberg-Marquardt).
- Write optimized parameter to xml-file and plot data.

In the following details of the several modules are given together with an
description of the files necessary for MAGIX:


Main program:
-------------

The module "MainProgram" is the central module of MAGIX, because it controls
the whole program and calls the other modules. Furthermore it manages the
communication between the other modules.

MAGIX requires a so called i/o control file which is located in the same
directory where the "magix_start.py" file is. If you want to use an i/o
control file located somewhere else, enter the path and the file name of the
i/o control file in the following of the magix_start command.

For example "./magix_start.py test/io_control.txt"
            This command starts the MAGIX program and uses the i/o control
            file located in the test directory with file name "i/o_control.txt"

The i/o control file is loaded by the subroutine "read_control" and must
contain the path and the file names of

- the xml-file necessary for the import of the experimental data,
- the xml-file containing the fit parameters,
- the control file containing settings for the fit procedure,
- the log-file used during the fit process,
- the xml-file describing the input file being used by the external program


The i/o control file must contain the following tags:

- "experimental_data":  Path and file name of the xml-file containing import
                        settings for the experimental file(s). If the user
                        specify the path and file name of a dat or fits file
                        default settings for the import are used.
- "parameter_file":     Path and file name of the xml-file containing the
                        model parameters. (File name has to end with ".xml").
- "fit_control":        Path and file name of the fit control file containing
                        the settings for the fit process. (File name has to end
                        with ".fit").
- "fit_log":            Path and file name of the fit log file, which contains
                        all information of each step of the fit process. (File
                        name has to end with ".log").
- "model_description":  Path and file name of the xml-file describing the input
                        file of the used external program, which determines the
                        fit function


Example for the i/o control file:
---------------------------------


<?xml version="1.0" encoding="ISO-8859-1"?>
<ioControl>
    <title>io control</title>
    <description>This xml-file contains the paths and the file names of all working files which are used by MAGIX during the fit process</description>
    <PathFilename>

        <experimental_data>
            <filename>test/conv_Drude-Lorentz-model/One_OscillatorRefFit_R.xml</filename>
            <description>path and file name of the experimental file</description>
        </experimental_data>

        <parameter_file>
            <filename>test/conv_Drude-Lorentz-model/parameters.xml</filename>
            <description>path and file name of the xml-file including the start values of each parameter</description>
        </parameter_file>

        <fit_control>
            <filename>test/conv_Drude-Lorentz-model/Levenberg-Marquardt_Parameters.xml</filename>
            <description>path and file name of the xml file controlling the fitting process</description>
        </fit_control>

        <fit_log>
            <filename>test/conv_Drude-Lorentz-model/Levenberg-Marquardt/fit.log</filename>
            <description>path and file name of log file describing the fitting process</description>
        </fit_log>

        <model_description>
            <filename>Fit-Functions/Drude-Lorentz_conv/xml/Conventional_Drude-Lorentz.xml</filename>
            <description>path and file name of the xml-description of the input/output file of the fit function module</description>
        </model_description>

    </PathFilename>
</ioControl>


IMPORTANT:
----------

- MAGIX distinguishes between upper and lower case of the tags!

- the description tags are not read by MAGIX and can contain arbitrary information

- MAGIX will check the existence of the files given by the command words
  "experimental_data", "parameter_file" and "fit_control" and "model_description"
  will cancel if one of these files do not exist. The file given by "fit_log" need
  not to exist but the existence of the path will checked by MAGIX. A non-existence
  of the path will cancel MAGIX too. Within the fit process a log-file with file name
  given by "fit_log" will be created.


The subroutine "main" calls the following modules:

- LoadExpFile, for loading the experimental data,
- GetParameterSet for getting the model parameters,
- FittingEngine for optimizing the model parameters by using several fit
  algorithms.
- PlotData, for primitive plotting of the experimental data together with
  the fit function


Read Experimental Data:
-----------------------

The package "LoadExpFile" contains subroutines for loading experimental
files. Only experimental data, which are given in the following file
formats, can be loaded by MAGIX:

- dat-files
- xml-files.

Before the experimental file are loaded, the xml-file containing all
settings required for the import of the experimental data has to be loaded.
Especially, the number of experimental files, the path and the file name for
each experimental file has to be defined in the xml-file. If no xml-file is
specified and the given filename points directly toward a fits or a
experimental-file the default settings defined below are used and a warning
message is printed to the screen. By using the xml-descriptions, the user can
specify several (!) ranges of the experimental data which are considered in
the fitting process. Thus, there is no need to load all experimental data.

In the following, the expression "x"-column means the columns of an array
defining the "x" position of the experimental data point. For example: For a
function f(x,y,z) the number of "x"-column is 3, for a function f(x1, x2) the
number of "x" columns is 2. Additionally, for dat-files it may be necessary
to specify the number of "y" columns. This means, that for a given
"x"-position in the experimental data, you can specify several "y"-values. For
example: You measured several spectra under different polarization angles at
the same frequencies. A line in the corresponding dat-file may look like:

100.12,  0.34134,  0.12341,  0.78901,  0.13361

Here, the first column describe the frequency and the other columns the
transmission at different polarization angles. The number of "x" columns
is 1 and the number of "y"-columns is 4.

Note, that for fits-files, the number of "y"-columns is always set to 1!

Declaration of ranges: If only one x-column exists, the min and max of the
range is a simple scalar. But if the number of x-columns is greater 1 the
several indicators of the x-columns have to be separated by the "," character.

In addition, for a dat-file import the user can specify the separator
character separating the columns from each other for each file and the number
of columns starting form the left column which belong to the x point of each
experimental data. Furthermore, the user can specify the number of columns
belonging to the f(x) point of each experimental data.

In case of xml-files, the user has to specify the HDU (Header Data Unit) which
should be loaded.


Examples:
---------


Structure of xml-file for fits-file import:
-------------------------------------------self.

<ExpFiles>
    <contents>setting for experimental files</contents>
    <Section>
        <title>setting for experimental files</title>
        <SubSection>
            <NumberExpFiles>2</NumberExpFiles>
            <file>
                <FileNamesExpFiles>one_parameter_free/File3.fits</FileNamesExpFiles>
                <ImportFilter>automatic</ImportFilter>
                <NumberHDU>0</NumberHDU>
                <NumberExpRanges>1</NumberExpRanges>
                <MinExpRange>0</MinExpRange>
                <MaxExpRange>1000</MaxExpRange>
            </file>
            <file>
                <FileNamesExpFiles>one_parameter_free/File4.fits</FileNamesExpFiles>
                <ImportFilter>automatic</ImportFilter>
                <NumberHDU>0</NumberHDU>
                <NumberExpRanges>2</NumberExpRanges>
                <MinExpRange>0</MinExpRange>
                <MaxExpRange>2000</MaxExpRange>
                <MinExpRange>3130</MinExpRange>
                <MaxExpRange>3200</MaxExpRange>
            </file>
        </SubSection>
    </Section>
</ExpFiles>



Structure of xml-file for dat-file import:
------------------------------------------

<ExpFiles>
    <contents>setting for experimental files</contents>
    <Section>
        <title>setting for experimental files</title>
        <SubSection>
            <NumberExpFiles>2</NumberExpFiles>
            <file>
                <FileNamesExpFiles>one_parameter_free/File1.dat</FileNamesExpFiles>
                <ImportFilter>automatic</ImportFilter>
                <NumberHeaderLines>0</NumberHeaderLines>
                <SeparatorColumns> </SeparatorColumns>
                <NumberColumnsX>1</NumberColumnsX>
                <NumberColumnsY>1</NumberColumnsY>
                <ErrorY>yes</ErrorY>
                <NumberExpRanges>1</NumberExpRanges>
                <MinExpRange>0</MinExpRange>
                <MaxExpRange>1000</MaxExpRange>
            </file>
            <file>
                <FileNamesExpFiles>one_parameter_free/File2.dat</FileNamesExpFiles>
                <ImportFilter>automatic</ImportFilter>
                <NumberHeaderLines>0</NumberHeaderLines>
                <SeparatorColumns> </SeparatorColumns>
                <NumberColumnsX>1</NumberColumnsX>
                <NumberColumnsY>1</NumberColumnsY>
                <ErrorY>no</ErrorY>
                <NumberExpRanges>2</NumberExpRanges>
                <MinExpRange>0</MinExpRange>
                <MaxExpRange>2000</MaxExpRange>
                <MinExpRange>3130</MinExpRange>
                <MaxExpRange>3200</MaxExpRange>
            </file>
        </SubSection>
    </Section>
</ExpFiles>


IMPORTANT:
----------

- The names of the tags <ExpFiles>, <NumberExpFiles> etc. have
  to be written in the same type as presented in the above example.

- Using the tag <ImportFilter> the user can select a specific
  import filter. Setting the import filter to "automatic", the
  format of the experimental file is chosen by the ending of the
  file name. ".fits" for fits-file, ".dat" for ASCII files.

- Please, do not mix upper and lower case in the name of the tags!!

- The tag <file></file> must not occur more or less than the
  number of experimental files defined in the tag
  <NumberExpFiles></NumberExpFiles> !!!!!

- The number of ranges <NumberExpRanges></NumberExpRanges>
  must always be given! If no range desired (all data should
  be included in the fit process), the number of ranges must
  be set to 0.

- If the number of ranges is set to 0 the tags
  <MinExpRange></MinExpRange> and
  <MaxExpRange></MaxExpRange> need not to be set.
  BUT: All other tags have to be set !!!!

- If the user do not want to consider all data (number of ranges
  set to > 1) the tags <MinExpRange></MinExpRange> and
  <MaxExpRange></MaxExpRange> have to occur as many times as
  given by <NumberExpRanges></NumberExpRanges>

- If the number of "x"-columns is greater than 1, the min and max of
  the "x"-columns of the ranges have to be separated by the "," character.
  For example:

    <NumberColumnsX>1</NumberColumnsX>:
            <MinExpRange>0</MinExpRange>
            <MaxExpRange>2000</MaxExpRange>

    <NumberColumnsX>3</NumberColumnsX>:
            <MinExpRange>0, 0, 0</MinExpRange>
            <MaxExpRange>2000, 100, 20</MaxExpRange>

  Although the <NumberColumnsX></NumberColumnsX> tag is ignored in the
  import of fits-file, the content of this tag is defined by the dimension
  of the fits-file. Thus, the settings for the ranges have to be given
  as described above, if the dimension of the experimental file is larger
  than 1.

- Note, that the xml-file differ by some tags for dat and fits
  file import !!

- (fits-file): For the import of fits-file the user has to
   specify the Header Data Unit (HDU) for each fits file.

- (fits-file): The package distinguish between image and table HDU

- (dat-file): The y-column(s) have to be close to the x-column(s).

  Example:    |<- x-columns ->|<- y-column ->|
                212.124  23.314    1210.643216

- (dat-file): The tag <NumberHeaderLines> defines the number of
  header lines which should be ignored in the import of the
  dat-files.

- (dat-file): The tag <SeparatorColumns> defines the character
  which separate the columns from each other.

- (dat-file): The tag <NumberColumnsX> defines the number of
  columns counted from the left side, which belongs to the
  "x"-points of the experimental data.
  For example: If the user wants to import a dat-file
               containing 3D data, the first 3 columns define
               the x, y, and z position. For that kind of data
               the tag <NumberColumnsX> has to be set to 3.

- (dat-file): The tag <NumberColumnsY> defines the number of
  columns, which belongs to the "y"-points of the experimental
  data. These "y"-columns have to be close to the "x" values!
  For example: If the user wants to import a dat-file which
               contains at every given "x"-point 4 differnet
               values of the measured function (i.e. that there
               are 4 different dat-files in one dat-file) the
               tag <NumberColumnsY> has to be set to 4.

  Example:    |<- x-columns ->|<- y-column ->|
                212.124  23.314    1210.643216

  Here, <NumberColumnsY> has to be set to 1.

- (dat-file): If the Error tag <ErrorY>yes</ErrorY> is set to
  yes the columns containing the errors have to be close to the
  y-columns. Additionally, the number of these "error" columns
  have to equal to the number of "y"-columns given in the tag
  <NumberColumnsY></NumberColumnsY>

- An example structure of a dat-file is given below:

  Structure of a sample dat-file:
  -------------------------------
                                                                        ONLY RELEVANT IF ErrorY = "YES"
  1           ...    NumberColumnsX   1         ...    NumberColumnsY   1         ...    NumberColumnsY
  100.2313           20.6578          0.5846           1.4218           0.02             0.01
  102.2463           21.7548          0.5947           1.5432           0.03             0.09
  .                  .                .                .                .                .
  .                  .                .                .                .                .
  .                  .                .                .                .                .



Read model parameter:
---------------------

The package "GetParameterSet" reads and writes the model parameter to a
xml-file. The names of the model parameters, etc. have to confirm with the
registration file valid for the according model. The names of the model
parameters must not include the characters "[", "]", and ",".

The tags <uplimit> </uplimit> and <lowlimit> </lowlimit> indicate the upper
and the lower limit of the model parameters, respectively. If the value of the
model parameter runs, within the fit process, out of this defined range MAGIX
prints out a warning message to the screen. MAGIX does not stop because the
current value may be changed in an later iteration step.


Example xml-file (parameter file):
----------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>
<ModelParameters>
    <modelName>conventional Drude-Lorentz model</modelName>
    <Section>
        <title>model parameters for the conventional Drude-Lorentz model</title>
        <SubSection>
            <NumberParameters>2</NumberParameters>
            <Parameter fit="false">
                <name>EpsilonInfinity</name>
                <value>3.0</value>
                <error> </error>
                <lowlimit>0</lowlimit>
                <uplimit>+inf</uplimit>
            </Parameter>
            <Parameter fit="false">
                <name>NumberOscillators</name>
                <value>1</value>
                <error> </error>
                <lowlimit>0</lowlimit>
                <uplimit>+inf</uplimit>
            </Parameter>
            <Parameter fit="false">
                <name>EigenFrequency</name>
                <value>300.0</value>
                <error> </error>
                <lowlimit>0</lowlimit>
                <uplimit>+inf</uplimit>
            </Parameter>
            <Parameter fit="true">
                <name>PlasmaFrequency</name>
                <value>800.0</value>
                <error> </error>
                <lowlimit>0</lowlimit>
                <uplimit>+inf</uplimit>
            </Parameter>
            <Parameter fit="false">
                <name>Damping</name>
                <value>10.0</value>
                <error> </error>
                <lowlimit>0</lowlimit>
                <uplimit>+inf</uplimit>
            </Parameter>
        </SubSection>
    </Section>
</ModelParameters>


IMPORTANT:

- The descriptions of each parameter are bracket between the
  <Parameter></Parameter> tags. These tags have to occur as many times as
  defined in the tag <NumberParameters></NumberParameters>.


- In order to include a parameter into the fitting process set the
  attribute of the tags <Parameter></Parameter> to "true".
  For example: If you want to optimize the value of the Parameter
               "EpsilonInfinity" set the attribute to "true"
               <Parameter fit="true">
                   <name>EpsilonInfinity</name>
                   <value>3.0</value>
                   <error> </error>
                   <lowlimit>0</lowlimit>
                   <uplimit>+inf</uplimit>
               </Parameter>
               If the value of this parameter should be fixed set
               the attribute to "false":
               <Parameter fit="false">
                   ...

- The tag <error> </error> must occur for every parameter because the value
  of this tag is replaced by the error of the optimized parameter.
  Note, do not remove these tags!


- The number of model parameters defined in this file must be identical with
  the number of parameters defined in the registration file (inlcuding all
  replications of lines and parameters).


- The names of the model parameter defined in the tags <name></name>
  must be identical with the definitions of the names of the model
  parameter defined in the registration file. Otherwise the program
  stops!


Optimize fit parameters:
------------------------

The package "FittingEngine" reads the parameters controlling the fit process from the fit control file by using the function "read_control_file".

Example for a fit-control file:


<FitControl>
    <contents>settings for fit process</contents>

    <NumberOfFitAlgorithms>1</NumberOfFitAlgorithms>
    <algorithm>
        <FitAlgorithm>bees</FitAlgorithm>


        <MinMaxTransition>1e9</MinMaxTransition>
        <BestSiteCounter>2</BestSiteCounter>


        <limit_of_chi2>0.000001</limit_of_chi2>


        <number_fit_ranges>0</number_fit_ranges>
        <fit_range_start>200</fit_range_start>
        <fit_range_end>1000</fit_range_end>


        <number_iterations>3</number_iterations>


        <NumberProcessors>8</NumberProcessors>


        <DeterminationChi2>default</DeterminationChi2>
        <SaveChi2>yes</SaveChi2>
        <PlotType>normal</PlotType>
        <PlotAxisX>Frequency [Hz]</PlotAxisX>
        <PlotAxisY>Intensity</PlotAxisY>
        <PlotIteration>yes</PlotIteration>

    </algorithm>
</FitControl>


Example for a fit-contral file with algorithm-chain:


<FitControl>
    <contents>settings for fit process</contents>
    <model>generalized Drude-Lorentz model</model>


    <NumberOfFitAlgorithms>2</NumberOfFitAlgorithms>
    <algorithm>
        <FitAlgorithm>bees</FitAlgorithm>


        <MinMaxTransition>1e9</MinMaxTransition>
        <BestSiteCounter>3</BestSiteCounter>


        <limit_of_chi2>0.001</limit_of_chi2>


        <number_fit_ranges>1</number_fit_ranges>
        <fit_range_start>200</fit_range_start>
        <fit_range_end>1000</fit_range_end>


        <number_iterations>30</number_iterations>


        <NumberProcessors>8</NumberProcessors>


        <DeterminationChi2>default</DeterminationChi2>
        <SaveChi2>yes</SaveChi2>
        <PlotType>normal</PlotType>
        <PlotAxisX>Frequency [Hz]</PlotAxisX>
        <PlotAxisY>Intensity</PlotAxisY>
        <PlotIteration>yes</PlotIteration>

    </algorithm>
    <algorithm>
        <FitAlgorithm>Levenberg-Marquardt</FitAlgorithm>


        <limit_of_chi2>0.0008</limit_of_chi2>


        <number_fit_ranges>1</number_fit_ranges>
        <fit_range_start>200</fit_range_start>
        <fit_range_end>1000</fit_range_end>


        <number_iterations>20</number_iterations>


        <NumberProcessors>8</NumberProcessors>


        <DeterminationChi2>default</DeterminationChi2>
        <SaveChi2>yes</SaveChi2>
        <PlotType>normal</PlotType>
        <PlotAxisX>Frequency [Hz]</PlotAxisX>
        <PlotAxisY>Intensity</PlotAxisY>
        <PlotIteration>yes</PlotIteration>

    </algorithm>
</FitControl>



Remarks:


    * The tag <NumberOfFitAlgorithms> defines the number of algorithms which should be used within the fit process. A number greater than 1 defines a
      so-called algorithm-chain (see example).

    * The settings for each algorithm are enclosed by the <algorithm> tag. Note, that these tags have to occur as many times as given by the
      tag <NumberOfFitAlgorithms>.

    * Each algorithm is described by the tags <FitAlgorithm>, <limit_of_chi2>, <number_fit_ranges>, (<fit_range_start>, <fit_range_end>),
      <number_iterations>, <NumberProcessors>, <DeterminationChi2>, <SaveChi2>, <PlotType>, <PlotAxisX>, <PlotAxisY> and <PlotIteration>. Depending on
      the chosen algorithm, a couple of additional tags have to be added.

    * The tag <FitAlgorithm> defines the algorithm, which should be used in the fit process. Note, that the contents of the tag <FitAlgorithm> has to
      be identical with one of the following names of algorithm (It does not matter, if these words are written in lower case or upper case letters):

      "nested-sampling", "levenberg-marquardt", "simulated-annealing", "pso", "bees"

    * If the tag <FitAlgorithm> contains the algorithm "nested-sampling", the following tags have to be defined as well:

      <NumberObjects>:      This tag defines the number of so-called objects, which should be used within the nested-sampling algorithm. A typical
                            value is 100. (Note, that a bigger number would lead to an increased computational effort, whereas a smaller number
                            can produced a worse result. But this depends mmense on the model function used in the fit process.)
      <BestSiteCounter>:    Defines the number of best sites. MAGIX writes the results (parameter set, value of the model function) of these sites
                            to files.
      <MinMaxTransition>:   Actually, the nested-sampling algorithms looks for the global maximum of a function. Thus, the value of chi2 has to be
                            "inverted": chi_new2 = (MinMaxTransition - chi_old2). Note, that the value of MinMaxTransition has to be greater than the
                            largest value of chi_old2 over the whole parameter range.


    * If the tag <FitAlgorithm> contains the algorithm "simulated-annealing", the following tags have to be defined as well:

      <Temperature>:                   This tag defines the start temperature which should be used during the fit process. (A typical value is 1000).
      <TemperatureReductionKoeff>:     Defines coefficient for the temperature reduction. (A typical value is 0.8).
      <NumberOfReduction>:             The value defines the number of temperature reductions.


    * If the tag <FitAlgorithm> contains the algorithm "pso", the following tags have to be defined as well:

      <BestSiteCounter>:     Defines the number of best sites. MAGIX writes the results (parameter set, value of the model function) of these sites
                             to files.

    * If the tag <FitAlgorithm> contains the algorithm "bees", the following tags have to be defined as well:

      <BestSiteCounter>:    Defines the number of best sites. MAGIX writes the results (parameter set, value of the model function) of these sites
                            to files.
      <MinMaxTransition>:   Actually, the nested-sampling algorithms looks for the global maximum of a function. Thus, the value of chi2 has to be
                            "inverted": chi_new2 = (MinMaxTransition - chi_old2). Note, that the value of MinMaxTransition has to be greater than
                            the largest value of chi_old2 over the whole parameter range.

    * Note, that the fit algorithm "levenberg-marquardt" needs no special tags.

    * The tag <number_fit_ranges> defines the number of fit ranges. Thus, it is not necessary to fit all observation data. The limits of each fit
      range is defined by the tags <fit_range_start> and <fit_range_end>. If the number of fit ranges <number_fit_ranges> is set to zero, the
      contents of the tags <fit_range_start> and <fit_range_end> are not read.
    * If the number of fit ranges is larger than zero, the dimension of the experimental data has to be taken into account: If the number of
      "x"-columns is 1 (like in the example above) nothing changes. But, if the number of "x"-columns is larger than 1, the min and max values
      for each "x"-column have to be specified.

      For example:  The number of "x"-columns is 3, than the definitions of the fit ranges have to look like:

            <fit_range_start>0, 0, 0</fit_range_start>
            <fit_range_end>9800, 1000, 1000</fit_range_end>

    * If the user wants to specify more than one fit range (number of fit ranges > 0) the tags <fit_range_start> and <fit_range_end> have to
      occur as many times as number of fit ranges are specified.
    * The tag <NumberProcessors> defines the number of processors which are used by MAGIX. NOTE, that a value greater than 1 is used only for
      external program which allow parallized working (see tag <ParallelizationPossible> within the registration xml-file).
    * Changing the content of the tag <DeterminationChi2> the user can specify the method which is used for the determination of chi^2. At the
      moment the following options are included in MAGIX:

      - "default" or "difference":

        \chi^2 = \sum_{i=1}^N (y_i^{observe) - y_i^{fit})^2,

        where y_i^{observe) represents the value of the experimental data at the point i and y_i^{fit} the corresponding value of the fit function.

      - ..

      If the tag <DeterminationChi2> is set to "default" or "difference", the content of the tag <SaveChi2> is read, which specifies that the
      difference (y_i^{observe) - y_i^{fit}) is saved to file for all experimental points.


    IMPROTANT: The following options are available only for 2D functions y = f(x) !!!

    * The tag <PlotType> define the type of plotting. The user can chose "normal", for a normal 2D plot, "histogram" for plotting the data and the
      fit function as a histogram, and "no" for disabling the plot function.
    * The tags <PlotAxisX>, <PlotAxisY> and <PlotIteration> are read only, if the the tag <PlotType> is not set to "no". The tags <PlotAxisX> and
      <PlotAxisY> define the labels for the x- and the y-axis, respectively.
    * The observed data and the fit function are plotted for each iteration step, if the tag <PlotIteration> is set to "yes".


algorithm-chain:

    * In the example above, the fit process starts with the bees algorithm. Thereafter, the Levenberg-Marquardt algorithm is applied to the best
      three sites (parameter sets) of the bees algorithm.



Registration of model:
----------------------

In order to communicate with the external fit function module MAGIX have to write the input file including the current values of the model parameters.
Additionally, the new value of the fit function have to be read from the output file. Thus, xml-descriptions of the input and the output file are
required. In the following some examples and important remarks are given for the xml-description of the input and the output file:


Example (input/output description):
-----------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>
<InOutputFile>
    <contents>xml description of the input and output file for the conventional Drude-Lorentz model</contents>
    <Section>
        <title>input description for conventional Drude-Lorentz model</title>
        <ModelProgramCall>
            <CommandLine>Fit-Functions/Drude-Lorentz_conv/bin/DrudeLorentzConv.exe</CommandLine>
            <CalculationMethod>AtOnce</CalculationMethod>
            <ParallelizationPossible>Yes</ParallelizationPossible>
        </ModelProgramCall>
        <NumberInputFile>1</NumberInputFile>
        <InputFile>
            <title>input description for conventional Drude-Lorentz model</title>
            <InputFileName>Fit-Functions/Drude-Lorentz_conv/temp/in.txt</InputFileName>
            <NumberLines>4</NumberLines>
            <line group="false">
                <NumberReplicationLine> </NumberReplicationLine>
                <NumberParameterLine>1</NumberParameterLine>
                <Parameter group="false">
                    <NumberReplicationParameter> </NumberReplicationParameter>
                    <Name>XValue1</Name>
                    <Format>F15.8</Format>
                    <LeadingString> </LeadingString>
                    <TrailingString> </TrailingString>
                </Parameter>
            </line>
            <line group="false">
                <NumberReplicationLine> </NumberReplicationLine>
                <NumberParameterLine>1</NumberParameterLine>
                <Parameter group="false">
                    <NumberReplicationParameter> </NumberReplicationParameter>
                    <Name>EpsilonInfinity</Name>
                    <Format>F15.8</Format>
                    <LeadingString> </LeadingString>
                    <TrailingString> </TrailingString>
                </Parameter>
            </line>
            <line group="false">
                <NumberReplicationLine> </NumberReplicationLine>
                <NumberParameterLine>1</NumberParameterLine>
                <Parameter group="false">
                    <NumberReplicationParameter> </NumberReplicationParameter>
                    <Name>NumberOscillators</Name>
                    <Format>I6</Format>
                    <LeadingString> </LeadingString>
                    <TrailingString> </TrailingString>
                </Parameter>
            </line>
            <line group="false">
                <NumberReplicationLine>NumberOscillators</NumberReplicationLine>
                <NumberParameterLine>3</NumberParameterLine>
                <Parameter group="false">
                    <NumberReplicationParameter> </NumberReplicationParameter>
                    <Name>EigenFrequency</Name>
                    <Format>F8.1</Format>
                    <LeadingString> </LeadingString>
                    <TrailingString> </TrailingString>
                </Parameter>
                <Parameter group="false">
                    <NumberReplicationParameter> </NumberReplicationParameter>
                    <Name>PlasmaFrequency</Name>
                    <Format>F11.3</Format>
                    <LeadingString> </LeadingString>
                    <TrailingString> </TrailingString>
                </Parameter>
                <Parameter group="false">
                    <NumberReplicationParameter> </NumberReplicationParameter>
                    <Name>Damping</Name>
                    <Format>F11.3</Format>
                    <LeadingString> </LeadingString>
                    <TrailingString> </TrailingString>
                </Parameter>
            </line>
        </InputFile>
        <OutputFile>
            <title>xml-description of the output file for the conventional Drude-Lorentz model</title>
            <OutputFileName>Fit-Functions/Drude-Lorentz_conv/temp/out.txt</OutputFileName>
            <NumberLines>4</NumberLines>
            <NumberColumnsBegin>1</NumberColumnsBegin>
            <NumberColumnsEnd>1</NumberColumnsEnd>
            <CommandWord> </CommandWord>
        </OutputFile>
    </Section>
</InOutputFile>



IMPORTANT:
----------

- The tag <NumberInputFile>1</NumberInputFile> gives the number of input-files
  which are described.


- The tag <CommandLine></CommandLine> includes the command to call the fit
  function module from the command prompt. If the fit function module can
  not be called from the current working directory (i.e. the directory where
  the magix_start.py file is) the relative or absolute path of the fit
  function module program have to be included (see example above).


- The tag <InputFileName></InputFileName> has to include the path and the file
  name of the input file of the fit function module.


- The tag <CalculationMethod></CalculationMethod> defines the
  method of calculation: If the tag is set to 'PointToPoint' the fit function
  is called for each point of the experimental data. If the tag is set to
  'AtOnce' the fit function is called only once for each iteration cycle
  and the fit function is calculate for all points of the experimental data.
  Depending on the value of this tag, the description of the output file
  varies, (see below).


- If the fit function program requires the points of the experimental data where
  the fit function should be calculated then define the path and the file name
  of a file containing the points of the experimental data by the tag
  <InputDataPath></InputDataPath>.


- The tag <NumberLines></NumberLines> defines the total number of lines
  of the input file (without replications)!


- The description of each line is bracket between the <line></line> tags.
  These tags have to occur as many times as defined in the tag
  <NumberLines></NumberLines>. The attribute 'group' indicates, if this
  line is grouped with other lines forming a block which is replicated
  as many times as given by the tag
  <NumberReplicationLine></NumberReplicationLine>. Each value of the tag
  <NumberReplicationLine></NumberReplicationLine> of a line with attribute
  'group="true"' which is unequal to " " defines the beginning of a new
  block. Thus the form of replication depends on the values of the
  <NumberReplicationLine></NumberReplicationLine> tags in the grouped lines!

  For example:  If you want to replicate the following two lines for three
                times the xml-description would look like:

                <line group="true">
                    <NumberReplicationLine>3</NumberReplicationLine>
                    <NumberParameterLine>1</NumberParameterLine>
                    <Parameter group="false">
                        <NumberReplicationParameter> </NumberReplicationParameter>
                        <Name>ParameterA</Name>
                        <Format>F7.3</Format>
                        <LeadingString> </LeadingString>
                        <TrailingString> </TrailingString>
                    </Parameter>
                </line>
                <line group="true">
                    <NumberReplicationLine> </NumberReplicationLine>
                    <NumberParameterLine>1</NumberParameterLine>
                    <Parameter group="false">
                        <NumberReplicationParameter> </NumberReplicationParameter>
                        <Name>ParameterB</Name>
                        <Format>F2.1</Format>
                        <LeadingString> </LeadingString>
                        <TrailingString></TrailingString>
                    </Parameter>
                </line>

                This description describes an input file of the form:

                ParameterA
                ParameterB
                ParameterA
                ParameterB
                ParameterA
                ParameterB

                Note, that the value of the tag
                <NumberReplicationLine> </NumberReplicationLine> of the second
                grouped line must be set to " " to produce the output shown
                above.
                If you set the value of this tag to "3" as well:

                <line group="true">
                    <NumberReplicationLine>3</NumberReplicationLine>
                    ...
                        <Name>ParameterA</Name>
                    ...
                </line>
                <line group="true">
                    <NumberReplicationLine>3</NumberReplicationLine>  (<-- !!!!)
                    ...
                        <Name>ParameterB</Name>
                    ...
                </line>

                the input file would have the following form:

                ParameterA
                ParameterA
                ParameterA
                ParameterB
                ParameterB
                ParameterB

  Note, the value of the tag <NumberReplicationLine>3</NumberReplicationLine>
  can be also given by the value of another model parameter which name have to
  be insert between the tags.
  For example:

        <NumberReplicationLine>NumberOscillator</NumberReplicationLine>

  The parameter "NumberOscillator" must be given in a previous non-grouped
  line with a value larger than 0.

- If the attribute 'group' is set to 'false' the tag
  <NumberReplicationLine></NumberReplicationLine> indicates the
  number of replications of the current line described within the
  <line></line> tag. The default value for a line with attribute
  'group="false"', which is used if the tag
  <NumberReplicationLine></NumberReplicationLine> is empty (" "), is 1.

  Note, that the tag <NumberReplicationLine></NumberReplicationLine> must be
  given only once within one <line></line> block.


- The tag <NumberParameterLine></NumberParameterLine> defines the number of
  model parameters without replications defined within one <line></line> block
  and is given only once within one <line></line> block.


- The settings for each parameter are given within the <Parameter> tags.


- The tag <NumberReplicationParameter></NumberReplicationParameter> defines
  the number of replications of the parameter in the current line. The default
  value is 1. Here, the number can also be defined by a parameter by
  inserting the name of this parameter into the tag. (For example:
  <NumberReplicationParameter>ParameterA</NumberReplicationParameter>, where
  the parameter "ParameterA" defines the number of replications.) The tags
  <Parameter></Parameter> contain attributes 'group' like the <line></line>
  tags mentioned above, which indicate grouped parameters. Grouped parameters
  are replicated as many times as given by the tag
  <NumberReplicationParameter></NumberReplicationParameter> of the first
  grouped parameter. Each value of the tag
  <NumberReplicationParameter></NumberReplicationParameter> of a parameter
  with attribute 'group="true"' which is unequal to " " defines the beginning
  of a new block.

  For example:  If you want to replicate the variables 'ParamterA' and
                'ParameterB' for two times the xml-description would looks
                like:

                ...
                <line group="false">
                    <NumberReplicationLine> </NumberReplicationLine>
                    <NumberParameterLine>2</NumberParameterLine>
                    <Parameter group="true">
                        <NumberReplicationParameter>2</NumberReplicationParameter>
                        <Name>ParameterA</Name>
                        <Format>F2.1</Format>
                        <LeadingString> </LeadingString>
                        <TrailingString></TrailingString>
                    </Parameter>
                    <Parameter group="true">
                        <NumberReplicationParameter> </NumberReplicationParameter>
                        <Name>ParameterB</Name>
                        <Format>F2.1</Format>
                        <LeadingString> </LeadingString>
                        <TrailingString></TrailingString>
                    </Parameter>
                </line>
                ...

                This xml-description produces the following line of an input file:

                ParameterA ParameterB ParameterA ParameterB

                If you change the value of the tag
                <NumberReplicationParameter> </NumberReplicationParameter>
                of the second parameter to "2" as well

                ...
                    </Parameter>
                    <Parameter group="true">
                        <NumberReplicationParameter>2</NumberReplicationParameter>
                ...

                the line of the input file would have the following from:

                ParameterA ParameterA ParameterB ParameterB

  NOTE, that you can combine the tags
  <NumberReplicationLine></NumberReplicationLine> and
  <NumberReplicationParameter></NumberReplicationParameter>.
  For example: If you want to repeat a line as many times as given in the
               parameter "NumParamLine" and repeat the parameter in the
               current line as many times as given in the parameter
               "NumParamColumn" the xml description would be like this:

               <NumberReplicationLine>NumParamLine</NumberReplicationLine>
               <NumberReplicationParameter>NumParamColumn</NumberReplicationParameter>
               <NumberParameterLine>1</NumberParameterLine>
               <LeadingString> </LeadingString>
               <ParameterName>TestParameter</ParameterName>
               <ParameterFormat>I5</ParameterFormat>
               <TrailingString> </TrailingString>


- The name of the model parameters of the current line are defined in the tags
  <Name></Name>. The names of the model parameters used in the xml-description
  of the input file MUST be IDENTICAL with the names of the parameters used
  within the parameter file (defined in the i/o control file by the command
  "parameter_file").

  NOTE, if a name of a model parameter occurs more than once in the
  xml-desciption of the input file, the values of these parameters are set
  following the occurance in the the parameter file.

  For example:  The parameter with name "Eigenfrequency" occurs three times
                within the parameter file with values "200", "400" and "700".
                Thus, the input file will include these values in the
                following order:

                ...
                200
                ...
                400
                ...
                700
                ..

  NOTE, that the number of incidences of a parameter within the parameter
  file MUST be IDENTICAL to the total number of occurrences in the input file,
  including all replications!

  If the tags <NumberReplicationLine></NumberReplicationLine> and
  <NumberReplicationParameter></NumberReplicationParameter> are combined, than
  the values of the parameters are filled from "up" to "down" and from "left"
  to "right".

  For example:  The parameter "param" containing the values "1", "2", "3",
                "4", "5", and "6" may appear in the input file like the
                following:

                param param param
                param param param

                The values of the parameter are set in the following order:

                1 2 3
                4 5 6


- The tags <Format></Format> indicate the format of the parameter value (like
  FORTRAN notation):

  For example: I5 for integers with max. 5 digits, A4 for strings with
               max. 4 characters, F15.8 for real numbers with 8 decimal place
               and max. 15-8-1 integer places.

  NOTE, define enought integer places! During the fitting algorithm, the value
  of the parameter may increase by many magnitudes. If you do not specify
  enough integer places, the value of the parameter is replaced by "********"
  and MAGIX will abort with an error message!


- The tags <LeadingString></LeadingString>, and
  <TrailingString></TrailingString> define the leading and the trailing
  of the parameter string, respectively.

  For example: If model parameter are set by command words in the input
               file of the external fit function program, these command
               words can be insert here in these tags. For example an
               external program set the current frequency in the input
               file by the command word "FREQUENCY =" this command word
               has to be insert in the <LeadingString></LeadingString>
               tag: "<LeadingString>FREQUENCY =</LeadingString>.

  Note, these tags have to occur as many times as given in the tag
  <NumberParameterLine></NumberParameterLine> WITHOUT counting the
  replications! Additionally, if these tags contain only one space
  bar character " ", the value of this tag is ignored.


- If the input file contains a line without a model parameter, the tags
  <NumberParameterLine></NumberParameterLine> has to be set to 0. Then only
  the value of the tag <LeadingString></LeadingString> is read. The other
  tags <Name></Name>,
  <NumberReplicationParameter></NumberReplicationParameter>, and
  <Format></Format> are ignored.


- VERY IMPORTANT:   Depending on the calculation method ('AtOnce' or
                    'PointToPoint') different parameter names have to
                    be included in the registration file:

  'PointToPoint':   The x-positions defining the x-points in the experimental
                    data HAVE TO be indicated by the parameter names "XValue"
                    followed by an index 1, ..., NumberXColumns.
                    For example:    The experimental data describes an
                                    absorption spectra and the x-positions
                                    indicating the current frequency. Thus,
                                    the number of "x"-columns is 1. The name
                                    of the parameter describing the value of
                                    the frequency in the input file is
                                    "XValue1". If you have experimental data
                                    depending on two "x" values (e.g.
                                    frequency and time) the number of "x"-
                                    columns is 2. Thus, the first parameter
                                    describing the frequency is named
                                    "XValue1" and the second, indicating the time
                                    is named "XValue2".

  'AtOnce':         The number of lines, i.e. the number of experimental
                    points is indicated by the parameter name "NumberXValue"
                    followed by an index 1, ..., NumberXColumns.

  Additionally, the command words "CurrentExpFile" and "CurrentYColumn" can be used
  for both calculation methods. The command word "CurrentExpFile" print out the
  index of the current observation file. Furthermore, the command word
  "CurrentYColumn" gives the index of the current y-column.


- The description of the output file is less complex than the description of
  the input file:


- MAGIX can handle more than one output file. The number of output-files produced
  by the external model program is given by the tag
  <NumberOutputFiles></NumberOutputFiles>, where the content has to be always an
  interger > 0. The following settings for each output file has to be embedded by
  the tag <OutputFile></OutputFile>, whereas the tag <OutputFile></OutputFile> has
  to occur as many times as given by the tag <NumberOutputFiles></NumberOutputFiles>.


- The name for each output file has to be given by the tag
  <OutputFileName></OutputFileName>.


- The tag <OutputFileFormat></OutputFileFormat> defines the format of the current
  output file. The user can choose one  of the following commands: "ascii", and
  "dat" (for an ascii-file) and "fits" for a fits-file. Additionally, the command
  "auto" and "automatic" selects the format of the current output file by the ending
  of the file name, i.e. if the file name ends with ".fits", MAGIX expects a
  fits-file otherwise an ascii-file.

  Note, this tag is read only, if the calculation method is set to "AtOnce".


- The tag <OnlyYColumn></OnlyYColumn> defines if the output file(s) include(s)
  only the values of the model function (y-column) without the corresponding
  x-column vaules. If the tag <OnlyYColumn> includes a content unequal to "yes",
  MAGIX reads in the x-column as well as the y-column of the model function and
  checks if the model function values correspond to the given x-column values
  defined in the observation file(s).


- The tag <NumberHeaderLines></NumberHeaderLines> defines the number of header
  lines, which are ignored during the import of the model output file(s). If
  the tag is empty, MAGIX expects no header lines.


- The tag <CharacterForComments></CharacterForComments> defines a character,
  which indicates a comment in the output file(s).


- The following tags are read only, if the calculation method is set to
  "PointToPoint". Here, MAGIX requires only one output value. There are two
  different possibilities of indicating the positions of the output value
  within the output file:


- The first possibility is to define the line and the starting and ending
  column within the output file, where the output file is stored. These
  three values are defined in the tags:

   <NumberLines>4</NumberLines>
   <NumberColumnsBegin>1</NumberColumnsBegin>
   <NumberColumnsEnd>1</NumberColumnsEnd>

  But, if the position of the output file is somehow arbitrary, you can
  also define a command word, which is followed by the output value. This
  command word is defined in the tags:

    <CommandWord> </CommandWord>

- Again, if the tags contain only the space bar character (" "), the content
  of these tags are ignored.




Examples for input files:
-------------------------

  1.)  Simple model input, no replications of parameters or lines:

       100.123
       2.2          // This is a remark
       45
       300.0

       The corresponding xml-description looks like:
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <InOutputFile>
           <contents>xml description of the test model</contents>
           <Section>
               <ModelProgramCall>
                   <CommandLine>Fit-Functions/Drude-Lorentz_conv/bin/DrudeLorentzConv.exe</CommandLine>
                   <CalculationMethod>AtOnce</CalculationMethod>
                   <ParallelizationPossible>Yes</ParallelizationPossible>
               </ModelProgramCall>
               <NumberInputFile>1</NumberInputFile>
               <InputFile>
                   <title>description of the input file for conventional Drude-Lorentz model</title>
                   <InputFileName>in.txt</InputFileName>
                   <NumberLines>4</NumberLines>
                    <line group="false">
                        <NumberReplicationLine></NumberReplicationLine>
                        <NumberParameterLine>1</NumberParameterLine>
                        <Parameter group="false">
                            <NumberReplicationParameter></NumberReplicationParameter>
                            <Name>XValue1</Name>
                            <Format>F7.3</Format>
                            <LeadingString></LeadingString>
                            <TrailingString></TrailingString>
                        </Parameter>
                    </line>
                    <line group="false">
                        <NumberReplicationLine></NumberReplicationLine>
                        <NumberParameterLine>1</NumberParameterLine>
                        <Parameter group="false">
                            <NumberReplicationParameter></NumberReplicationParameter>
                            <Name>ParameterB</Name>
                            <Format>F4.1</Format>
                            <LeadingString></LeadingString>
                            <TrailingString>          // This is a remark</TrailingString>
                        </Parameter>
                    </line>
                    <line group="false">
                        <NumberReplicationLine> </NumberReplicationLine>
                        <NumberParameterLine>1</NumberParameterLine>
                        <Parameter group="false">
                            <NumberReplicationParameter></NumberReplicationParameter>
                            <Name>ParameterC</Name>
                            <Format>I2</Format>
                            <LeadingString></LeadingString>
                            <TrailingString></TrailingString>
                        </Parameter>
                    </line>
                    <line group="false">
                        <NumberReplicationLine>NumberOscillators</NumberReplicationLine>
                        <NumberParameterLine>3</NumberParameterLine>
                        <Parameter group="false">
                            <NumberReplicationParameter></NumberReplicationParameter>
                            <Name>ParameterD</Name>
                            <Format>F5.1</Format>
                            <LeadingString></LeadingString>
                            <TrailingString></TrailingString>
                        </Parameter>
                    </line>
                </InputFile>


               <title>xml-description of the output file of a test model</title>

               <NumberOutputFiles>1</NumberOutputFiles>
               <OutputFile>
                   <OnlyYColumn>yes</OnlyYColumn>
                   <OutputFileName>FitFunctionValues.dat</OutputFileName>
                   <OutputFileFormat>ascii</OutputFileFormat>
                   <NumberHeaderLines></NumberHeaderLines>
                   <CharacterForComments></CharacterForComments>
               </OutputFile>

            </Section>
        </InOutputFile>



  2.)  Conventional Drude-Lorentz model: (A model where one line have to be
       repeated as many times as given by the parameter "NumberOscillators"):

       100.123
       3.5
       3
       100.0    456.234    12.120
       250.0    106.641     2.127
       403.0    251.577    30.022

       The corresponding xml-description is:

       <?xml version="1.0" encoding="ISO-8859-1"?>
       <InOutputFile>
           <contents>xml description of the input and output file for the conventional Drude-Lorentz model</contents>
           <Section>
               <ModelProgramCall>
                   <CommandLine>Fit-Functions/Drude-Lorentz_conv/bin/DrudeLorentzConv.exe</CommandLine>
                   <CalculationMethod>AtOnce</CalculationMethod>
                   <ParallelizationPossible>Yes</ParallelizationPossible>
                   <InputDataPath>DataIn.dat</InputDataPath>
               </ModelProgramCall>
               <NumberInputFile>1</NumberInputFile>
               <InputFile>
                   <title>input description for conventional Drude-Lorentz model</title>
                   <CalculationMethod>PointToPoint</CalculationMethod>
                   <NumberLines>4</NumberLines>
                   <line group="false">
                       <NumberReplicationLine> </NumberReplicationLine>
                       <NumberParameterLine>1</NumberParameterLine>
                       <Parameter group="false">
                           <NumberReplicationParameter></NumberReplicationParameter>
                           <Name>XValue1</Name>
                           <Format>F15.8</Format>
                           <LeadingString></LeadingString>
                           <TrailingString></TrailingString>
                       </Parameter>
                   </line>
                   <line group="false">
                       <NumberReplicationLine> </NumberReplicationLine>
                       <NumberParameterLine>1</NumberParameterLine>
                       <Parameter group="false">
                           <NumberReplicationParameter></NumberReplicationParameter>
                           <Name>EpsilonInfinity</Name>
                           <Format>F15.8</Format>
                           <LeadingString></LeadingString>
                           <TrailingString></TrailingString>
                       </Parameter>
                   </line>
                   <line group="false">
                       <NumberReplicationLine></NumberReplicationLine>
                       <NumberParameterLine>1</NumberParameterLine>
                       <Parameter group="false">
                           <NumberReplicationParameter></NumberReplicationParameter>
                           <Name>NumberOscillators</Name>
                           <Format>I6</Format>
                           <LeadingString></LeadingString>
                           <TrailingString></TrailingString>
                       </Parameter>
                   </line>
                   <line group="false">
                       <NumberReplicationLine>NumberOscillators</NumberReplicationLine>
                       <NumberParameterLine>3</NumberParameterLine>
                       <Parameter group="false">
                           <NumberReplicationParameter></NumberReplicationParameter>
                           <Name>EigenFrequency</Name>
                           <Format>F8.1</Format>
                           <LeadingString></LeadingString>
                           <TrailingString></TrailingString>
                       </Parameter>
                       <Parameter group="false">
                           <NumberReplicationParameter></NumberReplicationParameter>
                           <Name>PlasmaFrequency</Name>
                           <Format>F11.3</Format>
                           <LeadingString></LeadingString>
                           <TrailingString></TrailingString>
                       </Parameter>
                       <Parameter group="false">
                           <NumberReplicationParameter></NumberReplicationParameter>
                           <Name>Damping</Name>
                           <Format>F11.3</Format>
                           <LeadingString></LeadingString>
                           <TrailingString></TrailingString>
                       </Parameter>
                   </line>
               </InputFile>

               <title>xml-description of the output file for the conventional Drude-Lorentz model</title>

               <NumberOutputFiles>1</NumberOutputFiles>
               <OutputFile>
                   <OnlyYColumn>yes</OnlyYColumn>
                   <OutputFileName>FitFunctionValues.dat</OutputFileName>
                   <OutputFileFormat>ascii</OutputFileFormat>
                   <NumberHeaderLines></NumberHeaderLines>
                   <CharacterForComments></CharacterForComments>
               </OutputFile>

           </Section>
       </InOutputFile>


Documentation of the fit algorithms:
------------------------------------

Detailed descriptions of the several fit algorithms are located in the doc
directories ..

