Hi,
first a report of a small mistake in the manual: https://easyspin.org/easyspin/documenta ... tting.html states that for a hybrid fit, you call the arguments from the first stage via fit1.afit. Its fit1.argsfit{}{} where at least I find my data, afit is not created. That was easy to figure out.
But now I'm stuck, hybrid, non hybrid / single stage, when I carry out the following commands which I had been running for tons of spectra in 5.2.35:
Taken from 5.2.35:
Code: Select all
FitOpt.TolFun = 1e-3; % termination tolerance for error change
FitOpt.TolStep = 1e-4; % termination tolerance for parameter step, Levenberg/Marquardt
FitOpt.TolEdgeLength = 1e-3; % termination tolerance for parameter step, simplex
FitOpt.nIter = 500;
FitOpt.maxTime = 3; % maximum time, in minutes
FitOpt.maxGenerations = 40; % Generations
FitOpt.AutoScale = 'none';
FitOpt.Method = 'levmar int';
Updated for 6.0.0:
Code: Select all
fit2 = esfit(spcs,@garlic,{DMPO_SYS(2,:), Exp}, {DMPO_VARY}, FitOpt);
It gives me as a reply:
-- esfit ------------------------------------------------
Number of datasets: 1
Data set 1: 3999 points
Model function name: garlic
Number of fit parameters: 5
Minimization algorithm: Levenberg-Marquardt
Residuals computed from: integral
Autoscaling: noneRunning optimization algorithm with 5 active parameters...
iteration 1: value 7.00478e+04 gradient 3.28912e+11 step 4.41756e-03
Terminated: Parameter step below threshold of 0.0001Calculating parameter uncertainties...
Estimating Jacobian...
** Spectrum exceeds sweep range. Artifacts at lower limit possible.
Calculating parameter covariance matrix...
Calculating parameter correlation matrix...Parameters:
name value standard deviation 95% confidence interval
1 arg1{1}.g 2.006100 7.963657e-05 ( 0.004 %) 2.005944 - 2.006256
2 arg1{1}.A(1,1) 41.75718 0.3530521 ( 0.845 %) 41.06521 - 42.44915
3 arg1{1}.A(1,2) 41.64452 0.5221534 ( 1.254 %) 40.62112 - 42.66792
4 arg1{1}.lw 0.5000000 0.01965603 ( 3.931 %) 0.4614749 - 0.5385251
5 arg1{1}.weight 1.000000 0.03569025 ( 3.569 %) 0.9300484 - 1.069952Correlation matrix:
1.000000 -0.754405 -0.063909 0.000356 -0.001203
-0.754405 1.000000 0.048562 0.003965 -0.001474
-0.063909 0.048562 1.000000 0.006611 -0.000486
0.000356 0.003965 0.006611 1.000000 -0.165580
-0.001203 -0.001474 -0.000486 -0.165580 1.000000Strongest correlations:
p(1)-p(2): -0.754405
p(4)-p(5): -0.16558
p(1)-p(3): -0.0639089
p(2)-p(3): 0.0485616
p(3)-p(4): 0.0066107Goodness of fit:
ssr 229038
rmsd 7.56794
noise std 7.56889 (estimated from residuals; assumes excellent fit)
noise der 0.000206445 (estimated using der_snr algorithm)
red chi-square 1.34383e+09 (using noise der estimate)Error using garlic
No broadening given. Cannot compute spectrum with Exp.Harmonic=1.
Error in compisoloop
Error in garlic
It is not working with genetic either. I call genetic as
Code: Select all
FitOpt.Method = 'genetic fcn';
Same issue. It's actually only DMPO-OH being fitted, spectrum fully contained in the spectral range, had all been working in 5.2.35. Any ideas on what I'm doing wrong? In general, garlic doesn't seem to read the current linewidth from the fit result in my case.