# RelativisticBody

class plasmapy.formulary.relativity.RelativisticBody(particle: str | ~numbers.Integral | ~plasmapy.particles.particle_class.Particle | ~plasmapy.particles.particle_class.CustomParticle | ~astropy.units.quantity.Quantity, V: Unit("m / s") = None, momentum: Unit("kg m / s") = None, *, total_energy: Unit("J") = None, kinetic_energy: Unit("J") = None, v_over_c: ~numbers.Real | None = None, lorentz_factor: ~numbers.Real | None = None, Z: ~numbers.Integral | None = None, mass_numb: ~numbers.Integral | None = None, dtype: ~numpy.dtype[~typing.Any] | None | ~typing.Type[~typing.Any] | ~numpy._typing._dtype_like._SupportsDType[~numpy.dtype[~typing.Any]] | str | ~typing.Tuple[~typing.Any, int] | ~typing.Tuple[~typing.Any, ~typing.SupportsIndex | ~typing.Sequence[~typing.SupportsIndex]] | ~typing.List[~typing.Any] | ~numpy._typing._dtype_like._DTypeDict | ~typing.Tuple[~typing.Any, ~typing.Any] = <class 'numpy.float128'>)

Bases: object

A physical body that is moving at a velocity relative to the speed of light.

Parameters:

Notes

At most one of V, momentum, total_energy, kinetic_energy, v_over_c, and lorentz_factor must be provided.

Caution

For ultra-high-energy cosmic rays (UHECRs), the velocity may be within roundoff error of $$c$$ and $$\frac{V}{c}$$ may be within roundoff error of 1.

Examples

>>> import astropy.units as u
>>> relativistic_proton = RelativisticBody("p+", total_energy = 1 * u.GeV)
>>> relativistic_proton.particle
Particle("p+")
>>> relativistic_proton.velocity
<Quantity 1.03697...e+08 m / s>
>>> relativistic_proton.v_over_c
0.3458980898746...
>>> relativistic_proton.lorentz_factor
1.0657889247888...
>>> relativistic_proton.mass_energy.to("GeV")
<Quantity 0.93827... GeV>
>>> relativistic_proton.total_energy.to("GeV")
<Quantity 1. GeV>
>>> relativistic_proton.mass
<Quantity 1.67262...e-27 kg>


RelativisticBody also works with multiple particles and/or velocities.

>>> particles = ["p+", "e-"]
>>> velocities = [2e5, 2e8] * u.m / u.s
>>> relativistic_particles = RelativisticBody(particles, velocities)
>>> relativistic_particles.momentum
<Quantity [3.345244...e-22, 2.445659...e-22] kg m / s>


Attributes Summary

 kinetic_energy The kinetic energy of the body, lorentz_factor The Lorentz factor of the body, mass The rest mass of the body, $$m_0$$. mass_energy The rest mass energy of the body, $$m_0 c^2$$. momentum The magnitude of the momentum of the body, particle Representation of the particle(s). total_energy The sum of the rest mass energy and the kinetic energy of the body, v_over_c The velocity of the body divided by the velocity of light: $$\frac{V}{c}$$. velocity The velocity of the body, $$V$$.

Attributes Documentation

kinetic_energy

The kinetic energy of the body,

$E_K ≡ m_0 c^2 (γ-1).$
Return type:

Quantity

lorentz_factor

The Lorentz factor of the body,

$γ ≡ \frac{1}{\sqrt{1 - \frac{V^2}{c^2}}}.$
Return type:

float

mass

The rest mass of the body, $$m_0$$.

Return type:

Quantity

mass_energy

The rest mass energy of the body, $$m_0 c^2$$.

Return type:

Quantity

momentum

The magnitude of the momentum of the body,

$p ≡ γ m_0 V.$
Return type:

Quantity

particle

Representation of the particle(s).

Return type:
total_energy

The sum of the rest mass energy and the kinetic energy of the body,

$E_\mathrm{tot} ≡ γ m_0 c^2.$
Return type:

Quantity

v_over_c

The velocity of the body divided by the velocity of light: $$\frac{V}{c}$$.

Return type:

float

velocity

The velocity of the body, $$V$$.

Return type:

Quantity