API Reference
Atmospheric & Ionospheric Models
MSIS (Neutral Atmosphere)
AURORA.find_msis_file — Functionfind_msis_file(; year=2018, month=12, day=7, hour=11, minute=15,
lat=76, lon=5, height=85:1:700)Find or create a MSIS model data file for the specified conditions.
It first searches for an existing MSIS file matching the given parameters. If no matching file is found, it calculates new MSIS data using the Python pymsis package and saves it to a file. The pymsis package will download, compile and run some fortran code under the hood.
Keyword Arguments
year::Int=2018: Yearmonth::Int=12: Month (1-12)day::Int=7: Day of month (1-31)hour::Int=11: Hour in Universal Time (0-23)minute::Int=15: Minute (0-59)lat::Real=76: Geographic latitude in degrees Northlon::Real=5: Geographic longitude in degrees Eastheight::AbstractRange=85:1:700: Altitude range in km
Returns
String: Full path to the MSIS data file
Notes
- Default parameters correspond to the VISIONS-2 rocket launch conditions
- Files are stored in
internal_data/data_neutrals/directory
IRI (Ionosphere)
AURORA.find_iri_file — Functionfind_iri_file(; year=2018, month=12, day=7, hour=11, minute=15,
lat=76, lon=5, height=85:1:700)Find or create an IRI model data file for the specified conditions.
It first searches for an existing IRI file matching the given parameters. If no matching file is found, it calculates new IRI data using the Python iri2016 package and saves it to a file. The iri2016 package will compile and run some fortran code under the hood.
Keyword Arguments
year::Int=2018: Yearmonth::Int=12: Month (1-12)day::Int=7: Day of month (1-31)hour::Int=11: Hour in Universal Time (0-23)minute::Int=15: Minute (0-59)lat::Real=76: Geographic latitude in degrees Northlon::Real=5: Geographic longitude in degrees Eastheight::AbstractRange=85:1:700: Altitude range in km
Returns
String: Full path to the IRI data file
Notes
- Default parameters correspond to the VISIONS-2 rocket launch conditions
- Files are stored in
internal_data/data_electron/directory
Input Flux Functions
AURORA.Ie_with_LET — FunctionIe_with_LET(E₀, Q, E, dE, μ_center, BeamWeight, Beams; low_energy_tail=true)Return an electron spectra following a Maxwellian distribution with a low energy tail (LET)
This function is a corrected implementation of Meier/Strickland/Hecht/Christensen JGR 1989 (pages 13541-13552)
Arguments
E₀: characteristic energy (eV)Q: total energy flux into the ionosphere (eV/m²/s)E: energy grid (eV). Vector [nE]dE: energy bin sizes(eV). Vector [nE]μ_center: electron beams average pitch angle cosine. Vector [n_beams]BeamWeight: weights of the different beams. Vector [n_beams]Beams: indices of the electron beams with a precipitating fluxlow_energy_tail=true: control the presence of a low energy tail
Returns:
Ie_top: differential electron energy flux (#e⁻/m²/s). Matrix [n_beams, 1, nE]
Important notes
This is a corrected version of the equations present in Meier et al. 1989 to match the results presented in Fig. 4 of their paper.
Changes were made to the factor b:
- no inverse
Examples:
Calling the function with flux only in the two first beams (0 to 20°) and an "isotropic" pitch-angle distribution.
julia> E, dE = make_energy_grid(100e3);
julia> θ_lims = 180:-10:0;
julia> μ_center = mu_avg(θ_lims);
julia> BeamWeight = beam_weight(180:-10:0);
julia> Ie = AURORA.Ie_with_LET(1e3, 1e10, E, dE, μ_center, BeamWeight, 1:2);
Calling the function with flux only in the three first beams (0 to 30°) and a custom pitch-angle distribution (1/2 of the total flux in the first beam, 1/4 in the second beam and 1/4 in the third beam).
julia> E, dE = make_energy_grid(100e3);
julia> θ_lims = 180:-10:0;
julia> μ_center = mu_avg(θ_lims);
julia> BeamWeight = [2, 1, 1];
julia> Ie = Ie_with_LET(1e3, 1e10, E, dE, μ_center, BeamWeight, 1:3);