Skip to content

Commit

Permalink
Remove auto propagation of diffeq keywords (#100)
Browse files Browse the repository at this point in the history
* replace downloads

* fix deprec in estimate delay time

* fix deprc in traditional embedding

* bump version

* downloads depwarn
  • Loading branch information
Datseris committed Dec 19, 2021
1 parent b31a140 commit b2b9fce
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
7 changes: 5 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DelayEmbeddings"
uuid = "5732040d-69e3-5649-938a-b6b4f237613f"
repo = "https://github.com/JuliaDynamics/DelayEmbeddings.jl.git"
version = "2.0.2"
version = "2.0.3"

[deps]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Expand All @@ -16,17 +16,20 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
[compat]
Distances = "0.7, 0.8, 0.9, 0.10"
Distributions = "0.23, 0.24, 0.25"
DynamicalSystemsBase = "2.3.4"
Neighborhood = "0.2"
StaticArrays = "0.8, 0.11, 0.12, 1.0"
StatsBase = "0.24, 0.32, 0.33"
julia = "1.5"

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
Peaks = "18e31ff7-3703-566c-8e60-38913d67486b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DynamicalSystemsBase", "Test", "Random", "DelimitedFiles", "Peaks"]
test = ["DynamicalSystemsBase", "Test",
"Random", "DelimitedFiles", "Peaks", "Downloads"]
5 changes: 3 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using DelayEmbeddings
using StaticArrays
using Test
import Downloads

# Download some test timeseries

Expand All @@ -11,14 +12,14 @@ todownload = ["$n.csv" for n in 1:4]

mkpath(tsfolder)
for a in todownload
download(repo*"/"*a, joinpath(tsfolder, a))
Downloads.download(repo*"/"*a, joinpath(tsfolder, a))
end

#New:
todownload = ["test_time_series_lorenz_standard_N_10000_multivariate.csv", "test_time_series_roessler_N_10000_multivariate.csv"]
repo = "https://raw.githubusercontent.com/JuliaDynamics/JuliaDynamics/master/timeseries"
for a in todownload
download(repo*"/"*a, joinpath(tsfolder, a))
Downloads.download(repo*"/"*a, joinpath(tsfolder, a))
end

ti = time()
Expand Down
8 changes: 4 additions & 4 deletions test/traditional/delaytime_test.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using DelayEmbeddings: localextrema, exponential_decay_fit
using DynamicalSystemsBase, Test

println("\nTesting delay estimation...")
println("\nTesting delay time estimation...")

testval = (val, vmin, vmax) -> @test vmin val vmax
diffeq = (atol = 1e-9, rtol = 1e-9, maxiters = typemax(Int))
Expand All @@ -23,22 +23,22 @@ diffeq = (atol = 1e-9, rtol = 1e-9, maxiters = typemax(Int))

ds = Systems.roessler(ones(3))
Δt = 0.02
data = trajectory(ds,500.0;Δt,diffeq...)
data = trajectory(ds,500.0;Δt,diffeq)
x = data[:,1]
@test 1.3 estimate_delay(x,"ac_zero", 1:2:500)*Δt 1.7
@test 2.6 estimate_delay(x,"ac_min", 1:2:500)*Δt 3.4
@test 1.0 estimate_delay(x,"mi_min", 1:2:500)*Δt 1.6

Δt = 0.1
data = trajectory(ds,2000.0; Δt,diffeq...)
data = trajectory(ds,2000.0; Δt,diffeq)
x = data[:,1]
@test 1.3 estimate_delay(x,"ac_zero", 1:1:50)*Δt 1.7
@test 2.6 estimate_delay(x,"ac_min", 1:1:50)*Δt 3.4
@test 1.15 estimate_delay(x,"mi_min", 1:1:50)*Δt 1.6

ds = Systems.lorenz()
Δt = 0.1
data = trajectory(ds,5000;Δt,diffeq...)
data = trajectory(ds,5000;Δt,diffeq)
x = data[500:end,1]
@test 0 < estimate_delay(x,"exp_extrema", 0:2:200) < 200

Expand Down
4 changes: 2 additions & 2 deletions test/traditional/embedding_dimension_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ test_value = (val, vmin, vmax) -> @test vmin <= val <= vmax
diffeq = (atol = 1e-9, rtol = 1e-9, maxiters = typemax(Int))
s_sin = sin.(0:0.1:1000)
ro = Systems.roessler(ones(3));
data = trajectory(ro,1000;Δt=0.1,diffeq...)
data = trajectory(ro,1000;Δt=0.1,diffeq)
s_roessler = data[:,1]
lo = Systems.lorenz96(4, [0.1, 0.2, 0.5, 0.1]; F = 16.0);
data = trajectory(lo,5000.0;Δt=0.05, Ttr = 100.0, diffeq...)
data = trajectory(lo,5000.0;Δt=0.05, Ttr = 100.0, diffeq)
s_lorenz = data[:,1]

@testset "Caos method" begin
Expand Down

0 comments on commit b2b9fce

Please sign in to comment.