Skip to content

Commit

Permalink
Cleanup and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
agchesebro committed Jan 15, 2025
1 parent b5ff31d commit b051eac
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/Neuroblox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions src/blox/neural_mass.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
19 changes: 19 additions & 0 deletions test/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b051eac

Please sign in to comment.