@@ -130,7 +130,6 @@ def get_as_pypicongpu(self) -> laser.GaussianLaser:
130130 # at simulation box boundary
131131 # @todo extend this to other propagation directions than +y
132132
133-
134133 # check polarization vector normalization
135134
136135 assert self .testRelativeError (
@@ -151,14 +150,16 @@ def get_as_pypicongpu(self) -> laser.GaussianLaser:
151150 pypicongpu_laser .phase = self .picongpu_phase
152151 pypicongpu_laser .E0 = self .E0
153152
154- pypicongpu_laser .pulse_init = (- 2.0 * self . centroid_position [ 1 ]
155- / (self .propagation_direction [1 ] * constants .c )
156- / self . duration ) # unit: multiple of laser pulse duration
153+ pypicongpu_laser .pulse_init = (
154+ - 2.0 * self . centroid_position [ 1 ] / (self .propagation_direction [1 ] * constants .c ) / self . duration
155+ ) # unit: multiple of laser pulse duration
157156 # @todo extend this to other propagation directions than +y
158- if pypicongpu_laser .pulse_init < 3. :
159- logging .warning ("set centroid_position and propagation_direction indicate that laser "
160- + "initalization might be too short.\n "
161- + f"Details: laser.pulse_init = { pypicongpu_laser .pulse_init } < 3" )
157+ if pypicongpu_laser .pulse_init < 3.0 :
158+ logging .warning (
159+ "set centroid_position and propagation_direction indicate that laser "
160+ + "initalization might be too short.\n "
161+ + f"Details: laser.pulse_init = { pypicongpu_laser .pulse_init } < 3"
162+ )
162163
163164 pypicongpu_laser .polarization_type = self .picongpu_polarization_type
164165 pypicongpu_laser .polarization_direction = self .polarization_direction
0 commit comments