emp.geomagnetic_field
Copyright (C) 2023 by The RAND Corporation See LICENSE and README.md for information on usage and licensing.
This module contains the MagneticField class hierarchy for modeling geomagnetic fields, including dipole and IGRF models.
Classes
|
Coordinate systems for magnetic field output. |
Dipole magnetic field model. |
|
|
IGRF magnetic field model. |
Abstract base class for magnetic field models. |
|
Factory for creating magnetic field model instances. |
|
|
Supported magnetic field models. |
- class emp.geomagnetic_field.CoordinateSystem(value)[source]
Coordinate systems for magnetic field output.
- CARTESIAN_GEO = 'cartesian_geo'
- CARTESIAN_MAG = 'cartesian_mag'
- LATLONG_MAG = 'latlong_mag'
- SPHERICAL_GEO = 'spherical_geo'
- class emp.geomagnetic_field.MagneticFieldModel(value)[source]
Supported magnetic field models.
- DIPOLE = 'dipole'
- IGRF = 'igrf'
- class emp.geomagnetic_field.MagneticField[source]
Abstract base class for magnetic field models.
- abstractmethod get_field_vector(point, coordinate_system)[source]
Get magnetic field vector in the specified coordinate system.
- class emp.geomagnetic_field.DipoleMagneticField[source]
Dipole magnetic field model.
- class emp.geomagnetic_field.IGRFMagneticField(date=None)[source]
IGRF magnetic field model.
- __init__(date=None)[source]
Initialize IGRF field with specific date.
- Parameters:
date (datetime, optional) – Date for IGRF model evaluation. If None, uses January 1, 2020.
- class emp.geomagnetic_field.MagneticFieldFactory[source]
Factory for creating magnetic field model instances.
- classmethod create(model, **kwargs)[source]
Create a magnetic field model instance.
- Parameters:
model (MagneticFieldModel or str) – The magnetic field model type.
**kwargs (Any) – Additional arguments passed to model constructor. For IGRF: date (datetime) - date for field evaluation
- Returns:
Instance of the requested magnetic field model.
- Return type: