Page 1 of 1

Error in nucfrq2d (HYSCORE blindspots)

Posted: Tue Jul 20, 2021 3:37 pm
by danielmartins

Hi,

I am trying to calculate blindspots region in HYSCORE using nucfrq2d but I believe there is a typo in the code.
I am using in EasySpin 6.0.0-dev.33 (2021-06-18) and Matlab R2020b and whenever I try to run:

Code: Select all

Sys = struct('S',1/2,'g',[2 2 2],'Nucs','1H','A',[-1 -1 2]*4+2);
B0 = 350; % in mT
Larmor = larmorfrq(Sys.Nucs,B0)/1e3; % in GHz
tauvec = [1 0.5]./Larmor; % in ns
nucfrq2d(Sys,B0,tauvec) 

I get this:

Reference to non-existent field 'closePhi'.

Error in nucfrq2d

Error in untitled4 (line 5)
nucfrq2d(Sys,B0,tauvec)

So I went to GitHub, downloaded the code and changed the line:

Code: Select all

closedPhi = grid.closePhi;

to

Code: Select all

closedPhi = grid.closedPhi;

and it seems to work.

Best regards,
Daniel Martins


Re: Error in nucfrq2d (HYSCORE blindspots)

Posted: Tue Jul 20, 2021 4:57 pm
by Stefan Stoll

This is indeed a bug, thanks for reporting! It's now fixed on GitHub and will be in the next 6.0.0-dev prerelease.

Small note regarding your code snipped: tauvec needs to be in µs, not in ns.


Re: Error in nucfrq2d (HYSCORE blindspots)

Posted: Wed Jul 21, 2021 3:01 am
by danielmartins

Thanks a ton, Stefan.

The piece of code I posted is from the documentation on nucfrq2d.

Best regards,
Daniel


Re: Error in nucfrq2d (HYSCORE blindspots)

Posted: Wed Jul 21, 2021 3:28 pm
by Stefan Stoll

Thanks, we'll update the documentation as well.