Skip to content

Commit

Permalink
Fix normalize intensity (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-j authored Dec 19, 2024
1 parent acca4f6 commit a26c7c5
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 a26c7c5

Please sign in to comment.