Exp.SampleRotation issue in recent dev version?

A place to report and discuss potential bugs
Post Reply
steffen
Newbie
Posts: 3
Joined: Tue Feb 22, 2022 12:07 pm

Exp.SampleRotation issue in recent dev version?

Post by steffen »

Hej!

I have been using the Exp.SampleRotation method of the development version 6 of easyspin. Some changes between versions dev.37 and dev.48 seem to have broken this method. (Is there a change log publicly available for the dev versions?)

Is it save to replace SampleRotation by using the rotateframe function like here: https://github.com/StollLab/EasySpin/bl ... rotation.m ?
For me, all is fixed by using Exp.CrystalOrientation = rotateframe([Eu0A, Eu0B, Eu0C], rotationaxis, rotationangle) instead of the combination of Exp.CrystalOrientation = [Eu0A, Eu0B, Eu0C] and Exp.SampleRotation={rotationangle, rotationaxis}.

But maybe there is more to question or cross-check? Was the implementation of SampleRotation maybe changed as a change of design or a fix?
Thank you for any feedback!
/Steffen

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

Re: Exp.SampleRotation issue in recent dev version?

Post by Stefan Stoll »

This difference could be the result of either a bugfix or a new bug,

Can you please post a short script that illustrates the problem? In particular, does the latest dev version behave as you would expect physically, or not?

steffen
Newbie
Posts: 3
Joined: Tue Feb 22, 2022 12:07 pm

Re: Exp.SampleRotation issue in recent dev version?

Post by steffen »

Now, looking for the simplest minimal example, it appears that Exp.SampleRotation actually does not even have an effect any longer in the current version dev48. Sorry, I could have noticed this earlier. Again, version dev37 was still fine.
I tested using either anisotropic g-factor, or via Sys.D, or via Sys.B2. In any case watching the output of resfields.

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

Re: Exp.SampleRotation issue in recent dev version?

Post by Stefan Stoll »

Please send a short script that illustrates the issue, so that we can look into it - thanks!

steffen
Newbie
Posts: 3
Joined: Tue Feb 22, 2022 12:07 pm

Re: Exp.SampleRotation issue in recent dev version?

Post by steffen »

Sys=struct('g',[2.0 2.1 2.2],'S',1/2);
Exp=struct('mwFreq',30,'Range',[0 2000],'CrystalOrientation',[0 0 0]);
rotaxis=[1 1 1];
rotation=45; % deg
Exp.SampleRotation = {rotation/180*pi,rotaxis}; % no effect in dev48 but all fine in dev37
[B_res,~] = resfields(Sys,Exp)

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

Re: Exp.SampleRotation issue in recent dev version?

Post by Stefan Stoll »

This is indeed a bug - thanks for reporting!

It is fixed now in v6.0.0-dev.49.

Post Reply