Skip to content

Commit

Permalink
Merge branch 'master' into basal_ganglia_tutorial_scott_feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
MasonProtter authored Dec 6, 2024
2 parents c7f7cb2 + 99ae9c6 commit 56c8279
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GraphDynamics = "0.2.1"
Graphs = "1"
Interpolations = "0.14, 0.15"
MetaGraphs = "0.7"
ModelingToolkit = "9.46.0 - 9.50.0"
ModelingToolkit = "9.55.0 - 9.55"
ModelingToolkitStandardLibrary = "2"
MuladdMacro = "0.2"
OrderedCollections = "1.6.3"
Expand Down
4 changes: 2 additions & 2 deletions src/blox/discrete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct TAN <: AbstractDiscrete

function TAN(; name, namespace=nothing, κ=100, λ=1)
sts = @variables R(t)
ps = @parameters κ=κ λ=λ jcn [input=true]
ps = @parameters κ=κ λ=λ jcn=0 [input=true]
eqs = [
R ~ min(κ, κ/*jcn + sqrt(eps())))
]
Expand All @@ -79,7 +79,7 @@ struct SNc <: AbstractModulator

function SNc(; name, namespace=nothing, κ_DA=1, N_time_blocks=5, DA_reward=10, λ_DA=0.33, t_event=90.0)
sts = @variables R(t) R_(t)
ps = @parameters κ=κ_DA λ=λ_DA jcn [input=true] jcn_=0 #HACK: jcn_ stores the value of jcn at time t_event that can be accessed after the simulation
ps = @parameters κ=κ_DA λ=λ_DA jcn=0 [input=true] jcn_=0 #HACK: jcn_ stores the value of jcn at time t_event that can be accessed after the simulation

eqs = [
R ~ min(κ, κ/*jcn + sqrt(eps()))),
Expand Down
58 changes: 31 additions & 27 deletions src/gui/GUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ function param_order(::Type{T}) where T
return [k for k in keys(arguments(T))]
end

function plotdetail(::Type{T}) where T
return OrderedDict()
end

# methods

const NUMBER = "number"
Expand Down Expand Up @@ -290,7 +294,7 @@ function arguments(::Type{Neuroblox.Thalamus})
end

function plotdetail(::Type{Neuroblox.Thalamus})
OrderedDict(:mean => "V", :detail => ["V"])
OrderedDict(:mean => "V", :detail => ["V"], :plots =>["raster","stack"])
end

function arguments(::Type{Neuroblox.Striatum})
Expand All @@ -303,7 +307,7 @@ function arguments(::Type{Neuroblox.Striatum})
end

function plotdetail(::Type{Neuroblox.Striatum})
OrderedDict(:mean => "V", :detail => ["V"])
OrderedDict(:mean => "V", :detail => ["V"], :plots =>["raster","stack"])
end

function arguments(::Type{Neuroblox.GPe})
Expand All @@ -316,7 +320,7 @@ function arguments(::Type{Neuroblox.GPe})
end

function plotdetail(::Type{Neuroblox.GPe})
OrderedDict(:mean => "V", :detail => ["V"])
OrderedDict(:mean => "V", :detail => ["V"], :plots =>["raster","stack"])
end

function arguments(::Type{Neuroblox.GPi})
Expand All @@ -329,7 +333,7 @@ function arguments(::Type{Neuroblox.GPi})
end

function plotdetail(::Type{Neuroblox.GPi})
OrderedDict(:mean => "V", :detail => ["V"])
OrderedDict(:mean => "V", :detail => ["V"], :plots =>["raster","stack"])
end

function arguments(::Type{Neuroblox.STN})
Expand All @@ -342,7 +346,7 @@ function arguments(::Type{Neuroblox.STN})
end

function plotdetail(::Type{Neuroblox.STN})
OrderedDict(:mean => "V", :detail => ["V"])
OrderedDict(:mean => "V", :detail => ["V"], :plots =>["raster","stack"])
end

function arguments(::Type{Neuroblox.SNc})
Expand Down Expand Up @@ -439,27 +443,27 @@ function arguments(::Type{Neuroblox.CorticalBlox}) #TODO: add correct settings f
end

function plotdetail(::Type{Neuroblox.CorticalBlox})
OrderedDict(:mean => "V", :detail => ["V"])
end

function arguments(::Type{Neuroblox.BandPassFilterBlox})
OrderedDict(
:lb => NCAD(10, NUMBER, 0, 500,[],true),
:ub => NCAD(10, NUMBER, 0, 500,[],true),
:fs => NCAD(1000, NUMBER, 1, 10000,[],true),
:order => NCAD(4, INTEGER, 1, 2000,[],true)
)
end

function arguments(::Type{Neuroblox.PowerSpectrumBlox})
OrderedDict(
:fs => NCAD(1000, NUMBER, 1, 10000,[],true),
)
end

function arguments(::Type{Neuroblox.PhaseAngleBlox})
OrderedDict(
)
end
OrderedDict(:mean => "V", :detail => ["V"], :plots =>["raster","stack"])
end

# function arguments(::Type{Neuroblox.BandPassFilterBlox})
# OrderedDict(
# :lb => NCAD(10, NUMBER, 0, 500,[],true),
# :ub => NCAD(10, NUMBER, 0, 500,[],true),
# :fs => NCAD(1000, NUMBER, 1, 10000,[],true),
# :order => NCAD(4, INTEGER, 1, 2000,[],true)
# )
# end

# #function arguments(::Type{Neuroblox.PowerSpectrumBlox})
# OrderedDict(
# :fs => NCAD(1000, NUMBER, 1, 10000,[],true),
# )
# end

# function arguments(::Type{Neuroblox.PhaseAngleBlox})
# OrderedDict(
# )
# end

end

0 comments on commit 56c8279

Please sign in to comment.