plasmapoint¶
The plasmapoint module provides a class for representing a quasineutral plasma at a specific point in space. It calculates key plasma parameters like plasma frequency and gyrofrequency based on particle composition and either the plasma-to-gyro ratio for electrons or number densities for each species.
- class piran.plasmapoint.PlasmaPoint(
- magpoint: MagPoint,
- particles: ParticleList | Sequence[str | int | integer | Particle | CustomParticle | Quantity],
- plasma_over_gyro_ratio: float | None = None,
- number_density: Annotated[Quantity, Unit('1 / m3')] | None = None,
Represents a quasineutral plasma at a specific point in space.
This class calculates plasma parameters, including plasma frequency and gyrofrequency, based on the particle composition and provided input. It supports two main use cases:
Electron-proton plasmas, where the plasma-to-gyro ratio for electrons is provided.
Plasmas with an arbitrary number of species, where the number density for each species is provided.
- Parameters:
- magpointMagPoint
The magnetic field at a given point in space.
- particlesParticleListLike
A list-like collection of plasmapy particle-like objects.
- plasma_over_gyro_ratiofloat | None, default=None
The ratio of plasma frequency to gyrofrequency for electrons. Supported if the plasma consists of electrons and protons only.
- number_densityastropy.units.Quantity[1 / u.m**3] | None, default=None
A list or array of number densities for each particle species (in m^-3). Required if the plasma contains more than two species or if it does not contain exactly electron and proton.
- Attributes:
- gyro_freqastropy.units.Quantity[u.rad / u.s]
An array containing the gyrofrequency for each species. The order of the frequencies corresponds to the order of the particles in the particles list.
- plasma_freqastropy.units.Quantity[u.rad / u.s]
An array containing the plasma frequency for each species. The order of the frequencies corresponds to the order of the particles in the particles list.
- lower_hybrid_freq: astropy.units.Quantity[u.rad / u.s]
An array containing the lower hybrid frequency for each species. The order of the frequencies corresponds to the order of the particles in the particles list. This can be useful for classifying waves (e.g. the proton lower_hybrid_frequency is used as a lower bound for the frequency of whistler-mode chorus waves in WhistlerFilter).
- Raises:
- ValueError
- If the input parameters are inconsistent. For example:
If neither plasma_over_gyro_ratio nor number_density is provided.
If both plasma_over_gyro_ratio and number_density are provided.
If plasma_over_gyro_ratio is provided but particles are not exactly electron and proton.
Examples
>>> mag_point = MagPoint(Angle(0 * u.deg), 4.5) >>> particles = ("e", "H+") >>> plasma_point = PlasmaPoint(mag_point, particles, plasma_over_gyro_ratio=1.5)
>>> mag_point = MagPoint(Angle(0 * u.deg), 4.5) >>> particles = ("e", "p+") >>> num_density = [2524781.78, 2524781.78] * (1 / u.m**3) >>> plasma_point = PlasmaPoint(mag_point, particles, number_density=num_density)