EasySpin icon indicating copy to clipboard operation
EasySpin copied to clipboard

pepper: gStrain and gFrame

Open cetait opened this issue 1 year ago • 3 comments

If g and gStrain are meant to always be collinear, I would have expected gFrame not to affect the powder spectrum for a single spin 1/2 with electron Zeeman interaction only. It does however change quite significantly. The same is true for A and AStrain, while for D and DStrain, changing DFrame does not affect the spectrum as long as it is the only anisotropic interaction provided.

clear, clc, clf

Sys.S = 1/2;
Sys.g = [2.000 2.005 2.010];
Sys.gStrain = [0.0001 0.0001 0.005];

Exp.mwFreq = 34; % GHz
Exp.Range = [1204 1217]; % mT
Exp.Harmonic = 0;

gFrame = [0 0 0; -20 90 0; -20 50 80; -90 30 0]*pi/180;

for i = 1:size(gFrame,1)
  Sys.gFrame = gFrame(i,:);
  [B,spc(:,i)] = pepper(Sys,Exp);
end

plot(B,spc)

cetait avatar May 03 '24 18:05 cetait

Problem localized: g-to-molecular frame transformation is currently done before element-wise squaring of the g strain tensor, but must be done after squaring. Working on fix.

stestoll avatar May 03 '24 23:05 stestoll

It turns out that this fix requires a substantial refactor of strain-related code in resfields, resfields_perturb, resfreqs_matrix and resfreqs_perturb. This is more than just a simple bug fix, so this will be put into 6.1. For 6.0.x, I am adding an error message whenever g strain or A strain are requested with non-zero Sys.gFrame or Sys.AFrame.

stestoll avatar May 07 '24 17:05 stestoll

Error message for 6.0.x added with 567a0c9

stestoll avatar May 07 '24 18:05 stestoll