PlasmaPy
PlasmaPy copied to clipboard
Make `particle` a required keyword to `ParticleTracker.load_particles`?
Feature description
Right now this method assumes that the particles being added are protons, but I wonder if that's really a good default? Maybe that keyword should be required, just to be explicit?
@particle_input
def load_particles(
self,
x,
v,
particle: Particle = Particle("p+"),
Motivation
Avoid anyone accidentally creating particles with the wrong mass/charge
Implementation strategy
No response
Additional context
No response
I'm in favor of this! Having implicit particle defaults makes silent errors more likely.
Related to: #453.
Ok sounds good, should I implement this in #2712 ? Or should this get its own PR
Ok sounds good, should I implement this in #2712 ? Or should this get its own PR
Maybe make it it's own, small PR, since it is a potential breaking change to the interface.