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'...
julia> SpaceIndices.init(SpaceIndices.Celestrak; filepaths = ["./SW-All.csv"])