Plotting Zero-Crossing Roadmaps

A place to report and discuss potential bugs
Post Reply
UABEPR
Newbie
Posts: 1
Joined: Wed Dec 03, 2014 1:37 pm

Plotting Zero-Crossing Roadmaps

Post by UABEPR »

I'm attempting to plot a simple "roadmap" of zero-crossings for an array of angles based on different rotation axes.

When I use a rotation axis that has the form, [1 0 x ], x/=0 I am only able to plot data for 45 degrees. When I plot [1 0 0] or [0 1 0] or [1 x 0], the code works fine, but for some reason on other axes, some spectra is "cut off".

I believe this may be a bug. This is the code that I am using.

Code: Select all

 % resonance roadmap from single crystal rotation
%================================================================

clear; clc; clf;

%Spin parameters
Sys.S = 5/2;
Sys.g = [2.0069];
Sys.lw = 3;
Sys.aFrame = 3;

Sys.D = [-768*3];
Sys.aF = [78*3 15*3];
% Experimental parameters
Exp.mwFreq = 9.401;
Exp.Range = [150 700];
Exp.CrystalSymmetry = 186;
Exp.nPoints = 1024;

% Generate orientations in a single rotation plane
rotN = [1 0 1];  % rotation axis
[phi,theta] = rotplane(rotN,[0 pi/2],91);
Exp.Orientations = [phi;theta];

% Simulate spectra
Opt.Output = 'separate';  % make sure spectra are not added up
Bres = resfields(Sys,Exp,Opt);

% plotting
 plot(Bres,theta*180/pi,'b') 
 
xlabel('magnetic field (mT)');
ylabel('theta (°)');
Stefan Stoll
EasySpin Creator
Posts: 1059
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Plotting Zero-Crossing Roadmaps

Post by Stefan Stoll »

You should plot the data against the in-plane angle chi:

Code: Select all

chi = linspace(0,pi/2,91);
[phi,theta] = rotplane(rotN,chi);

plot(Bres,chi*180/pi);
chi is the angle in the rotation plane. theta is not the in-plane angle, it's the angle down from the z axis.
Post Reply