Skip to content

Commit

Permalink
admend the test files
Browse files Browse the repository at this point in the history
  • Loading branch information
huixingjian committed Dec 17, 2024
1 parent 2f1061e commit cc10702
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/test_gaussian_propagator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def check_gaussian_propagation(
laser, propagation_distance=100e-6, propagation_step=10e-6
):
# Do the propagation and check evolution of waist with theory
w0 = laser.profile.trans_profile.w0
w0 = laser.profile.w0
L_R = np.pi * w0**2 / laser.profile.lambda0

propagated_distance = 0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/test_laser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_laser_analysis_utils():
# Check that laser duration agrees with the given one.
tau_rms = get_duration(laser.grid, dim)
np.testing.assert_approx_equal(
2 * tau_rms, laser.profile.long_profile.tau, significant=3
2 * tau_rms, laser.profile.tau, significant=3
)


Expand Down
14 changes: 7 additions & 7 deletions tests/test_t2z2t.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def gaussian():


def get_laser_z_analytic(profile, z_axis, r_axis):
w0 = profile.trans_profile.w0
tau = profile.long_profile.tau
omega0 = profile.long_profile.omega0
w0 = profile.w0
tau = profile.tau
omega0 = profile.omega0
k0 = omega0 / c
lambda0 = 2 * np.pi / k0

Expand Down Expand Up @@ -68,8 +68,8 @@ def check_correctness(laser_t_in, laser_t_out, laser_z_analytic, z_axis):

def test_RT_case(gaussian):
dim = "rt"
w0 = gaussian.trans_profile.w0
tau = gaussian.long_profile.tau
w0 = gaussian.w0
tau = gaussian.tau
lo = (0, -3.5 * tau)
hi = (5 * w0, 3.5 * tau)
npoints = (128, 65)
Expand All @@ -91,8 +91,8 @@ def test_RT_case(gaussian):
def test_3D_case(gaussian):
# - 3D case
dim = "xyt"
w0 = gaussian.trans_profile.w0
tau = gaussian.long_profile.tau
w0 = gaussian.w0
tau = gaussian.tau
lo = (-5 * w0, -5 * w0, -3.5 * tau)
hi = (5 * w0, 5 * w0, 3.5 * tau)
npoints = (160, 164, 65)
Expand Down

0 comments on commit cc10702

Please sign in to comment.