Different curves (number of lines) for different exp ranges

A place to report and discuss potential bugs
Post Reply
dusanm
Newbie
Posts: 4
Joined: Mon Apr 10, 2017 2:20 am

Different curves (number of lines) for different exp ranges

Post by dusanm »

Some lines are missing for some combination of Sys parameters and for some Exp ranges. The pepper gives different spectra for different simulation ranges. In this sample the spectra are compared with same Sys and different exp range. For some g some lines at low field disappear.

Code: Select all

clear, clc
LW = 3; c = 299792458;

Exp1.mwFreq = 9.4202; % fajl cm-1.mcd
Exp2 = Exp1;
Exp1.Range = [70 600];
Exp2.Range = [120 250];

% Opt.nKnots = [361 1];
Sys.Nucs = '55Mn';
Sys.S = 3/2;
AA = mt2mhz(7.844);
Sys.A = AA;
DD = [9718 68.1];
Sys.D = DD;     % MHz
Sys.lw = LW;
XN = 1; YN = 3;
index = reshape(1:(XN*YN), XN, YN).';
indMax = XN*YN;

figure;
        for ind = 1:indMax
            Sys.g = 2.000 + 0.045*(ind - 1);
            
%             [B,spec1] = pepper(Sys,Exp1,Opt);
%             [B2,spec2] = pepper(Sys,Exp2,Opt);
            [B,spec1] = pepper(Sys,Exp1);
            [B2,spec2] = pepper(Sys,Exp2);

    subplot(YN,XN,index(ind)); 

            hold on;
            plot(B,spec1,'DisplayName',['g=' num2str(Sys.g) ' A=' num2str(Sys.A) ' D=' num2str(Sys.D) ' Range=' num2str(Exp1.Range)]);
            plot(B2,spec2-1,'DisplayName',['g=' num2str(Sys.g) ' A=' num2str(Sys.A) '  D=' num2str(Sys.D) ' Range=' num2str(Exp2.Range)]);
            hold off;
            legend('show');
            xlabel('magnetic field [mT]');

        end
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Different curves (number of lines) for different exp ran

Post by Stefan Stoll »

Before starting a simulation, pepper applies a pre-selection procedure to identify the transitions that will (likely) contribute to the spectrum. In your case, there is strong mixing, and pepper is struggling to identify all significant transitions.

The remedy is to lower the pre-selection threshold in Opt.Threshold from its default value 1e-4 to maybe 1e-7. This will result in more transitions being included in the simulation. If that doesn't help, then set it to zero, and pepper will skip the transition pre-selection entirely and include all transitions.

Code: Select all

Opt.Threshold = 1e-7; % threshold for identifying significant transitions
pepper(Sys,Exp,Opt)
dusanm
Newbie
Posts: 4
Joined: Mon Apr 10, 2017 2:20 am

Re: Different curves (number of lines) for different exp ran

Post by dusanm »

Thank you Stefan, Opt.treshold option solved the problem. With value 1e-7 all expected lines emerged.
Post Reply