-
Notifications
You must be signed in to change notification settings - Fork 306
/
__init__.py
92 lines (78 loc) · 2.48 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"""
The `plasmapy.particles` subpackage provides access to information about
atoms, isotopes, ions, and other particles.
"""
# __all__ will be auto populated below
__all__ = []
import inspect
from plasmapy.particles.atomic import (
atomic_number,
charge_number,
common_isotopes,
electric_charge,
half_life,
ionic_levels,
is_stable,
isotopic_abundance,
known_isotopes,
mass_number,
particle_mass,
reduced_mass,
stable_isotopes,
standard_atomic_weight,
)
from plasmapy.particles.decorators import particle_input
from plasmapy.particles.ionization_state import IonicLevel, IonizationState
from plasmapy.particles.ionization_state_collection import IonizationStateCollection
from plasmapy.particles.nuclear import nuclear_binding_energy, nuclear_reaction_energy
from plasmapy.particles.particle_class import (
AbstractParticle,
AbstractPhysicalParticle,
CustomParticle,
DimensionlessParticle,
molecule,
Particle,
ParticleLike,
)
from plasmapy.particles.particle_collections import ParticleList, ParticleListLike
from plasmapy.particles.serialization import (
json_load_particle,
json_loads_particle,
ParticleJSONDecoder,
)
from plasmapy.particles.symbols import (
atomic_symbol,
element_name,
ionic_symbol,
isotope_symbol,
particle_symbol,
)
proton = Particle("p+")
"""A |Particle| instance representing a proton."""
electron = Particle("e-")
"""A |Particle| instance representing an electron."""
neutron = Particle("n")
"""A |Particle| instance representing a neutron."""
positron = Particle("e+")
"""A |Particle| instance representing a positron."""
deuteron = Particle("D 1+")
"""A |Particle| instance representing a positively charged deuterium ion."""
triton = Particle("T 1+")
"""A |Particle| instance representing a positively charged tritium ion."""
alpha = Particle("He-4 2+")
"""
A |Particle| instance representing an alpha particle (doubly charged
helium-4).
"""
# auto populate __all__
for name, obj in list(globals().items()):
if inspect.ismodule(obj) or name.startswith("__") or name.endswith("__"):
continue
# Using append here may not be supported by all type checkers, but
# switching to += led to a documentation build error. Because of the
# relative stability of plasmapy.particles, we may wish to stop
# auto-populating __all__ and instead start explicitly listing its
# contents.
__all__.append(name) # noqa: PYI056
__all__.sort()
del inspect, name, obj