Fitting ESR spectrum with two independent Spins

General forum for EasySpin: questions, how to's, etc.
Post Reply
lkrishna
Newbie
Posts: 9
Joined: Sun Nov 15, 2015 7:14 pm

Fitting ESR spectrum with two independent Spins

Post by lkrishna »

Hi,
I am trying to use esfit to simulate a spectrum for a system with two independent 1/2 spins and different g-value.
When I run the code below I get SEVERAL errors
Error using .*
Matrix dimensions must agree.
Error in validatespinsys
Error in pepper
Error in pepper
Error in esfit
Error in esfit_simplex
Error in esfit
Error while evaluating UIControl Callback

Here is my code:
clear
%2 independent spins
[B,spc] = eprload('test.par')
Sys0.S = [1/2, 1/2];
Sys0.ee = 1e-3;

Exp.mwFreq = 9.501715; % GHz
Exp.Range = [335.5 340.5]; % in mT Field range use for sims and esfit
Exp.CrystalOrientation = [ ];
%Exp.CrystalSymmetry = 63;
Temperature = 78;
ModAmp = 0.2;
nPoints = 512; % number of points in spectral data vector
B = linspace(Exp.Range(1),Exp.Range(2),nPoints); % field axis


% Now we set up the least-squares fitting.
% First comes a starting set of parameters (which we
% obtain by copying the spin system from the simulation
% and changing a few values)
Sys0.g = [2.0044 ; 2.0085]; % IS THIS THE CORRECT WAY TO ENTER g- VALUES FOR 2 SPIN SYSTEM?
Sys0.lwpp = [0.1; 0.1] %IS THIS THE CORRECT WAY TO ENTER lwpp VALUES FOR 2 SPIN SYSTEM?
%Sys0.lw = 0.5; % mT
Sys0.gStrain=[ 0 ; 0];
Sys0.HStrain = [0 ; 0];

% Next, we specify which parameter we want to be fitted
% and by how much the fitting algorithm can vary it approximately.
Vary.g = [0.001; 0.001];
%Vary.gStrain = [0.0001; 0.02];
SimOpt.Method = 'perturb';

% Calling the fitting function
FitOpt.Method = 'simplex int'; % simplex algorithm, integrals of spectra
esfit('pepper',spc,Sys0,Vary,Exp,SimOpt,FitOpt);

Can any of the users please troubleshooting what the problem with my code is???? THANK YOU!!1
Lakshmi
lkrishna
Newbie
Posts: 9
Joined: Sun Nov 15, 2015 7:14 pm

Re: Fitting ESR spectrum with two independent Spins

Post by lkrishna »

I figured this one! Thank you!
Post Reply