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

StarkMap define basis, coupling is inf #40

Closed
zzpwahaha opened this issue Mar 15, 2020 · 3 comments
Closed

StarkMap define basis, coupling is inf #40

zzpwahaha opened this issue Mar 15, 2020 · 3 comments
Labels

Comments

@zzpwahaha
Copy link

zzpwahaha commented Mar 15, 2020

for atom = Rubidium87()
the defineBasis method of StarkMap gives inf coupling between [51, 50, 49.5, 49.5] and [52, 51, 51.5, 49.5], also between [52, 50, 49.5, 49.5], [52, 51, 50.5, 49.5]
(n0, l0, j0, mj0) is (50, 49, 49.5, 49.5) and nmax=53, nmin=50, lmax=54.
The self.mat2 gives inf at [2,8] and [5,7] which correpsonds to state above.

Cannot find the definition of self.eFieldCouplingSaved.getAngular() function which is called in
self._eFieldCouplingDivE()

@zzpwahaha
Copy link
Author

zzpwahaha commented Mar 15, 2020

I am assuming the following declaration:
defineBasis(n0, l0, j0, mj0, nmin, nmax, lmax, progressOutput=False)

@nikolasibalic
Copy link
Owner

nikolasibalic commented Mar 15, 2020

Hi @zzpwahaha
I tested the following code:

from arc import *
atom = Rubidium87()
calc = StarkMap(atom)
calc.defineBasis(50, 49, 49.5, 49.5, 50, 53, 54, progressOutput=True, debugOutput=True)

and I get as output:

Found  9  states.
[[50, 49, 49.5, 49.5], [51, 49, 49.5, 49.5], [51, 50, 49.5, 49.5], [51, 50, 50.5, 49.5], [52, 49, 49.5, 49.5], [52, 50, 49.5, 49.5], [52, 50, 50.5, 49.5], [52, 51, 50.5, 49.5], [52, 51, 51.5, 49.5]]
Index of initial state
0
Initial state = 
[50, 49, 49.5, 49.5]
Generating matrix...
100%

[[-1.31592848e+03  0.00000000e+00 -3.19806083e-04  3.19806084e-03
   0.00000000e+00  3.16562978e-05 -3.16562977e-04  0.00000000e+00
   0.00000000e+00]
 [ 0.00000000e+00 -1.26482937e+03 -9.70974630e-05  9.70974536e-04
   0.00000000e+00 -3.26254355e-04  3.26254356e-03  0.00000000e+00
   0.00000000e+00]
 [-3.19806083e-04 -9.70974630e-05 -1.26482937e+03  0.00000000e+00
  -2.53682680e-06  0.00000000e+00  0.00000000e+00  3.32662029e-03
   0.00000000e+00]
 [ 3.19806084e-03  9.70974536e-04  0.00000000e+00 -1.26482937e+03
   2.53683375e-05  0.00000000e+00  0.00000000e+00 -3.19743113e-04
   4.63192952e-03]
 [ 0.00000000e+00  0.00000000e+00 -2.53682680e-06  2.53683375e-05
  -1.21664985e+03 -1.40910987e-04  1.40910980e-03  0.00000000e+00
   0.00000000e+00]
 [ 3.16562978e-05 -3.26254355e-04  0.00000000e+00  0.00000000e+00
  -1.40910987e-04 -1.21664985e+03  0.00000000e+00  9.99669035e-04
   0.00000000e+00]
 [-3.16562977e-04  3.26254356e-03  0.00000000e+00  0.00000000e+00
   1.40910980e-03  0.00000000e+00 -1.21664985e+03 -9.60846938e-05
   1.39203722e-03]
 [ 0.00000000e+00  0.00000000e+00  3.32662029e-03 -3.19743113e-04
   0.00000000e+00  9.99669035e-04 -9.60846938e-05 -1.21664985e+03
   0.00000000e+00]
 [ 0.00000000e+00  0.00000000e+00  0.00000000e+00  4.63192952e-03
   0.00000000e+00  0.00000000e+00  1.39203722e-03  0.00000000e+00
  -1.21664985e+03]]
[ 0.00000000e+00  0.00000000e+00 -3.19806083e-04  3.19806084e-03
  0.00000000e+00  3.16562978e-05 -3.16562977e-04  0.00000000e+00
  0.00000000e+00]

which I think is fine.

If you get infinity somewhere instead in above output, I think that might have to do with the earlier bug you reported (#39 ). What happened is probably the following: you tried to calculate this StarkMap with the old code before. Old code produce bad result for that Wigner3j result, but it saved intermediate results in hidden folder in ~/.arc-data and now the new code is using that bad result producing infinity.

To solve this please delete hidden folder .arc-data from your home directory. This will remove intermediate cache that you generated before. And then run code again. It should be fine now.

Let me know if this solves this problem.

Regarding definition of getAnglar() it is method of _EFieldCoupling in alkali_atom_functions.py

@zzpwahaha
Copy link
Author

Great!
That solves the problem. Many thanks

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

No branches or pull requests

2 participants