JuliaSpace / SatelliteToolbox.jl

A toolbox for satellite analysis written in julia language.
MIT License
249 stars 33 forks source link

init_space_indices() interpolation error #53

Closed Arryk closed 3 years ago

Arryk commented 3 years ago

Hi, I'm currently experiencing issue with the function init_space_indices(), interpolations is returning an error I tried to use it in a clean new environment called test. I've used the function in the past (in april) with success.

Any idea what's going on?

I'm using Julia 1.6

Thanks

(@v1.6) pkg> activate test

(test) pkg> add SatelliteToolbox
    Updating registry at `~\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
    Updating `.\test\Project.toml`
  [6ac157d9] + SatelliteToolbox v0.8.0
    Updating `.\test\Manifest.toml`
  [79e6a3ab] + Adapt v3.3.0
  [13072b0f] + AxisAlgorithms v1.0.0
  [a8cc5b0e] + Crayons v4.0.4
  [9a962f9c] + DataAPI v1.6.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [5789e2e9] + FileIO v1.9.0
  [59287772] + Formatting v0.4.2
  [cd3eb016] + HTTP v0.8.19
  [83e8ac13] + IniFile v0.5.0
  [a98d9a8b] + Interpolations v0.13.2
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [739be429] + MbedTLS v1.0.3
  [6fe1bfb0] + OffsetArrays v1.8.0
  [fbd9d27c] + OptionalData v0.3.0
  [bac558e1] + OrderedCollections v1.4.1
  [d96e819e] + Parameters v0.12.2
  [3a141323] + PolynomialRoots v1.0.0
  [08abe8d2] + PrettyTables v0.11.1
  [c84ed2f1] + Ratios v0.4.0
  [189a3867] + Reexport v1.0.0
  [74f56ac7] + ReferenceFrameRotations v0.5.7
  [cbe49d4c] + RemoteFiles v0.3.1
  [ae029012] + Requires v1.1.3
  [6ac157d9] + SatelliteToolbox v0.8.0
  [90137ffa] + StaticArrays v1.2.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.4.2
  [3a884ed6] + UnPack v1.0.2
  [efce3f68] + WoodburyMatrices v0.5.3
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll

julia> using SatelliteToolbox

julia> init_space_indices()
ERROR: knot-vectors must be unique and sorted in increasing order
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] check_gridded
    @ ~\.julia\packages\Interpolations\GIn2o\src\gridded\gridded.jl:51 [inlined]
  [3] Interpolations.GriddedInterpolation(#unused#::Type{Float64}, knots::Tuple{Vector{Float64}}, A::Vector{Float64}, it::Interpolations.Gridded{Interpolations.Constant{Interpolations.Nearest}})
    @ Interpolations ~\.julia\packages\Interpolations\GIn2o\src\gridded\gridded.jl:32
  [4] interpolate(#unused#::Type{Float64}, #unused#::Type{Float64}, knots::Tuple{Vector{Float64}}, A::Vector{Float64}, it::Interpolations.Gridded{Interpolations.Constant{Interpolations.Nearest}})
    @ Interpolations ~\.julia\packages\Interpolations\GIn2o\src\gridded\gridded.jl:66
  [5] interpolate
    @ ~\.julia\packages\Interpolations\GIn2o\src\gridded\gridded.jl:83 [inlined]
  [6] _parse_fluxtable(path::String)
    @ SatelliteToolbox ~\.julia\packages\SatelliteToolbox\EL8pX\src\earth\space_indices\fluxtable.jl:111
  [7] _init_fluxtable(; force_download::Bool, local_path::Nothing)
    @ SatelliteToolbox ~\.julia\packages\SatelliteToolbox\EL8pX\src\earth\space_indices\fluxtable.jl:56
  [8] #init_space_indices#144
    @ ~\.julia\packages\SatelliteToolbox\EL8pX\src\earth\space_indices\space_indices.jl:285 [inlined]
  [9] init_space_indices()
    @ SatelliteToolbox ~\.julia\packages\SatelliteToolbox\EL8pX\src\earth\space_indices\space_indices.jl:277
 [10] top-level scope
    @ REPL[4]:1

(test) pkg> status
      Status `.\test\Project.toml`
  [6ac157d9] SatelliteToolbox v0.8.0
ronisbr commented 3 years ago

Hi @Arryk

Sorry about that. The files in fluxtable now has duplicated data. It is fixed in master. I will release a patch version of 0.8 to fix this.

Arryk commented 3 years ago

Thanks a lot for fast response & fix :)

ronisbr commented 3 years ago

It should be fixed when 0.8.1 is tagged. Please, feel free to reopen if this is not the case.

https://github.com/JuliaRegistries/General/pull/37129