Hi everyone!
I noticed that the simulation of a cw spectrum with pepper depends on the step size in the field range (range/nPoints). At least for my easyspin version (5.2.32) a stepsize below 0.001mT does not produce the results I want. I checked, if the problem only depends on the number of points, but even moderate amounts of points (5k) give bad results if the range is sufficiently narrow.
I have included a threshold of zero in my simulation options as I have read that this could be the problem. That does not help.
Here's a small script that should illustrate the difference.
Code: Select all
%% Spectrum changes with resolution of field range
clf
hold on
Sys1 = struct('g', 2.00326481117863, 'lwpp', [0.155868947693481, 0.00173485499394154]);
Sys2 = struct('g', 2.00007322833843, 'lwpp', [0.148495773688296, 0.0721368994207793]);
Exp.mwFreq = 9.4;
% Field step size of 0.002 mT
Exp.Range = [330 340];
Exp.nPoints = 1000;
[B, sim] = pepper({Sys1, Sys2}, Exp);
plot(B, sim)
% Field step size of 0.001 mT because of range
Exp.Range = [333 338];
Exp.nPoints = 5000;
[B, sim] = pepper({Sys1, Sys2}, Exp, struct('Threshold', 0));
plot(B, sim)
% Field step size if 0.001 mT because of # points
Exp.Range = [330 340];
Exp.nPoints = 10000;
[B, sim] = pepper({Sys1, Sys2}, Exp, struct('Threshold', 0));
plot(B, sim)
legend('good', 'not good (range)', 'not good (points)')
I'm quite new to easyspin so maybe I have just made an error and this really is no bug.
Could my linewidths be the problem? This would explain, why the spectrum changes only for the first spin system, as here the lorentzian component is on the order of the stepsize.
Thanks in advance!
David