Skip to content

Commit

Permalink
fixed error that set field equal to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-j committed Dec 19, 2024
1 parent acca4f6 commit d8b5baa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lasy/utils/laser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def normalize_peak_intensity(peak_intensity, grid):
if input_peak_intensity == 0.0:
print("Field is zero everywhere, normalization will be skipped")
else:
grid.set_temporal_field(np.sqrt(peak_intensity / input_peak_intensity))
field *= np.sqrt(peak_intensity / input_peak_intensity))
grid.set_temporal_field(field)


def get_full_field(laser, theta=0, slice=0, slice_axis="x", Nt=None):
Expand Down

0 comments on commit d8b5baa

Please sign in to comment.