Library
Documentation for SpaceIndices.jl.
SpaceIndices.SpaceIndexSet — Type
SpaceIndices._round_Kp — Method
_round_Kp(x::Float64)Celestrak mulitples Kp by 10 and rounds to the nearest integer this puts it back.
sourceSpaceIndices.constant_interpolation — Method
constant_interpolation(knots::AbstractVector, values::AbstractVector, x) -> eltype(values)Perform a constant interpolation at x of values evaluated at knots. The interpolation returns value(knots[k-1]) in which knots[k-1] <= x < knots[k].
SpaceIndices.destroy — Method
SpaceIndices.expiry_periods — Function
expiry_periods(::Type{T}) where T<:SpaceIndexSet -> Vector{DatePeriod}Return the expiry periods for the remote files associated with the space index set T. If a time interval greater than this period has elapsed since the last download, the remote files will be downloaded again.
SpaceIndices.filenames — Method
filenames(::Type{T}) where T<:SpaceIndexSet -> Vector{String}Return the filenames for the remote files associated with the space index set T. If this function is not defined for T, the filenames will be obtained based on the URLs.
SpaceIndices.init — Method
init(; blocklist::Vector = []) -> NothingInitialize all the registered space index sets.
This function will download the remote files associated to the space index sets if they do not exist or if the expiry period has been elapsed. Afterward, it will parse the files and populate the objects to be accessed by the function space_index.
If the user does not want to initialize some sets, they can pass them in the keyword blocklist.
SpaceIndices.init — Method
init(::Type{T}; kwargs...) where T<:SpaceIndexSet -> NothingInitialize the space index set T.
This function will download the remote files associated with the space index set T if they do not exist or if their expiry period has been elapsed. Aftward, it will parse the files and populate the object to be accessed by the function space_index.
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)
SpaceIndices.linear_interpolation — Method
linear_interpolation(knots::AbstractVector, values::AbstractVector, x)Perform a linear interpolation at x of values evaluated at knots.
SpaceIndices.parse_files — Function
parse_files(::Type{T}, filepaths::Vector{String}) where T<:SpaceIndexSet -> TParse the files associated with the space index set T using the files in filepaths. It must return an object of type T with the parsed data.
SpaceIndices.space_index — Function
space_index(::Val{:index}, jd::Number; kwargs...) -> Number
space_index(::Val{:index}, date::DateTime; kwargs...) -> NumberGet the space index for the Julian day jd or the instant. The latter must be an object of type DateTime. kwargs... can be used to pass additional configuration for the space index.
SpaceIndices.space_index — Method
space_index(::Val{:Ap30}, jd::Number) -> NTuple{48, Float64}Return the Ap30 index for the day at Julian Day jd.
The Ap30 index is the linear equivalent of Hp30 geomagnetic activity. This function returns all 48 values for the day containing the given Julian Day.
sourceSpaceIndices.space_index — Method
space_index(::Val{:Ap60}, jd::Number) -> NTuple{24, Float64}Return the ap60 index for the day at Julian Day jd.
The ap60 index is the linear equivalent of Hp60 geomagnetic activity. This function returns all 24 values for the day containing the given Julian Day.
sourceSpaceIndices.space_index — Method
space_index(::Val{:Ap_daily}, jd::Number) -> Int64Get the daily Ap index for the day at instant.
SpaceIndices.space_index — Method
space_index(::Val{:Ap}, jd::Number) -> NTuple{8, Float64}Get the Ap index for the day at instant compute every three hours.
SpaceIndices.space_index — Method
SpaceIndices.space_index — Method
SpaceIndices.space_index — Method
SpaceIndices.space_index — Method
space_index(::Val{:DTC}, date::Number) -> Float64Get the exospheric temperature variation [K] caused by the Dst index at instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:F10adj_avg_center81}, jd::Number) -> Float64Get the adjusted F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over 81 days centered for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:F10adj_avg_last81}, jd::Number) -> Float64Get the adjusted F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over the last 81 days from the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:F10adj}, jd::Number) -> Float64Get the adjusted F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:F10obs_avg_center81}, jd::Number) -> Float64Get the observed F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over 81 days centered for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:F10obs_avg_last81}, jd::Number) -> Float64Get the observed F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over the last 81 days from the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:F10obs}, jd::Number) -> Float64Get the observed F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:Hp30}, jd::Number) -> NTuple{48, Float64}Return the Hp30 index for the day at Julian Day jd.
The Hp30 index represents geomagnetic activity with 30-minute resolution. This function returns all 48 values for the day containing the given Julian Day.
sourceSpaceIndices.space_index — Method
space_index(::Val{:Hp60}, jd::Number) -> NTuple{24, Float64}Return the Hp60 index for the day at Julian Day jd.
The Hp60 index represents geomagnetic activity with 60-minute (hourly) resolution. This function returns all 24 values for the day containing the given Julian Day.
sourceSpaceIndices.space_index — Method
SpaceIndices.space_index — Method
space_index(::Val{:Kp_daily}, jd::Number) -> Float64Get the daily Kp index for the day at instant.
SpaceIndices.space_index — Method
space_index(::Val{:Kp}, jd::Number) -> NTuple{8, Float64}Get the Kp index for the day at instant compute every three hours.
SpaceIndices.space_index — Method
get_space_index(::Val{:M10}, date::Number) -> Float64Get the MG2 index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:M81a}, date::Number) -> Float64Get the 81-day averaged MG2 index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
SpaceIndices.space_index — Method
space_index(::Val{:S10}, date::Number) -> Float64Get the EUV index (26-34 nm) scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:S81a}, date::Number) -> Float64Get the 81-day averaged EUV index (26-34 nm) scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:Y10}, date::Number) -> Float64Get the solar X-ray & Lya index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.space_index — Method
space_index(::Val{:Y81a}, date::Number) -> Float64Get the 81-day averaged solar X-ray & Lya index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).
SpaceIndices.urls — Function
urls(::Type{T}) where T<:SpaceIndexSet -> Vector{String}Return the URLs to fetch the remote files associated with the space index set T.
SpaceIndices.@data_handler — Macro
@data_handler(T)Return the optional data handler associated with space index set T. This variable stores an instance of T if the set was already initialized.
SpaceIndices.@object — Macro
@object(T)Return the object associated with the space index set T.
Throws
Error: If the space indexTwas not initialized.
SpaceIndices.@register — Macro
@register(T)Register the the space index set T. This macro push the data into the global vector of space files and also creates the optional data handler for the processed structure.