diff --git a/Project.toml b/Project.toml index 0ff65922..d68a1b09 100644 --- a/Project.toml +++ b/Project.toml @@ -6,6 +6,7 @@ version = "0.5.7" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" diff --git a/src/Neuroblox.jl b/src/Neuroblox.jl index 97f40932..10363fe2 100644 --- a/src/Neuroblox.jl +++ b/src/Neuroblox.jl @@ -104,7 +104,6 @@ include("blox/cortical.jl") include("blox/canonicalmicrocircuit.jl") include("blox/neuron_models.jl") include("blox/DBS_Model_Blox_Adam_Brown.jl") -include("blox/van_der_pol.jl") include("blox/ts_outputs.jl") include("blox/sources.jl") include("blox/DBS_sources.jl") diff --git a/src/blox/neural_mass.jl b/src/blox/neural_mass.jl index 016cb644..71608146 100644 --- a/src/blox/neural_mass.jl +++ b/src/blox/neural_mass.jl @@ -594,8 +594,8 @@ struct VanderPol <: NeuralMassBlox name, namespace=nothing, θ=1.0) - p = paramscoping(θ=θ, ϕ=ϕ) - θ, ϕ = p + p = paramscoping(θ=θ) + θ = p[1] sts = @variables x(t)=0.0 [output=true] y(t)=0.0 jcn(t) [input=true] eqs = [D(x) ~ y, diff --git a/test/components.jl b/test/components.jl index b2970893..4e3934db 100644 --- a/test/components.jl +++ b/test/components.jl @@ -786,6 +786,25 @@ end @test sol.retcode == ReturnCode.Success end +@testset "VdP" begin + Random.seed!(1234) + @named vdp = van_der_pol() + g = MetaDiGraph() + add_blox!(g, vdp) + @named sys = system_from_graph(g) + prob = ODEProblem(sys, [0.0, 0.1], (0.0, 20.0), []) + sol = solve(prob,Tsit5()) + @test sol.retcode == ReturnCode.Success + + @named vdp = van_der_pol(noise=true) + g = MetaDiGraph() + add_blox!(g, vdp) + @named sys = system_from_graph(g) + prob = SDEProblem(sys, [0.0, 0.1], (0.0, 20.0), []) + sol = solve(prob, RKMil()) + @test sol.retcode == ReturnCode.Success +end + @testset "DBS circuit firing rates" begin @testset "Striatum_MSN_Adam" begin Random.seed!(1234)