Initialization of Space Indices
The files of all the registered space indices can be automatically downloaded using:
SpaceIndices.init(; kwargs...) -> Nothing
If 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 -> Nothing
where 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 theurls
API 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'...
julia> SpaceIndices.init(SpaceIndices.Celestrak; filepaths = ["./SW-All.csv"])