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 12, 2023
1 parent 442e10b commit ae588fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lasy/utils/laser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,7 @@ def export_to_z(dim, grid, omega0, z_axis=None, z0=0.0, t0=0.0, backend="NP"):
verbose=False,
)
# Convert the spectral image to the spatial field representation
FieldAxprp.import_field(
np.moveaxis(grid.field, -1, 0).copy()
)
FieldAxprp.import_field(np.moveaxis(grid.field, -1, 0).copy())
field_z = prop.t2z(FieldAxprp.Field_ft, z_axis, z0=z0, t0=t0)
field_z = np.moveaxis(field_z, 0, -1)
field_z *= np.exp(-1j * (z_axis / c + t0) * omega0)
Expand Down Expand Up @@ -855,7 +853,5 @@ def import_from_z(dim, grid, omega0, field_z, z_axis, z0=0.0, t0=0.0, backend="N
# Convert the spectral image to the spatial field representation
transform_data = np.moveaxis(field_fft, -1, 0).copy()
transform_data *= np.exp(-1j * z_axis[0] * (k_z[:, None, None] - omega0 / c))
grid.field = np.moveaxis(
prop.z2t(transform_data, t_axis, z0=z0, t0=t0), 0, -1
)
grid.field = np.moveaxis(prop.z2t(transform_data, t_axis, z0=z0, t0=t0), 0, -1)
grid.field *= np.exp(1j * (z0 / c + t_axis) * omega0)

0 comments on commit ae588fb

Please sign in to comment.