Page 1 of 1

Exp.SampleRotation issue in recent dev version?

Posted: Wed Oct 19, 2022 6:31 am
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


Re: Exp.SampleRotation issue in recent dev version?

Posted: Fri Oct 21, 2022 11:40 pm
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?


Re: Exp.SampleRotation issue in recent dev version?

Posted: Mon Oct 31, 2022 11:37 am
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.


Re: Exp.SampleRotation issue in recent dev version?

Posted: Thu Nov 03, 2022 10:27 am
by Stefan Stoll

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


Re: Exp.SampleRotation issue in recent dev version?

Posted: Sat Nov 05, 2022 3:56 am
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)


Re: Exp.SampleRotation issue in recent dev version?

Posted: Wed Nov 09, 2022 11:32 am
by Stefan Stoll

This is indeed a bug - thanks for reporting!

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