nikolasibalic / ARC-Alkali-Rydberg-Calculator

Object-oriented Python library for computation of properties of highly-excited Rydbeg states of alkali and divalent atoms.
https://atomcalc.org
BSD 3-Clause "New" or "Revised" License
91 stars 81 forks source link

Bugfix/wigner6j integer sum #148

Closed petermao closed 1 year ago

petermao commented 1 year ago

Integer sum check in Wigner-6j code was not catching non-integer sums.

1b9eb26:

  1. fix logic
  2. add messaging to detail problematic inputs
  3. provide two options for error messages

5a5b1d8: add similar messaging to triangularity test b77b250: bypass errors by returning sensible values when tests fail (I acknowledge that the nan could be controversial)

nikolasibalic commented 1 year ago

Hi @petermao thank you for your efforts on this update!

Is there anything you want to add on this?

From my side, we should just remove unreachable code (that raises error now after return 0), and we can merge to main.