Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ana Sotirova authored and hartytp committed Mar 22, 2023
1 parent 8c505f8 commit 0c81f6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions atomic_physics/common.py
Expand Up @@ -268,7 +268,7 @@ def I0(self, transition: Transition):
trans = self.transitions[transition]
omega = trans.freq
Gamma = self.GammaJ[self.levels[trans.upper]._start_ind]
return consts.hbar * (omega ** 3) * Gamma / (6 * np.pi * (consts.c ** 2))
return consts.hbar * (omega**3) * Gamma / (6 * np.pi * (consts.c**2))

def P0(self, transition: Transition, w0: float):
"""Returns the power needed at the focus of a Guassian beam with waist
Expand All @@ -279,7 +279,7 @@ def P0(self, transition: Transition, w0: float):
:return: beam power (W)
"""
I0 = self.I0(transition)
return 0.5 * np.pi * (w0 ** 2) * I0
return 0.5 * np.pi * (w0**2) * I0

def _sort_levels(self):
"""Use the transition data to sort the atomic levels in order of
Expand Down
2 changes: 1 addition & 1 deletion atomic_physics/tests/test_rates.py
Expand Up @@ -78,7 +78,7 @@ def test_steady_state_detuning(self):
# detuning scan relative to linewidth
norm_detuning = [-1e4, 2.3e1, 2, -4, 0.5, 0]
for det in norm_detuning:
I_eff = 1 / (4 * det ** 2 + 1)
I_eff = 1 / (4 * det**2 + 1)
Np_ss = _steady_state_population(I_eff)

Lasers = [ap.Laser("393", q=+1, I=1.0, delta=delta + line_width * det)]
Expand Down
2 changes: 1 addition & 1 deletion atomic_physics/utils.py
Expand Up @@ -117,5 +117,5 @@ def ac_zeeman_shift(atom: ap.Atom, state: int, f_RF: float):
for _state in np.argwhere(M[state] == Mpr):
freq = E[_state] - E[state]
w = rabi[state, _state][0]
acz[q + 1] += 0.5 * w ** 2 * (freq / (freq ** 2 - (f_RF) ** 2))
acz[q + 1] += 0.5 * w**2 * (freq / (freq**2 - (f_RF) ** 2))
return acz

0 comments on commit 0c81f6c

Please sign in to comment.