Error from Using easfit with Multicomponent

General forum for EasySpin: questions, how to's, etc.
Post Reply
tui1994
Newbie
Posts: 7
Joined: Wed Jan 18, 2017 10:17 pm

Error from Using easfit with Multicomponent

Post by tui1994 »

I've an error when I constructed 2 systems in easyspin-5.2.25 that affacted by few protons. Here is my code

Code: Select all

clear all
clc;

[numbers,strings] = xlsread('RAWDATA','RAWDATA');

XDATA = numbers(:,1);
YDATA = datasmooth(numbers(:,3),40,'binom');

FitOpt.Method = 'simplex'; 
FitOpt.Scaling = 'maxabs';

AmT2MHz = 10*4.258; % A[mT] to A[MHz] 

type1.S = 1/2;
type1.g = [2.0071 1.9944];
type1.Nucs = '1H, 1H, 1H';
type1.A = [1.1*AmT2MHz, 0.5*AmT2MHz, 0.35*AmT2MHz]; %MHz 
type1.lwpp = [0 0.2];
type1.weight = 50;
Vary_type1.weight = 25;
Vary_type1.lwpp = [0 1];

type2.S = 1/2;
type2.g = [2.0069 2.0057];
type2.Nucs = '1H';
type2.A = [0.72*AmT2MHz 0.72*AmT2MHz 0.72*AmT2MHz];
type2.lwpp = [0 0.71];
type2.weight = 50;
Vary_type2.weight = 25;
Vary_type2.lwpp = [0 1];

type3.g = [2.0013 2.0013];
type3.lwpp = [0 0.17];
type3.weight = 50;

Exp.mwFreq = 9.849740;
Exp.Range = [min(XDATA/10) max(XDATA/10)];

fitparams = esfit('pepper',YDATA,{type1,type2},{Vary_type1,Vary_type2},Exp,[],FitOpt);
[Bsim,spcsim] = pepper({fitparams},Exp);
Bsim_n = (Bsim*10);
spcsim_n = ((spcsim)*max(YDATA))/max(spcsim);
figure(1); clf;
plot(XDATA, YDATA, Bsim_n, spcsim_n,'-.r','LineWidth', 1.25);
legend('Typical Measurement', 'Simulation');
xlim(Exp.Range*10);
xlabel('Magnetic Filed (G)');
ylabel('ESR signal intensity (a.u.)');
title('Simulation');
After I complied this code, I got an error about using hyperfine nucleus;

Code: Select all

Error using isotopologues
List of nuclei must be a string (e.g. 'Cu,Cl,H,H').

Error in pepper
[/color]

What should I prove my code?
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Error from Using easfit with Multicomponent

Post by Stefan Stoll »

I can't reproduce this problem. The following works fine with 5.2.25:

Code: Select all

isotopologues(type1)
isotopologues(type2)
Post Reply