simultaneous fitting

General forum for EasySpin: questions, how to's, etc.
Post Reply
jclayton
Newbie
Posts: 4
Joined: Fri Apr 03, 2015 9:30 am

simultaneous fitting

Post by jclayton »

Hi,

I have been using the ESfit feature of EasySpin to try to get an idea of the zero-field splitting for some S=7/2 Gd3+ spectra, but I'm running into the problem of having too many free parameters in my fit for it to be very meaningful. If I wanted to do a simultaneous fit of absorption data for the same sample measured at 2 or 3 frequencies, is there an easy way to make ESfit do this?

Thanks,
Jessica
Stefan Stoll
EasySpin Creator
Posts: 1127
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: simultaneous fitting

Post by Stefan Stoll »

Jessica,
here's a quick sketch of a trick to do multi-spectral fitting: concatenate the two spectra, and write your own simulation function that also generates concatenated simulated spectra. esfit can run with this simulation function, as long as it has the same calling syntax as all the ES simulation function.

Simulation function mysimfun.m:

Code: Select all

function y = mysimfun(Sys,Exp,Opt)

% ...
ExpX.mwFreq = 9.5;
yX = pepper(Sys,ExpX,Opt);
%...
ExpW.mwFreq = 95;
yW = pepper(Sys,ExpW,Opt);

scale = 1;
y = [yX scale*yW];

return
Then, call esfit like this:

Code: Select all

esfit('mysimfun',[yXdata yWdata],Sys,Vary,Exp,Opt,fitOpt)
jclayton
Newbie
Posts: 4
Joined: Fri Apr 03, 2015 9:30 am

Re: simultaneous fitting

Post by jclayton »

Cool trick. Thanks!
Post Reply