Page 1 of 1
ESFit error using saffron
Posted: Tue Mar 17, 2015 10:39 am
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?
Re: ESFit error using saffron
Posted: Tue Mar 17, 2015 10:49 am
by Stefan Stoll
Please post a minimal script that reproduces this problem.
Re: ESFit error using saffron
Posted: Tue Mar 17, 2015 11:01 am
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
the simulation runs fine
Re: ESFit error using saffron
Posted: Tue Mar 17, 2015 11:02 am
by Stefan Stoll
Please post all the files necessary to run your script.
Re: ESFit error using saffron
Posted: Tue Mar 17, 2015 11:09 am
by arden13
Here you go!
Re: ESFit error using saffron
Posted: Tue Mar 17, 2015 12:52 pm
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.
Re: ESFit error using saffron
Posted: Tue Mar 17, 2015 1:57 pm
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.