Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 14, 2023
1 parent a3cae81 commit cf69c74
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions lasy/profiles/gaussian_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,20 @@ class GaussianProfile(CombinedLongitudinalTransverseProfile):
>>> plt.ylabel('r (µm)')
"""

def __init__(self, wavelength, pol, laser_energy, w0, a, b, tau, gdd, t_peak, cep_phase=0, z_foc=0):
def __init__(
self,
wavelength,
pol,
laser_energy,
w0,
a,
b,
tau,
gdd,
t_peak,
cep_phase=0,
z_foc=0,
):
super().__init__(wavelength, pol)
self.laser_energy = laser_energy
self.w0 = w0
Expand Down Expand Up @@ -147,10 +160,15 @@ def evaluate(self, x, y, t):
"""
transverse = np.exp(-(x**2 + y**2) / self.w0**2)

tau_eff = np.sqrt(self.tau**2 + (2 * self.b / self.w0) ** 2 + 2 * 1j * self.gdd)
tau_eff = np.sqrt(
self.tau**2 + (2 * self.b / self.w0) ** 2 + 2 * 1j * self.gdd
)

spacetime = np.exp(
-((t - self.t_peak - self.a * x + (2 * 1j * self.b * x / self.w0**2)) ** 2)
-(
(t - self.t_peak - self.a * x + (2 * 1j * self.b * x / self.w0**2))
** 2
)
/ tau_eff**2
)

Expand Down

0 comments on commit cf69c74

Please sign in to comment.