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
86 stars 72 forks source link

Float vs. Int for Bz in StarkMap.defineBasis #117

Closed drewrotunno closed 1 year ago

drewrotunno commented 1 year ago

I get an error when I use a value of Bz that is not an integer in the StarkMap.definebasis arguments. I think just changing the function declaration to Bz=0.0 might fix this, as the error appears to be when this function passes to the hyperfine energy level function.

dihm commented 1 year ago

I've tried reproducing this using the first example from the intro notebook , but with Bz specified in defineBasis and I do not have any issues. I'm running current 3.2.0 ARC.

Could you provide a little more detail about your situation? A traceback of the error would be helpful. No function that uses Bz should care what the numerical type is. Is there a chance you've miscounted the number of arguments and you are accidentally setting maxL to a float (which will definitely give errors).

nikolasibalic commented 1 year ago

Hi @drewrotunno , could you please provide minimal code example that reproduces the error you observe, together with error trace?

nikolasibalic commented 1 year ago

Closing this issue due to inactivity. Please reopen if issue persists.

drewrotunno commented 1 year ago

Howdy, I think that dihm nailed this, I likely just mixed my arguments. I couldn't find the script which produced this error, so I can't confirm, but will happily accept that it was user error! Thanks all for the great package, I use it often!