Closed cr-xu closed 9 months ago
I would propose giving a better name to q_array
... something more like particle_charges
.
Also, can you add the feature to the changelog?
Otherwise, this looks good to me.
Another thing that I'm just realising: Are the new charge properties properly tracked through all the elements?
ParameterBeam
now has atotal_charge
attributeParticleBeam
has nowq_array
which contains the charge of each particle in theparticles
. Thetotal_charge
is derived assum(q_array)
The charge is tracked through the elements along with the beam. For now, the only element that affects the beam charge is the
Aperture
which removes the particle charges with large position offsets.