magpoint

The magpoint module provides a class for representing the magnetic field of a planet (defaulting to Earth) at a specific point in space. It calculates the magnetic flux density based on magnetic latitude, L-shell value, planetary radius, and magnetic dipole moment.

This module uses the dipole approximation for the planetary magnetic field.

class piran.magpoint.MagPoint(mlat: ~typing.Annotated[~astropy.units.quantity.Quantity, Unit("rad")], l_shell: float, planetary_radius: ~typing.Annotated[~astropy.units.quantity.Quantity, Unit("m")] = <<class 'astropy.constants.iau2015.IAU2015'> name='Nominal Earth equatorial radius' value=6378100.0 uncertainty=0.0 unit='m' reference='IAU 2015 Resolution B 3'>, mag_dipole_moment: ~typing.Annotated[~astropy.units.quantity.Quantity, Unit("m3 T")] = <Quantity 8.033454e+15 m3 T>)

Represents the magnetic field of a planet (by default Earth’s) at a specific point defined by magnetic latitude and L-shell value.

This class uses the dipole approximation to calculate the magnetic flux density.

Parameters:
mlatastropy.coordinates.Angle[u.rad]

The magnetic latitude, given in units convertible to radians.

l_shellfloat

The “L-shell”, “L-value”, or “McIlwain L-parameter”. A dimensionless quantity representing the radial distance of a magnetic field line from the center of the planet, normalised to the planetary radius.

planetary_radiusastropy.units.Quantity[u.m], default=astropy.constants.R_earth

The radius of the planet of interest, given in units convertible to meters. Defaults to Earth’s radius.

mag_dipole_momentastropy.units.Quantity[u.tesla * u.m**3], default=8.033454e15 * (u.tesla * u.m**3)

The magnetic dipole moment of the planet of interest, given in units convertible to Tesla metres cubed (T m^3). Defaults to Earth’s magnetic dipole moment (8.033454e15 T m^3).

Attributes:
flux_densityastropy.units.Quantity[u.tesla]

The magnetic flux density vector at the specified point, as an astropy.units.Quantity with units of Tesla.

Notes

The magnetic field is calculated using the dipole model, as described in Glauert & Horne (2005), paragraph 13.

Examples

>>> mlat_deg = Angle(0 * u.deg)
>>> l_shell = 4.5 * u.dimensionless_unscaled
>>> mag_point = MagPoint(mlat_deg, l_shell)