Julia package for transformations between geocentric coordinate systems (GEI/GEO/GSE/GSM/MAG/SM/J2000), IGRF-14 geomagnetic field evaluation, and magnetic field line tracing.
using Pkg; Pkg.add("GeoCotrans")
using GeoCotrans, Dates
times = Date.(2015:2020)
x_geo = rand(3, 6)
x_gsm = geo2gsm(x_geo, times) # equivalent to transform(GEO() => GSM(), x_geo, times)
get_mlt(x_geo, times) # Magnetic Local Time
model = IGRF()
B_gsm = model(x_gsm, times; from = GSM()) # nT
using TsyganenkoModels
model = TsyIGRF(T89(2)) # Kp level = 2
using OrdinaryDiffEqTsit5, CairoMakie
sol = trace(GEO(3.0, 0.0, 0.0), DateTime(2020, 1, 1), Tsit5()) # Trace from [3, 0, 0] Earth radii
plot(sol; idxs = (1, 2)) # Equatorial plane (X-Y)Full API map with units and conventions: @doc(GeoCotrans), or the documentation (comparison with IRBEM and PySPEDAS).
- TsyganenkoModels.jl for external Tsyganenko magnetosphere models
- GeoAACGM.jl for AACGM coordinates
- SatelliteToolboxGeomagneticField.jl — IGRF-13 and dipole models (Julia)
- ppigrf — pure Python IGRF
- geopack — Python IGRF + Tsyganenko
- TREPS — online SPICE-based transforms
- pymaginverse — geomagnetic field inversion