Skip to content

Commit 0ece3a8

Browse files
committed
remove magic number from pulse init time shift
1 parent 528ebaf commit 0ece3a8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/python/picongpu/picmi/gaussian_laser.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ def get_as_pypicongpu(self) -> laser.GaussianLaser:
150150
pypicongpu_laser.phase = self.picongpu_phase
151151
pypicongpu_laser.E0 = self.E0
152152

153-
pypicongpu_laser.pulse_init = max(
154-
-2 * self.centroid_position[1] / (self.propagation_direction[1] * constants.c) / self.duration,
155-
15,
156-
)
157-
# unit: duration
153+
pypicongpu_laser.pulse_init = (-2.0 * self.centroid_position[1]
154+
/ (self.propagation_direction[1] * constants.c)
155+
/ self.duration) # unit: multiple of laser pulse duration
156+
# @todo extend this to other propagation directions than +y
158157

159158
pypicongpu_laser.polarization_type = self.picongpu_polarization_type
160159
pypicongpu_laser.polarization_direction = self.polarization_direction

0 commit comments

Comments
 (0)