Library

Documentation for SpaceIndices.jl.

SpaceIndices._round_KpMethod
_round_Kp(x::Float64)

Celestrak mulitples Kp by 10 and rounds to the nearest integer this puts it back.

source
SpaceIndices.constant_interpolationMethod
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].

source
SpaceIndices.expiry_periodsFunction
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.

source
SpaceIndices.filenamesMethod
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.

source
SpaceIndices.initMethod
init(; blocklist::Vector = []) -> Nothing

Initialize 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.

source
SpaceIndices.initMethod
init(::Type{T}; kwargs...) where T<:SpaceIndexSet -> Nothing

Initialize 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: If true, the remote files will be downloaded regardless of their timestamps. (Default = false)
  • filepaths::Union{Nothing, Vector{String}}: If it is nothing, the function will download the space index files from the locations specified in the urls 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 set T. (Default = nothing)
source
SpaceIndices.parse_filesFunction
parse_files(::Type{T}, filepaths::Vector{String}) where T<:SpaceIndexSet -> T

Parse 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.

source
SpaceIndices.space_indexFunction
space_index(::Val{:index}, jd::Number; kwargs...) -> Number
space_index(::Val{:index}, date::DateTime; kwargs...) -> Number

Get 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.

source
SpaceIndices.space_indexMethod
space_index(::Val{:Ap}, jd::Number) -> NTuple{8, Float64}

Get the Ap index for the day at instant compute every three hours.

source
SpaceIndices.space_indexMethod
space_index(::Val{:DTC}, date::Number) -> Float64

Get the exospheric temperature variation [K] caused by the Dst index at instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:F10adj_avg_center81}, jd::Number) -> Float64

Get the adjusted F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over 81 days centered for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:F10adj_avg_last81}, jd::Number) -> Float64

Get the adjusted F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over the last 81 days from the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:F10adj}, jd::Number) -> Float64

Get the adjusted F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:F10obs_avg_center81}, jd::Number) -> Float64

Get the observed F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over 81 days centered for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:F10obs_avg_last81}, jd::Number) -> Float64

Get the observed F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] averaged over the last 81 days from the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:F10obs}, jd::Number) -> Float64

Get the observed F10.7 index (10.7-cm solar flux) [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:Kp}, jd::Number) -> NTuple{8, Float64}

Get the Kp index for the day at instant compute every three hours.

source
SpaceIndices.space_indexMethod
get_space_index(::Val{:M10}, date::Number) -> Float64

Get the MG2 index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:M81a}, date::Number) -> Float64

Get the 81-day averaged MG2 index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:S10}, date::Number) -> Float64

Get the EUV index (26-34 nm) scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:S81a}, date::Number) -> Float64

Get the 81-day averaged EUV index (26-34 nm) scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:Y10}, date::Number) -> Float64

Get the solar X-ray & Lya index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.space_indexMethod
space_index(::Val{:Y81a}, date::Number) -> Float64

Get the 81-day averaged solar X-ray & Lya index scaled to F10.7 [10⁻²² W / (M² ⋅ Hz)] for the instant (UTC).

source
SpaceIndices.urlsFunction
urls(::Type{T}) where T<:SpaceIndexSet -> Vector{String}

Return the URLs to fetch the remote files associated with the space index set T.

source
SpaceIndices.@data_handlerMacro
@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.

source
SpaceIndices.@objectMacro
@object(T)

Return the object associated with the space index set T.

Throws

  • Error: If the space index T was not initialized.
source
SpaceIndices.@registerMacro
@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.

source