plasmapy.formulary.lengths.gyroradius(B: ~astropy.units.quantity.Quantity, particle: str | int | ~numpy.integer | ~plasmapy.particles.particle_class.Particle | ~plasmapy.particles.particle_class.CustomParticle | ~astropy.units.quantity.Quantity, *, Vperp: ~astropy.units.quantity.Quantity = <Quantity nan m / s>, T: ~astropy.units.quantity.Quantity = None, lorentzfactor=nan, relativistic: bool = True, mass_numb: int | None = None, Z: float | None = None) Quantity[source]

Calculate the radius of circular motion for a charged particle in a uniform magnetic field (including relativistic effects by default).

Aliases: rc_, rhoc_

  • B (Quantity) – The magnetic field magnitude in units convertible to tesla.

  • particle (particle-like) – Representation of the particle species (e.g., "p+" for protons, "D+" for a deuteron, or "He-4 1+" for singly ionized helium-4).

  • Vperp (Quantity, keyword-only, optional) – The component of particle velocity that is perpendicular to the magnetic field in units convertible to meters per second.

  • T (Quantity, keyword-only, optional) – The particle temperature in units convertible to kelvin or electron-volts. If provided, the perpendicular velocity gets set to the most probable non-relativistic thermal velocity for that particle at this temperature. Cannot be provided if Vperp is provided.

  • lorentzfactor (float or ndarray, keyword-only, optional) – The Lorentz factor of the particle corresponding to the direction perpendicular to the magnetic field. Cannot be provided if Vperp or T is provided.

  • relativistic (bool, keyword-only, default: True) – If True, the relativistic formula for gyroradius will be used. If False, the non-relativistic formula will be used.

  • mass_numb (integer, keyword-only, optional) – The mass number, if not provided in particle.

  • Z (real number, keyword-only, optional) – The charge number, if not provided in particle.


r_L – The particle gyroradius in units of meters. This Quantity will be based on either the perpendicular component of particle velocity as inputted, or the most probable speed for a particle within a Maxwellian distribution for the particle temperature.

Return type:



UnitsWarning – Issued if any of B, Vperp, or T do not have units, in which case SI units will be assumed.


The Lorentz factor can be inferred from Vperp or T but near the speed of light, this can lead to rounding errors. For very high values of the Lo


The relativistic gyroradius for a particle of species \(s\) is given by

\[r_{L,s} = \frac{γ m_s V_{⟂,s}}{ |q_s| B}\]

where \(V_⟂\) is the component of particle velocity that is perpendicular to the magnetic field, \(m_s\) is the particle mass, \(q_s\) is the particle charge, \(B\) is the magnetic field magnitude, and \(γ\) is the Lorentz factor.

In the non-relativistic limit, the gyroradius reduces to

\[r_{Ls} = \frac{V_{⟂,s}}{ω_{c,s}}\]

where \(ω_{c,s}\) is the particle gyrofrequency. To turn off relativistic effects, set the relativistic keyword to False.

The gyroradius is sometimes called the Larmor radius, cyclotron radius, or radius of gyration.


>>> import astropy.units as u
>>> from plasmapy.formulary import gyroradius
>>> from astropy.constants import c

Let’s estimate the proton gyroradius in the solar corona.

>>> gyroradius(B=0.2 * u.T, particle="p+", T=1e6 * u.K)
<Quantity 0.0067... m>

Let’s estimate the gyroradius of a deuteron and a triton in ITER by providing the characteristic thermal energy per particle, \(k_B T\), to T.

>>> gyroradius(B=5 * u.T, particle=["D+", "T+"], T=13 * u.keV)
<Quantity [0.00465..., 0.00570...] m>

Relativistic effects are included by default, but can be turned off using the relativistic parameter. Let’s use this in the calculation of the gyroradius of a cosmic ray in the interstellar medium (ISM). We will provide the magnetic field in units of microgauss (μG).

>>> gyroradius(B=10 * u.uG, particle="p+", Vperp=0.99 * c)
<Quantity 2.19642688e+10 m>
>>> gyroradius(B=10 * u.uG, particle="p+", Vperp=0.99 * c, relativistic=False)
<Quantity 3.09844141e+09 m>

Let’s calculate the gyroradius of a much higher energy cosmic ray in the ISM using lorentzfactor.

>>> gyroradius(B=10 * u.uG, particle="p+", lorentzfactor=3e6).to("pc")
<Quantity 0.30428378 pc>