Here is a pared down script.
Code: Select all
clear
Exp.mwFreq=9.46;
%Exp.Temperature=4.2;
Exp.CrystalSymmetry='C1';
Exp.Range = [0 1000];
Sys.S=1/2;
Sys.g=[8.2819 8.3053 3.3640];
Sys.gFrame=[ 45.03 54.55 -4.47]/180*pi;
phi = (0:5:180)*pi/180;
Tilt = [ -89.64 45.07 -90.65]/180*pi -pi;
for i=1:length(phi)
Exp.CrystalOrientation = [phi(i),pi/2,0];
Exp.CrystalOrientation=eulang(erot(Exp.CrystalOrientation)*erot(Tilt(1),Tilt(2),Tilt(3)));
[Br(i), Ir(i)]=resfields(Sys,Exp);
[Be(i), Ie(i)]=eigfields(Sys,Exp);
end
subplot(2,1,1)
plot(phi,Br,'.',phi,Be,'o')
xlabel('phi /rad')
ylabel('field /mT')
subplot(2,1,2)
plot(phi,Ir,'.',phi,Ie,'o')
xlabel('phi /rad')
ylabel('intensity /a.u.')
legend('resfields','eigfields')
Your problem is arising from your post processing and sorting with respect to the intensity. eigfields
does not take into account the temperature(or other polarization mechanisms) like resfields, and as a result the intensities don't match between the two algorithms. Your discrepancies are likely from (in your script) lines 85-91 not behaving the same.
eigfields
isn't really utilized so there hasn't been an effort to provide feedback about improper or unused inputs.