@@ -141,7 +141,6 @@ def get_as_pypicongpu(self) -> laser.GaussianLaser:
141141 # at simulation box boundary
142142 # @todo extend this to other propagation directions than +y
143143
144-
145144 # check polarization vector normalization
146145
147146 assert self .testRelativeError (
@@ -170,14 +169,16 @@ def get_as_pypicongpu(self) -> laser.GaussianLaser:
170169 pypicongpu_laser .phase = self .picongpu_phase
171170 pypicongpu_laser .E0 = self .E0
172171
173- pypicongpu_laser .pulse_init = (- 2.0 * self . centroid_position [ 1 ]
174- / (self .propagation_direction [1 ] * constants .c )
175- / self . duration ) # unit: multiple of laser pulse duration
172+ pypicongpu_laser .pulse_init = (
173+ - 2.0 * self . centroid_position [ 1 ] / (self .propagation_direction [1 ] * constants .c ) / self . duration
174+ ) # unit: multiple of laser pulse duration
176175 # @todo extend this to other propagation directions than +y
177- if pypicongpu_laser .pulse_init < 3. :
178- logging .warning ("set centroid_position and propagation_direction indicate that laser "
179- + "initalization might be too short.\n "
180- + f"Details: laser.pulse_init = { pypicongpu_laser .pulse_init } < 3" )
176+ if pypicongpu_laser .pulse_init < 3.0 :
177+ logging .warning (
178+ "set centroid_position and propagation_direction indicate that laser "
179+ + "initalization might be too short.\n "
180+ + f"Details: laser.pulse_init = { pypicongpu_laser .pulse_init } < 3"
181+ )
181182
182183 pypicongpu_laser .polarization_type = self .picongpu_polarization_type
183184 pypicongpu_laser .polarization_direction = self .polarization_direction
0 commit comments