Pepper and separate output

General forum for EasySpin: questions, how to's, etc.
Post Reply
Yukky
Newbie
Posts: 2
Joined: Mon Oct 02, 2023 7:50 pm

Pepper and separate output

Post by Yukky »

I am simulating a spectrum with pepper and the following code and obtained the attached spectrum. However when I added Opt.output='separate' option in order to get decomposed spectra, I got this warning: WARNING: No resonance fields at 9.38823 GHz between 5 and 1500 mT. Check field range and spectrometer frequency.". Why am I getting this error while I've got some peaks without the option?

Exp.mwFreq = 9.388231;
Exp.Range = [5 1500];
Exp.Temperature = 300; % temperature in kelvin

%Exp.nPoints = 3000;

Nx2.S=3/2
Nx2.g = [1.96, 2.11, 2.40];
Nx2.Nucs = 'Co';
Nx2.A = [0 0 750]; %MHz
Nx2.lwpp = [3 3]

D=-21.294913
E=D*0.114877
waveN_MHz=29979.2458

Nx2.D = [D*waveN_MHz E*waveN_MHz]

[B,spc2] = pepper({Nx2}, Exp);

plot(B,spc2/max(spc2));

For the additional option, I've changed/added the code as follows.

Opt.Output='separate'
[B,spc2] = pepper({Nx2}, Exp, Opt);

Attachments
Sim.png
Sim.png (17.7 KiB) Viewed 4654 times
DanielKlose
User
Posts: 18
Joined: Thu Jun 09, 2022 5:22 am

Re: Pepper and separate output

Post by DanielKlose »

Dear Yukky,

changing the requested output to separate transitions changes the format of the returned data: Instead of the single spectrum, a vector with 1x1024 elements, with Opt.Output = 'separate' you get a spectrum for each transition. All the separate spectra are lined up in a matrix with N_transitions x 1024 elements.
These you can plot line by line (or e.g. using the function stackplot()) as you see below.
Best wishes!

Exp.mwFreq = 9.388231;
Exp.Range = [5 1500];
Exp.Temperature = 300; % temperature in kelvin

%Exp.nPoints = 3000;

Nx2.S=3/2;
Nx2.g = [1.96, 2.11, 2.40];
Nx2.Nucs = 'Co';
Nx2.A = [0 0 750]; %MHz
Nx2.lwpp = [3 3];

D=-21.294913;
E=D*0.114877;
waveN_MHz=29979.2458;

Nx2.D = [DwaveN_MHz EwaveN_MHz];

% [B,spc2] = pepper({Nx2}, Exp); % generate sum spectrum directly

Opt.Output='separate';
[B,spc2] = pepper({Nx2}, Exp, Opt);

spc2_sum = sum(spc2); % sums up all transitions to generate sum spectrum

plot(B,spc2_sum);
hold on;
cc = jet(length(spc2(:,1)));
for i = 1:length(spc2(:,1))
plot(B,spc2(i,:),'Color',cc(i,:));
end

Yukky
Newbie
Posts: 2
Joined: Mon Oct 02, 2023 7:50 pm

Re: Pepper and separate output

Post by Yukky »

Thank you very much. The code worked. Is there a way to automatically sum/output the transitions between the same Ms levels but with different hyperfine coupling? For example is it possible to output only transitions between Ms=+/-3/2 that includes all of the different hyperfine splitting levels.

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

Re: Pepper and separate output

Post by Stefan Stoll »

No. You'll have to do that partial summation manually.

Post Reply