Pepper simulation depends on field step size

A place to report and discuss potential bugs
Post Reply
daviddiviad
Newbie
Posts: 1
Joined: Fri Aug 20, 2021 5:34 am

Pepper simulation depends on field step size

Post by daviddiviad »

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

Matt Krzyaniak
EasySpin Guru
Posts: 153
Joined: Tue Jul 22, 2014 11:01 am
Location: Northwestern University

Re: Pepper simulation depends on field step size

Post by Matt Krzyaniak »

This is a problem related to your linewidths. If the linewidth is smaller than the step size, the convolution doesn't really work appropriately. I know this has been fixed in the development version 6.0.0*, and it includes an adequate warning.

You can also refer to viewtopic.php?p=2473#p2473 for a similar problem that pops up with low field resolution.

Post Reply