diff --git a/Project.toml b/Project.toml index cbc0fcad..13332f44 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/blox/discrete.jl b/src/blox/discrete.jl index e6b5ee9c..1e3aca72 100644 --- a/src/blox/discrete.jl +++ b/src/blox/discrete.jl @@ -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()))) ] @@ -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()))), diff --git a/src/gui/GUI.jl b/src/gui/GUI.jl index 78728383..e8588785 100644 --- a/src/gui/GUI.jl +++ b/src/gui/GUI.jl @@ -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" @@ -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}) @@ -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}) @@ -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}) @@ -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}) @@ -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}) @@ -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 \ No newline at end of file