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 Jan 15, 2024
1 parent 15cc158 commit 9663291
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_laser_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def gaussian():

return profile


def test_profile_gaussian_spatial_chirp(spatial_chirp):
# - 3D Cartesian case
dim = "xyt"
Expand All @@ -59,6 +60,7 @@ def test_profile_gaussian_spatial_chirp(spatial_chirp):
laser.propagate(1e-6)
laser.write_to_file("gaussianlaserSC")


def test_profile_gaussian_angular_dispersion(angular_dispersion):
# - 3D Cartesian case
dim = "xyt"
Expand All @@ -71,6 +73,7 @@ def test_profile_gaussian_angular_dispersion(angular_dispersion):
laser.propagate(1e-6)
laser.write_to_file("gaussianlaserAD")


def test_transverse_profiles_rt():
npoints = 4000
w0 = 10.0e-6
Expand Down Expand Up @@ -182,6 +185,7 @@ def test_profile_gaussian_cylindrical(gaussian):
laser.propagate(1e-6)
laser.write_to_file("gaussianlaserRZ")


def spatial_chirp():
# Cases with Gaussian laser having non-zero spatial chirp (b)
wavelength = 0.8e-6
Expand All @@ -191,13 +195,14 @@ def spatial_chirp():
tau = 30.0e-15 # s
w0 = 5.0e-6 # m
a = 0.0
b = w0*tau/2 # m.s
b = w0 * tau / 2 # m.s
profile = GaussianProfile(
wavelength, pol, laser_energy, w0, tau, t_peak, a, b, gdd=0.0
)

return profile


def angular_dispersion():
# Cases with Gaussian laser having non-zero angular dispersion (a)
wavelength = 0.8e-6
Expand All @@ -206,14 +211,15 @@ def angular_dispersion():
t_peak = 0.0e-15 # s
tau = 30.0e-15 # s
w0 = 5.0e-6 # m
a = tau/w0 # s/m
a = tau / w0 # s/m
b = 0.0
profile = GaussianProfile(
wavelength, pol, laser_energy, w0, tau, t_peak, a, b, gdd=0.0
)

return profile


def test_from_array_profile():
# Create a 3D numpy array, use it to create a LASY profile,
# and check that the resulting profile has the correct width
Expand Down

0 comments on commit 9663291

Please sign in to comment.