Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug: wrong values for certain symbols #7

Closed
ghost opened this issue Feb 9, 2023 · 2 comments · Fixed by #8
Closed

Possible bug: wrong values for certain symbols #7

ghost opened this issue Feb 9, 2023 · 2 comments · Fixed by #8

Comments

@ghost
Copy link

ghost commented Feb 9, 2023

Hi,

I was looking online for fast python implementations of the 3j symbols. My use of the 3j symbols comes from computations in spherical harmonics space, and as such, I'm computing the symbols for fixed m values (that depend on the spin of the spherical harmonics), and broad j values. Both m and j are integers in my cases.

As a test, I computed both in mathematica (quite slow compared to your given benchmark values) and with your package an array of w3j(j1 = 100, j2 = 300, J, m1 =2, m2 =-2, M =0) for integers J that cover all the angular momenta possible that is from 200 to 400.

I found that values of the symbols in your code can become very inaccurate, for example mathematica finds that

w3j_mathematica (J = 285) ~ 0.00198

while your code gives

w3j_wigners (J = 285) ~ 4374151.129938193

Would this be a bug that you would consider investigating ? I don't think I am using the code wrong since I find correct values for lots of other symbols.

Cheers,
Alexandre

@Luthaf
Copy link
Owner

Luthaf commented Feb 9, 2023

Hey! Thanks for opening an issue. In my line of work, I only need 3j symbols for j<20, and I only tested this package for values <100, so it is very likely that there could be an issue for larger j as you see here. I'll give it a look when I find time (I'm currently away for a couple of weeks)!

@Luthaf
Copy link
Owner

Luthaf commented Mar 28, 2023

This should be fixed in the latest 0.3.0 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant