StollLab/EasySpin

Exp.mwPhase ignored for pure-Lorentzian broadening and isotropic g

stestoll opened this issue · 1 comments

clear, clc

Sys.lwpp = [0 3];

Exp.Harmonic = 1;
Exp.mwFreq = 9.525;
Exp.Range = [300 380];

Exp.mwPhase = 0;
[B,spc_abs] = pepper(Sys,Exp);
Exp.mwPhase = pi/2;
[B,spc_disp] = pepper(Sys,Exp);

plot(B,spc_abs,B,spc_disp);

See also #202.

More comprehensive test:

clear, clc

Sys.lwpp = [0 3];

Exp.mwFreq = 9.525;
Exp.Range = [300 380];

simfcn = {@pepper,@garlic};
simfcnname = {'pepper','garlic'};
harmonic = [0 1 2];

idx = 0;
for k = 1:2
  for h = 1:3
    Exp.Harmonic = harmonic(h);
    fun = simfcn{k};
    
    Exp.mwPhase = 0;
    [B,spc_abs] = fun(Sys,Exp);
    Exp.mwPhase = pi/2;
    [B,spc_disp] = fun(Sys,Exp);

    idx = idx+1;
    subplot(2,3,idx)
    plot(B,spc_abs,B,spc_disp);
    title(sprintf('%s, harmonic %d',simfcnname{k},harmonic(h)));
  end
end