Page 1 of 1

Strange artifacts appearing in Sim

Posted: Sat Sep 20, 2014 2:39 pm
by Wakka wakka wakka
I'm trying to simulate a powder spectrum and am getting very non physical results (see code + spectrum in attachment). I've seen this happen a few times when simulating other systems but this is a good example. Does anyone have an explanation for what's happening between ~5T and ~10T? Is there a way to fix this?

Code: Select all

clear

%Spin Hamiltonian Parameters 
Sys.S = 2;          
Sys.D=[-96993.9851  950];   %D, E
Sys.g = [2.0 2.0 2.0];
Sys.lw = 63;

Exp.Range = [0 14500];
Exp.mwFreq = 412.8;
Exp.Temperature = 5;
Exp.Orientations = [];

[B,spec] = pepper(Sys,Exp);

figure
plot(B, spec);


Re: Strange artifacts appearing in Sim

Posted: Sat Sep 20, 2014 5:23 pm
by Matt Krzyaniak
These artifacts are likely coming from incomplete powder averaging. The solution to which is to increase the number of orientations averaged using options.nKnots. However, Increasing this will significantly slow down the simulation.

try

Code: Select all

    clear

    %Spin Hamiltonian Parameters
    Sys.S = 2;         
    Sys.D=[-96993.9851  950];   %D, E
    Sys.g = [2.0 2.0 2.0];
    Sys.lw = 63;

    Exp.Range = [0 14500];
    Exp.mwFreq = 412.8;
    Exp.Temperature = 5;
    Exp.Orientations = [];

    opt.nKnots = 91;

    [B,spec] = pepper(Sys,Exp,opt);

    figure
    plot(B, spec);

91 knots will clean most of it up. You'll likely have to step that up to 121 or higher to get a nice smooth spectrum.

Re: Strange artifacts appearing in Sim

Posted: Sun Sep 21, 2014 11:15 am
by Wakka wakka wakka
Yup that helps a lot. It seems every problem I've had thus far stems from not reading the documentation closely enough! Thanks for the help