diff --git a/atomic_physics/common.py b/atomic_physics/common.py index fd7c339..5c4e54b 100644 --- a/atomic_physics/common.py +++ b/atomic_physics/common.py @@ -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 @@ -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 diff --git a/atomic_physics/tests/test_rates.py b/atomic_physics/tests/test_rates.py index 930ee11..36fe1dd 100644 --- a/atomic_physics/tests/test_rates.py +++ b/atomic_physics/tests/test_rates.py @@ -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)] diff --git a/atomic_physics/utils.py b/atomic_physics/utils.py index 1e45475..f2681c1 100644 --- a/atomic_physics/utils.py +++ b/atomic_physics/utils.py @@ -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