Updated Gencurvefit

I've updated Gencurvefit. It now:
1) has many more ways of creating genetic cross over trials, as specified with the /STGY flag. The default (and past strategy) was BEST/1/BIN, which used components from the best fit, and binomial crossover. Other strategies offer the possibility for a more comprehensive search of parameter space (e.g. RAND/1/BIN), albeit at the cost of a reduced speed of convergence.

2) can temper the acceptance of trial vectors using monte carlo sampling. Normally if the chi2 value of the trial vector is lower than vector i from the population then the trial vector replaces vector i. However, if /TEMP is specified then the probability of the trial vector being accepted is now done on a Monte Carlo basis. I.e.:
accept if
chi2(trial) < chi2(i)
or accept if
exp(-chi2(trial)/ chi2(i)/temp) < enoise(1)
This has the effect of exploring wider parameter space, and is more likely to find a global minimum, but may take longer to converge. One should use more iterations with the /K flag if /TEMP is specified. If one uses the /DUMP flag as well the M_gencurvefitpopdump wave containing the history of the minimisation _may_ be suitable for use in calculating a covariance matrix or use as the posterior probability distribution for Bayesian model selection. However, this has not been tested, use at own risk. The minimisation history may need massaging first.
I've updated Gencurvefit. It can now perform a final "polishing" fit with Levenberg Marquardt. This is useful if you suspect a lower minimum in the cost function will be accessible after the genetic optimisation finishes. This may be the case if you set a high convergence tolerance. Such an approach is often used when you suspect that the genetic optimisation has located the global minimum, but due to the stochastic nature of the algorithm will take a while to converge. At this point it is worthwhile swapping to a faster, gradient based, minimisation such as Levenberg Marquardt.
I' ve added the /HOLD flag to the gencurvefit operation.
If a fit function takes many parameters then the holdstring can become large and unwieldy. Consequently, the specification of which parameters are held, and which vary, can be carried out by using the /HOLD=holdwav flag. If an element of this wave is 0, NaN or Inf, then the parameter is varied during the fit. Otherwise it is held. If the /HOLD flag is used then the holdstring is ignored, although it must still be used in the command as "".

e.g use:

gencurvefit /HOLD=holdwav mygauss, mydata, "", mylimits


instead of
gencurvefit mygauss, mydata, "0010", mylimits