Page 1 of 1

Visualisation of fitting data

Posted: Tue May 24, 2016 5:17 am
by katarkon

This small program visualize the results of the fitting by esfit function to make futher processing easier. The program generally works with interactive fitting results although it can be used in other ways.
For installation just copy vis.m file into easyspin working folder. Run your interactive simulation, export the result in Matlab workspace (see esfit user guide for details) and just type 'vis' in Matlab command window. The additional figure will appear.
You can use the follow code:

Code: Select all

vis - without parameters is the same as vis(fit1,x)
vis(fit1) - just draw exp and sim spectra and type best fit parameters
vis(fit1,xval) - if x values of the experimental spectra given, the field label additionally appears in spectra figure (x values vector appears as a result of eprload function).
vis(fit1,xval,mode) - third parameter defines the field labelling mode. 0 - no labels, 1 - arrow label, 2 - field axis, 3 - both axis and arrow.

If you want to use the function in your own script try such code:

Code: Select all

[x, y, par] = eprload('filename.par');
..... % define fitting parameters here
[fitSys,fitSpec]=esfit('garlic',y,Sys,Vary,Exp,[],FitOpt);
bestfit.expSpec=y;
bestfit.fitSpec=fitSpec;
bestfit.Sys=fitSys;
vis(bestfit,x);

UPD. Some improvements of the code were made.
Don't hesticate to ask an additional features.
Best regards.


Visualisation of fitting data

Posted: Tue Apr 09, 2024 10:27 pm
by katarkon

For EasySpin 6.0.x adopted version of vis.m is released. It should be working in someway, but its ideal behaviour is still in the process. Previous version for 5.x.x. version is still available.