Closed pbanner closed 4 years ago
Hi @pbanner
Thank you for issue submission. I have run
from arc import *
print(wigner.Wigner6j(0.5,0.5,1,2,1,1.5))
and have got
0.28867513459481287
I get same when I run wigner.Wigner6j(1/2,1/2,1,2,1,3/2)
(note that this is same only on Python 3.*, in Python 2 division is assumed to be integer and this would render to wigner.Wigner6j(0,0,1,2,1,1)
throwing error that symbol is not triangular).
Line 215 should not be the problem since there is a condition before in line 211
abs(roundPy2(j1)-j1) < 0.1
that should evaluate to False for your test case, forcing module not to use pre calculated look-up table. So I am bit confused why you see the error.
@pbanner could you please let me know which Python you are using, on which OS, and share complete error trace that Python returns? Also could you please confirm that you are running latest ARC.
Hi, Nikola,
Thanks for looking into this. I just upgraded ARC, and it now works fine. For some reason I didn't think to do that. I'll tell my lab mates to do the same; a couple of them tried the calculation and got the same error message.
Thanks again, -Patrick
On Mon, Mar 30, 2020 at 5:41 PM Nikola Šibalić notifications@github.com wrote:
Hi @pbanner https://github.com/pbanner
Thank you for issue submission. I have run
from arc import *print(wigner.Wigner6j(0.5,0.5,1,2,1,1.5))
and have got
0.28867513459481287
I get same when I run wigner.Wigner6j(1/2,1/2,1,2,1,3/2) (note that this is same only on Python 3.*, in Python 2 division is assumed to be integer and this would render to wigner.Wigner6j(0,0,1,2,1,1) throwing error that symbol is not triangular).
Line 215 should not be the problem since for your test case there is a condition before in line 211
abs(roundPy2(j1)-j1) < 0.1)
that should evaluate to false, forcing module not to used precalculated look-up table. So I am bit confused why you see the error.
@pbanner https://github.com/pbanner could you please let me know which Python you are using, on which OS, and share complete error trace that Python returns? Also could you please confirm that you are running latest ARC.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nikolasibalic/ARC-Alkali-Rydberg-Calculator/issues/42#issuecomment-606266618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMYQ6SDVHEVFY7M46QW6Z5TRKEGYZANCNFSM4LW45UUQ .
Hi Patrick,
Great, thank you! And don't hesitate to submit issue if you encounter any problems of even if you have question. With complicated programs like this, input from users is irreplaceable for tracking down all edge cases.
Best wishes, Nikola
The calculation of 6-J symbols in the wigner module includes a look-up table that appears to make assumptions that certain inputs are integers, though they need not be. Thus many symbols, such as wigner.Wigner6j(1/2,1/2,1,2,1,3/2), will throw errors as those inputs are not integers. Specifically, line 215,
throws the error.