Skip to content

Commit 940a908

Browse files
committed
remove magic number from pulse init time shift
1 parent 8b5e565 commit 940a908

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
@@ -169,11 +169,10 @@ def get_as_pypicongpu(self) -> laser.GaussianLaser:
169169
pypicongpu_laser.phase = self.picongpu_phase
170170
pypicongpu_laser.E0 = self.E0
171171

172-
pypicongpu_laser.pulse_init = max(
173-
-2 * self.centroid_position[1] / (self.propagation_direction[1] * constants.c) / self.duration,
174-
15,
175-
)
176-
# unit: duration
172+
pypicongpu_laser.pulse_init = (-2.0 * self.centroid_position[1]
173+
/ (self.propagation_direction[1] * constants.c)
174+
/ self.duration) # unit: multiple of laser pulse duration
175+
# @todo extend this to other propagation directions than +y
177176

178177
pypicongpu_laser.polarization_type = self.picongpu_polarization_type
179178
pypicongpu_laser.polarization_direction = self.polarization_direction

0 commit comments

Comments
 (0)