Questions about pepper function

General forum for EasySpin: questions, how to's, etc.
Post Reply
James Chen
Newbie
Posts: 3
Joined: Thu Apr 02, 2015 8:10 am

Questions about pepper function

Post by James Chen »

Hi,
I got some error when running pepper,

WARNING: No resonance fields at 115.54 GHz between 2200 and 2550 mT.
Check field range and spectrometer frequency.
Attempted to access Pdat(:,1); index out of bounds because size(Pdat)=[0,0].

Error in pepper (line 686)


Error in pepper (line 105)


It looks like the function failed because there's no resonance peak at that field range. While I still want the spectrum to be plotted out, is there any way to bypass this error? Thanks!!

-J
Stefan Stoll
EasySpin Creator
Posts: 1120
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Questions about pepper function

Post by Stefan Stoll »

James, please post a minimal script that generates this error, so people on the forum can look at it and help.
James Chen
Newbie
Posts: 3
Joined: Thu Apr 02, 2015 8:10 am

Re: Questions about pepper function

Post by James Chen »

Sorry Stefan, I should be more specific. I attached just a piece of test code, where the exp range is set to [4000 4100]. There's no resonance peak in this field range and the pepper function leads to an error message and terminates the program. Would it be possible pepper function can just returns 0's when no peak exists. THanks!!


theta = 30;
b = 0.11;
d = 15.75;
c = 0.0058;
Exp.mwFreq = 115.54;
Exp.Range =[4000 4100];
Exp.nPoints = 1001;
Exp.Harmonic = 0;
Exp.Mode = 'perpendicular';
Exp.Orientations = [45/180*pi;theta/180*pi];
Exp.Temperature = 1.8;
Sys = struct('S',4,'g',[2.13,2.13,2.3]);
Sys.B2 = -(d/3+575*b/105)*10^3;
Sys.B4 = [0,0,0,0,-b/35*10^3,0,0,0,2*c*10^3];
Sys.gStrain =2*[0.01 0.01 0.01];
[B,spec0,trans] = pepper(Sys,Exp);

plot(B,spec0); axis tight
xlabel('B[mT]');
xlim([0 5000]);
figure;
levelsplot(Sys,[0 theta/180*pi],[0 5000],115.54);
Stefan Stoll
EasySpin Creator
Posts: 1120
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Questions about pepper function

Post by Stefan Stoll »

Unfortunately, this is a bug in version 4.5.5. It appears when you simulate crystal spectra with pepper and there are no lines within the given field range. It will be fixed in the next release. Thanks for reporting!
James Chen
Newbie
Posts: 3
Joined: Thu Apr 02, 2015 8:10 am

Re: Questions about pepper function

Post by James Chen »

Many Thanks!! Any idea when the next version will be released?
Post Reply