Skip to content

Commit

Permalink
Closes #158
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasibalic committed May 19, 2024
1 parent 1b93c94 commit 59e61a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions arc/alkali_atom_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ def getBranchingRatio(self, jg, fg, mfg, je, fe, mfe, s=0.5):

# Rescale
return b * (2.0 * je + 1.0)

def getBranchingRatioFStoHFS(self, jg, fg, mfg, je, mje, s=0.5):
r"""
Branching ratio for decay from :math:`\vert j_e, m_{j_e} \rangle \rightarrow \vert j_g,f_g,m_{f_g} \rangle`
Expand All @@ -2643,11 +2643,14 @@ def getBranchingRatioFStoHFS(self, jg, fg, mfg, je, mje, s=0.5):

b = 0.0
for q in [-1, 0, 1]:
b += self.getSphericalMatrixElementHFStoFS(jg, fg, mfg, je, mje, -q) ** 2
b += (
self.getSphericalMatrixElementHFStoFS(jg, fg, mfg, je, mje, -q)
** 2
)

# rescale
return b * (2 * je + 1) / (2 * self.I + 1)

def getBranchingRatioHFStoFS(self, jg, mjg, je, fe, mfe, s=0.5):
r"""
Branching ratio for decay from :math:`\vert j_e,f_e,m_{f_e} \rangle \rightarrow \vert j_g,m_{j_g} \rangle`
Expand All @@ -2668,11 +2671,14 @@ def getBranchingRatioHFStoFS(self, jg, mjg, je, fe, mfe, s=0.5):

b = 0.0
for q in [-1, 0, 1]:
b += self.getSphericalMatrixElementHFStoFS(je, fe, mfe, jg, mjg, -q) ** 2
b += (
self.getSphericalMatrixElementHFStoFS(je, fe, mfe, jg, mjg, -q)
** 2
)

# rescale
return b * (2 * je + 1)

def getBranchingRatioFStoFS(self, jg, mjg, je, mje, s=0.5):
r"""
Branching ratio for decay from :math:`\vert j_e, m_{j_e} \rangle \rightarrow \vert j_g,m_{j_g} \rangle`
Expand Down
2 changes: 1 addition & 1 deletion arc/wigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def Wigner6j(j1, j2, j3, J1, J2, J3, verbose=False):
msg += "\n6j-Symbol is undefined when any triad has a non-integer sum"
if verbose:
print(msg)
return np.nan
return 0

# if possible, use precalculated values
global wignerPrecal
Expand Down

0 comments on commit 59e61a7

Please sign in to comment.