Refactor class `Charge`
Add the following methods:
-
Charge.create_charges
: this is a static method that will be used to create a newDataFrame
. -
Charge.add_charge_dataframe
: this is a method that will be used to add a newDataFrame
.
Thus, the users will be able to add new charges in two different ways:
>>> from pyxel.data_structure import Charge
>>> charge = Charge()
>>> charge.add_charge(particle_type='e', particles_per_cluster=..., ...)
or
First create a `DataFrame`, then add it
>>> df = Charge.create_charges(particle_type='e', particles_per_cluster=..., ...)
>>> charge.add_charge_dataframe(new_charges=df)