gtsimulation.magnetic_field.magnetosphere#
- class gtsimulation.magnetic_field.magnetosphere.Dipole(B_eq: float | None = None, reference_radius: float = 6378137.1, direction: Sequence[float] | ndarray = (0, 0, -1), center: Sequence[float] | ndarray = (0, 0, 0), name: str | None = None, date: datetime | None = None)[source]#
Static magnetic dipole field.
- Parameters:
- B_eqfloat or None, optional
Equatorial field at the reference radius, in nT. If None, use the Earth normalization: 30100 nT, or the coefficient fit for date. Default is None.
- reference_radiusfloat, optional
Radius at which B_eq is specified, in metres. Default is Units.RE.
- directionarray-like, shape (3,), optional
Nonzero magnetic moment direction, normalized automatically. Default is (0, 0, -1), matching the Earth dipole polarity.
- centerarray-like, shape (3,), optional
Dipole center in metres. Default is (0, 0, 0).
- namestr or None, optional
Object name for the GT logger. If None, use “Earth” when B_eq is omitted, otherwise “Custom dipole”. Default is None.
- datedatetime.datetime or None, optional
Date for the Earth normalization fit (1900–2021), used when B_eq is omitted. None selects the fixed 30100 nT value. Default is None.
Notes
calc_field accepts coordinates in units of reference_radius and returns magnetic field components in nT. The reference radius sets the field normalization, not a surface boundary.
- calc_field(x, y, z)[source]#
Calculate the magnetic field in the native units of the model.
- Parameters:
- x, y, zfloat
Coordinates in the native units of the model.
- Returns:
- Bx, By, Bzfloat
Magnetic field components in nT.
- to_meters = 6378137.1#
- class gtsimulation.magnetic_field.magnetosphere.Gauss(date: datetime, model: GaussModels | str, model_type: GaussTypes | str, version=None, planet: GaussPlanets | str | None = None, moon: GaussMoons | str | None = None, coord: int = 1)[source]#
-
- calc_field(x, y, z)[source]#
Calculate the magnetic field in the native units of the model.
- Parameters:
- x, y, zfloat
Coordinates in the native units of the model.
- Returns:
- Bx, By, Bzfloat
Magnetic field components in nT.
- to_meters = 1000.0#
- class gtsimulation.magnetic_field.magnetosphere.Tsyganenko(date: datetime = datetime.datetime(2000, 1, 1, 0, 0), ModCode='96')[source]#
Tsyganenko empirical magnetospheric magnetic field model (T89/T96).
This class provides an interface to compute the magnetic field components in the Earth’s magnetosphere using the Tsyganenko empirical models (T89 or T96). The model type is selected via the ModCode parameter.
- Parameters:
date (datetime.datetime) – Date for model initialization (default: 2000-01-01)
ModCode (str) – Model version selector (89, 96, 15B)
- Raises:
ValueError – If date is outside model’s valid range
- calc_field(x, y, z)[source]#
Calculate the magnetic field in the native units of the model.
- Parameters:
- x, y, zfloat
Coordinates in the native units of the model.
- Returns:
- Bx, By, Bzfloat
Magnetic field components in nT.
- to_meters = 6378137.1#
Modules