Setting up parameter files for fitting

In order to fit, it is necessary to tell the fitting programs searchspace and simannfit, which parameters in some input files should be varied. Take for instance the input file mcphas.jjj: if you want to vary a parameter, create a file mcphas.jjj.forfit which is an exact copy of mcphas.jjj - in this file you substitute the value of the parameter which you want to vary by parname[value,min,max,xx,stp]. Here value denotes the starting value, min and max the parameter range, xx an arbitrary number (this field will be used by the algorithm to calculate the error of the parameter). Stp denotes the maximum step width for this parameter. Here follows an example:

  1. Original input file /mcphas/examples/ndba2cu3o7/mcdiff.in:
    ...
    #
    #{atom-file} da[a]  db[b]    dc[c]     dr1[r1]  dr2[r2]  dr3[r3]   <Ma>     <Mb>  <Mc> [mb]
    #{corresponding effective fields gjmbHeff [meV]- if passed to mcdiff only these are used 
    # for caculation (not the magnetic moments)}
    {Nd3p.sipf} 0.50000 0.50000 0.50000 0.50000 0.50000 0.50000 +0.00000 +0.00000 -1.36910  
               corresponding effective fields gjmbHeff [meV]--> +0.00000 +0.00000 -0.07530
    {Nd3p.sipf} 0.50000 0.50000 1.50000 0.50000 0.50000 1.50000 +0.00000 +0.00000 +1.36910  
               corresponding effective fields gjmbHeff [meV]--> +0.00000 +0.00000 +0.07530
    ...
    

  2. Modified input file/mcphas/examples/dba2cu3o7/mcdiff.in.forfit:
    ...
    #{atom-file} da[a]  db[b]    dc[c]     dr1[r1]  dr2[r2]  dr3[r3]   <Ma>     <Mb>  <Mc> [mb]
    #{corresponding effective fields gjmbHeff [meV]- if passed to mcdiff only these are used 
    # for caculation (not the magnetic moments)}
    {Nd3p.sipf} 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000  0.0000 0.0000 -1.3691  
      corresponding effective fields gjmbHeff [meV]-->     0.0000 parHb %%@
    [-2.815596e-003,-2.000000e-002,1.000000e-002,2.762505e-005,4.851325e-003] parHc %%@
    [-5.328829e-002,-9.000000e-002,-5.000000e-002,1.614710e-005,4.896285e-003]
    {Nd3p.sipf} 0.5000 0.5000 1.5000 0.5000 0.5000 1.5000  0.0000 0.0000 1.3691  
       corresponding effective fields gjmbHeff [meV]-->    0.0000 function[-1*parHb] function[-1*parHc]
    ...
    

As can be seen constraints on the parameters can be implemented by substituting the parameter value by function[parname]. This means for instance, that instead of function[par2a] the algorithm uses the parameter par2a specified at another place of the input file.

Figure 23: Coverage of a two-dimensional parameter space by program searchspace
\includegraphics[angle=0, width=0.8\textwidth]{figsrc/searchspace.eps}

What does searchspace/simannfit do with these parameter files ?

The fitting programs searchspace and simannfit take the modified file and generate from it an input file in the original format (using several different sets of parameters) and call the program calcsta for each parameter set.