In the rigid injection, the fields where scale by the fraction of time spent between n*dt and (n+1)*dt to the right of the injection plane. However, to be consistent with the leap-frog velocity update, this needs to be between (n-1/2)*dt and (n+1/2)*dt instead.
As a side-effect of this PR, saving and re-setting u and optical_depth to their original value is not needed anymore since the scaling factor for E and B is 0 for particles to the left of the plane.
In the rigid injection, the fields where scale by the fraction of time spent between
n*dt
and(n+1)*dt
to the right of the injection plane. However, to be consistent with the leap-frog velocity update, this needs to be between(n-1/2)*dt
and(n+1/2)*dt
instead.As a side-effect of this PR, saving and re-setting
u
andoptical_depth
to their original value is not needed anymore since the scaling factor for E and B is 0 for particles to the left of the plane.