ESFit error using saffron

General forum for EasySpin: questions, how to's, etc.
Post Reply
arden13
User
Posts: 14
Joined: Thu Jul 24, 2014 3:46 pm

ESFit error using saffron

Post by arden13 »

I'm attempting to fit a 3-pulse ESEEM spectrum in the time domain. When I do a simulation by hand, I receive no errors and each iteration of saffron takes a very short period of time, 1 second or less. However when I attempt to then take the exact same system and input it into esfit to nail down my spectral parameters, I get the following error:

Code: Select all

While setting the 'YData' property of Line:
This is not a valid VectorData value. Complex inputs
are not supported

Error in esfit>assess (line 767)



Error in fit_simplex (line 66)



Error in esfit>runFitting (line 598)


 
Error while evaluating UIControl Callback
My data has no complex values so I'm not sure where this is coming from. The spin system, experimental parameters, and simulation options are copy-pasted from the previously mentioned script so they shouldn't be an issue. the Vary structure is generated in this script, but I'm not sure why that would cause this error.

Any ideas?
Stefan Stoll
EasySpin Creator
Posts: 1059
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: ESFit error using saffron

Post by Stefan Stoll »

Please post a minimal script that reproduces this problem.
arden13
User
Posts: 14
Joined: Thu Jul 24, 2014 3:46 pm

Re: ESFit error using saffron

Post by arden13 »

Here's what I'm using

Code: Select all

load('YData.mat');
load('ExpParams.mat');

clear Sys Exp Opt Vary

Aiso=1.754;
Adip=0.2;
Q1=1.9;
Q2=0.2;

Sys.S=1/2;
Sys.g=[2.205 2.205 2.065];
Sys.Nucs='14N,14N,14N';
Sys.A_=[Aiso Adip;Aiso Adip;Aiso Adip];
Sys.Apa=[0 pi 0; pi/3 pi 0; 2*pi/3 pi 0];
Sys.AStrain=[1 1 1];
Sys.Q=[Q1 Q2;Q1 Q2;Q1 Q2];

Exp.mwFreq=p.MWFQ/(10^9);
Exp.Field=p.B0VL*1000;
Exp.Sequence='3pESEEM';
Exp.nPoints=p.XSpecRes;
Exp.dt=str2double(p.FTEzDeltaX(1:end-3))/1000;
Exp.tau=str2double(p.FTEzDelay1(1:end-3))/1000;
Exp.T=str2double(p.FTEzDelay2(1:end-3))/1000;
Exp.ExciteWidth=200;

Opt.Method='hybrid';

Vary.A_=[0.1 0.2; 0.1 0.2; 0.1 0.2];
Vary.Q=[0.4 0.2; 0.4 0.2;0.4 0.2];

esfit('saffron',YData,Sys,Vary,Exp,Opt);
If I comment out the esfit line and replace it with

Code: Select all

saffron(Sys,Exp,Opt)
the simulation runs fine
Stefan Stoll
EasySpin Creator
Posts: 1059
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: ESFit error using saffron

Post by Stefan Stoll »

Please post all the files necessary to run your script.
arden13
User
Posts: 14
Joined: Thu Jul 24, 2014 3:46 pm

Re: ESFit error using saffron

Post by arden13 »

Here you go!
Attachments
Files.zip
(5.76 KiB) Downloaded 208 times
arden13
User
Posts: 14
Joined: Thu Jul 24, 2014 3:46 pm

Re: ESFit error using saffron

Post by arden13 »

Tried it on another computer and it runs. Not sure what is going on. I'll let you know if I figure anything out.

Edit:

Seems I am running MATLAB 2014b and the computer it works on is 2009a. I'll try on some others

Also works on 2012b. Seems to be 2014b specific.
Stefan Stoll
EasySpin Creator
Posts: 1059
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: ESFit error using saffron

Post by Stefan Stoll »

It is 2014b specific indeed. The following works up to R2014a, but errors in R2014b:

Code: Select all

clf
N = 10;
x = 1:N;
y = rand(1,N)+ 0.1i;
h = line('XData',x,'YData',y);
Thanks for reporting the problem. We'll have this fixed in the next ES version. Meanwhile, run ES on R2014a or older.
Post Reply