Initialization of Space Indices
The files of all the registered space indices can be automatically downloaded using:
SpaceIndices.init(; kwargs...) -> NothingIf a file exists, the function checks if its expiry period has passed. If so, it downloads the file again.
julia> SpaceIndices.init()If the user does not want to download a set of space indices, they can pass them in the keyword blocklist to the function SpaceIndices.init.
julia> SpaceIndices.init(; blocklist = [SpaceIndices.Celestrak])If the user wants to initialize only one space index set, they can pass it to the same function:
SpaceIndices.init(::Type{T}; kwargs...) where T<:SpaceIndexSet -> Nothingwhere T must be the space index set. In this case, the user have access to the following keywords:
force_download::Bool: Iftrue, the remote files will be downloaded regardless of their timestamps. (Default =false)filepaths::Union{Nothing, Vector{String}}: If it isnothing, the function will download the space index files from the locations specified in theurlsAPI function. However, the user can pass a vector with the file locations, which will be used instead of downloading the data. In this case, the user must provide all the files in the space index setT. (Default =nothing)
julia> SpaceIndices.init()[ Info: Downloading the file 'DTCFILE.TXT' from 'https://sol.spacenvironment.net/JB2008/indices/DTCFILE.TXT'... [ Info: Downloading the file 'SOLFSMY.TXT' from 'https://sol.spacenvironment.net/JB2008/indices/SOLFSMY.TXT'... [ Info: Downloading the file 'SW-All.csv' from 'https://celestrak.org/SpaceData/SW-All.csv'... [ Info: Downloading the file 'Hp30_ap30_complete_series.txt' from 'https://kp.gfz.de/app/files/Hp30_ap30_complete_series.txt'... [ Info: Downloading the file 'Hp60_ap60_complete_series.txt' from 'https://kp.gfz.de/app/files/Hp60_ap60_complete_series.txt'... [ Info: Downloading the file 'hpo_forecast_mean_bars_Hp30.json' from 'https://isdc-data.gfz.de/geomagnetism/HpoForecast/v0102/output/Hpo/json/hpo_forecast_mean_bars_Hp30.json'... [ Info: Downloading the file 'hpo_forecast_mean_bars_Hp60.json' from 'https://isdc-data.gfz.de/geomagnetism/HpoForecast/v0102/output/Hpo/json/hpo_forecast_mean_bars_Hp60.json'... [ Info: Downloading the file 'f107_observed_prediction_coefficients.csv' from 'https://raw.githubusercontent.com/JuliaSpace/SatelliteToolboxSpaceIndexSets/refs/heads/main/files/f107_observed_prediction_coefficients.csv'... [ Info: Downloading the file 'f107_adjusted_prediction_coefficients.csv' from 'https://raw.githubusercontent.com/JuliaSpace/SatelliteToolboxSpaceIndexSets/refs/heads/main/files/f107_adjusted_prediction_coefficients.csv'...
julia> SpaceIndices.init(SpaceIndices.Celestrak; filepaths = ["./SW-All.csv"])Dst Index Set
The Dst index set is not included in the default SpaceIndices.init() call because it downloads many monthly HTML files from the Kyoto WDC (final, provisional, and real-time quicklook data). It must be initialized separately:
julia> SpaceIndices.init() # Initialize all default sets first
julia> SpaceIndices.init(SpaceIndices.Dst) # Then initialize DstThe Dst set provides one index: :Dst (the raw hourly Dst index in nT).
Checking the Status
The function SpaceIndices.status() prints all the registered space index sets, showing whether each one is initialized and the available timespan of each of their space indices:
julia> SpaceIndices.status()● JB2008 · initialized ├─ DTC 1997-01-01T00:00:00 — 2026-07-11T23:00:00 ├─ S10 1997-01-01T00:00:00 — 2026-07-11T00:00:00 ├─ S81a 1997-01-01T00:00:00 — 2026-07-11T00:00:00 ├─ M10 1997-01-01T00:00:00 — 2026-07-11T00:00:00 ├─ M81a 1997-01-01T00:00:00 — 2026-07-11T00:00:00 ├─ Y10 1997-01-01T00:00:00 — 2026-07-11T00:00:00 └─ Y81a 1997-01-01T00:00:00 — 2026-07-11T00:00:00 ● Celestrak · initialized ├─ F10obs 1957-10-01T08:00:00 — 2026-10-08T08:00:00 ├─ F10obs_avg_center81 1957-10-01T08:00:00 — 2026-10-08T08:00:00 ├─ F10obs_avg_last81 1957-10-01T08:00:00 — 2026-10-08T08:00:00 ├─ F10adj 1957-10-01T08:00:00 — 2026-10-08T08:00:00 ├─ F10adj_avg_center81 1957-10-01T08:00:00 — 2026-10-08T08:00:00 ├─ F10adj_avg_last81 1957-10-01T08:00:00 — 2026-10-08T08:00:00 ├─ Ap 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ Ap_daily 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ Kp 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ Kp_daily 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ Cp 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ C9 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ ISN 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ├─ BSRN 1957-10-01T00:00:00 — 2026-10-08T00:00:00 └─ ND 1957-10-01T00:00:00 — 2026-10-08T00:00:00 ● Hpo · initialized ├─ Hp30 1985-01-01T00:00:00 — 2026-08-28T00:00:00 ├─ Ap30 1985-01-01T00:00:00 — 2026-08-28T00:00:00 ├─ Hp60 1985-01-01T00:00:00 — 2026-08-28T00:00:00 └─ Ap60 1985-01-01T00:00:00 — 2026-08-28T00:00:00 ○ Dst · not initialized └─ Dst ── ● SatelliteToolboxSpaceIndexSets · initialized ├─ F10obs_predicted (no timespan information) └─ F10adj_predicted (no timespan information)