Skip to content

Commit 29a6442

Browse files
Merge pull request #327 from SciML/rebuild/6ce533ee
Rebuild models/08-spiking_neural_systems.jmd
2 parents 57267c8 + aee14b6 commit 29a6442

20 files changed

+264
-166
lines changed

html/models/08-spiking_neural_systems.html

Lines changed: 110 additions & 63 deletions
Large diffs are not rendered by default.

markdown/models/08-spiking_neural_systems.md

Lines changed: 138 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@ cb = CallbackSet(current_step,threshold)
8585
````
8686
DiffEqBase.CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCall
8787
backs.var"#61#64"{Array{Int64,1}},DiffEqCallbacks.var"#62#65"{Main.##WeaveS
88-
andBox#309.var"#1#2"},DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase.INITIAL
89-
IZE_DEFAULT),Bool,Array{Int64,1},Main.##WeaveSandBox#309.var"#1#2"}},DiffEq
90-
Base.DiscreteCallback{typeof(Main.##WeaveSandBox#309.thr),typeof(Main.##Wea
91-
veSandBox#309.reset!),typeof(DiffEqBase.INITIALIZE_DEFAULT)}}}((), (DiffEqB
88+
andBox#337.var"#1#2"},DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase.INITIAL
89+
IZE_DEFAULT),Bool,Array{Int64,1},Main.##WeaveSandBox#337.var"#1#2"}},DiffEq
90+
Base.DiscreteCallback{typeof(Main.##WeaveSandBox#337.thr),typeof(Main.##Wea
91+
veSandBox#337.reset!),typeof(DiffEqBase.INITIALIZE_DEFAULT)}}}((), (DiffEqB
9292
ase.DiscreteCallback{DiffEqCallbacks.var"#61#64"{Array{Int64,1}},DiffEqCall
93-
backs.var"#62#65"{Main.##WeaveSandBox#309.var"#1#2"},DiffEqCallbacks.var"#6
93+
backs.var"#62#65"{Main.##WeaveSandBox#337.var"#1#2"},DiffEqCallbacks.var"#6
9494
3#66"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,Array{Int64,1},Main.##Weav
95-
eSandBox#309.var"#1#2"}}(DiffEqCallbacks.var"#61#64"{Array{Int64,1}}([2, 15
96-
]), DiffEqCallbacks.var"#62#65"{Main.##WeaveSandBox#309.var"#1#2"}(Main.##W
97-
eaveSandBox#309.var"#1#2"()), DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase
98-
.INITIALIZE_DEFAULT),Bool,Array{Int64,1},Main.##WeaveSandBox#309.var"#1#2"}
99-
(DiffEqBase.INITIALIZE_DEFAULT, true, [2, 15], Main.##WeaveSandBox#309.var"
95+
eSandBox#337.var"#1#2"}}(DiffEqCallbacks.var"#61#64"{Array{Int64,1}}([2, 15
96+
]), DiffEqCallbacks.var"#62#65"{Main.##WeaveSandBox#337.var"#1#2"}(Main.##W
97+
eaveSandBox#337.var"#1#2"()), DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase
98+
.INITIALIZE_DEFAULT),Bool,Array{Int64,1},Main.##WeaveSandBox#337.var"#1#2"}
99+
(DiffEqBase.INITIALIZE_DEFAULT, true, [2, 15], Main.##WeaveSandBox#337.var"
100100
#1#2"()), Bool[1, 1]), DiffEqBase.DiscreteCallback{typeof(Main.##WeaveSandB
101-
ox#309.thr),typeof(Main.##WeaveSandBox#309.reset!),typeof(DiffEqBase.INITIA
102-
LIZE_DEFAULT)}(Main.##WeaveSandBox#309.thr, Main.##WeaveSandBox#309.reset!,
101+
ox#337.thr),typeof(Main.##WeaveSandBox#337.reset!),typeof(DiffEqBase.INITIA
102+
LIZE_DEFAULT)}(Main.##WeaveSandBox#337.thr, Main.##WeaveSandBox#337.reset!,
103103
DiffEqBase.INITIALIZE_DEFAULT, Bool[1, 1])))
104104
````
105105

@@ -139,7 +139,50 @@ sol = solve(prob)
139139

140140

141141
````
142-
Error: UndefVarError: top not defined
142+
retcode: Success
143+
Interpolation: automatic order switching interpolation
144+
t: 153-element Array{Float64,1}:
145+
0.0
146+
9.999999999999999e-5
147+
0.0010999999999999998
148+
0.011099999999999997
149+
0.11109999999999996
150+
1.1110999999999995
151+
2.0
152+
2.0
153+
2.6300346673750097
154+
2.9226049547524595
155+
156+
38.34157935968204
157+
38.78215179003683
158+
38.78215179003683
159+
39.222724173706894
160+
39.222724173706894
161+
39.6632965982261
162+
39.6632965982261
163+
40.0
164+
40.0
165+
u: 153-element Array{Float64,1}:
166+
-75.0
167+
-75.0
168+
-75.0
169+
-75.0
170+
-75.0
171+
-75.0
172+
-75.0
173+
-75.0
174+
-59.978080111690375
175+
-57.32999167299642
176+
177+
-75.0
178+
-50.40489310815222
179+
-75.0
180+
-50.404894730067554
181+
-75.0
182+
-50.404893310891545
183+
-75.0
184+
-54.419318668318546
185+
-75.0
143186
````
144187

145188

@@ -154,11 +197,7 @@ plot(sol)
154197
````
155198

156199

157-
````
158-
Error: UndefVarError: sol not defined
159-
````
160-
161-
200+
![](figures/08-spiking_neural_systems_5_1.png)
162201

163202

164203

@@ -211,22 +250,22 @@ cb = CallbackSet(current_step,threshold)
211250

212251
````
213252
DiffEqBase.CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCall
214-
backs.var"#61#64"{Int64},DiffEqCallbacks.var"#62#65"{Main.##WeaveSandBox#30
215-
9.var"#3#4"},DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase.INITIALIZE_DEFAU
216-
LT),Bool,Int64,Main.##WeaveSandBox#309.var"#3#4"}},DiffEqBase.DiscreteCallb
217-
ack{typeof(Main.##WeaveSandBox#309.thr),typeof(Main.##WeaveSandBox#309.rese
253+
backs.var"#61#64"{Int64},DiffEqCallbacks.var"#62#65"{Main.##WeaveSandBox#33
254+
7.var"#3#4"},DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase.INITIALIZE_DEFAU
255+
LT),Bool,Int64,Main.##WeaveSandBox#337.var"#3#4"}},DiffEqBase.DiscreteCallb
256+
ack{typeof(Main.##WeaveSandBox#337.thr),typeof(Main.##WeaveSandBox#337.rese
218257
t!),typeof(DiffEqBase.INITIALIZE_DEFAULT)}}}((), (DiffEqBase.DiscreteCallba
219258
ck{DiffEqCallbacks.var"#61#64"{Int64},DiffEqCallbacks.var"#62#65"{Main.##We
220-
aveSandBox#309.var"#3#4"},DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase.INI
221-
TIALIZE_DEFAULT),Bool,Int64,Main.##WeaveSandBox#309.var"#3#4"}}(DiffEqCallb
259+
aveSandBox#337.var"#3#4"},DiffEqCallbacks.var"#63#66"{typeof(DiffEqBase.INI
260+
TIALIZE_DEFAULT),Bool,Int64,Main.##WeaveSandBox#337.var"#3#4"}}(DiffEqCallb
222261
acks.var"#61#64"{Int64}(50), DiffEqCallbacks.var"#62#65"{Main.##WeaveSandBo
223-
x#309.var"#3#4"}(Main.##WeaveSandBox#309.var"#3#4"()), DiffEqCallbacks.var"
262+
x#337.var"#3#4"}(Main.##WeaveSandBox#337.var"#3#4"()), DiffEqCallbacks.var"
224263
#63#66"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,Int64,Main.##WeaveSandBo
225-
x#309.var"#3#4"}(DiffEqBase.INITIALIZE_DEFAULT, true, 50, Main.##WeaveSandB
226-
ox#309.var"#3#4"()), Bool[1, 1]), DiffEqBase.DiscreteCallback{typeof(Main.#
227-
#WeaveSandBox#309.thr),typeof(Main.##WeaveSandBox#309.reset!),typeof(DiffEq
228-
Base.INITIALIZE_DEFAULT)}(Main.##WeaveSandBox#309.thr, Main.##WeaveSandBox#
229-
309.reset!, DiffEqBase.INITIALIZE_DEFAULT, Bool[1, 1])))
264+
x#337.var"#3#4"}(DiffEqBase.INITIALIZE_DEFAULT, true, 50, Main.##WeaveSandB
265+
ox#337.var"#3#4"()), Bool[1, 1]), DiffEqBase.DiscreteCallback{typeof(Main.#
266+
#WeaveSandBox#337.thr),typeof(Main.##WeaveSandBox#337.reset!),typeof(DiffEq
267+
Base.INITIALIZE_DEFAULT)}(Main.##WeaveSandBox#337.thr, Main.##WeaveSandBox#
268+
337.reset!, DiffEqBase.INITIALIZE_DEFAULT, Bool[1, 1])))
230269
````
231270

232271

@@ -260,11 +299,7 @@ plot(sol, vars=1)
260299
````
261300

262301

263-
````
264-
Error: UndefVarError: top not defined
265-
````
266-
267-
302+
![](figures/08-spiking_neural_systems_9_1.png)
268303

269304

270305

@@ -276,11 +311,7 @@ plot(sol, vars=2)
276311
````
277312

278313

279-
````
280-
Error: UndefVarError: sol not defined
281-
````
282-
283-
314+
![](figures/08-spiking_neural_systems_10_1.png)
284315

285316

286317

@@ -298,11 +329,7 @@ plot(sol, vars=1)
298329
````
299330

300331

301-
````
302-
Error: UndefVarError: top not defined
303-
````
304-
305-
332+
![](figures/08-spiking_neural_systems_11_1.png)
306333

307334

308335

@@ -388,11 +415,7 @@ plot(sol, vars=1)
388415
````
389416

390417

391-
````
392-
Error: UndefVarError: top not defined
393-
````
394-
395-
418+
![](figures/08-spiking_neural_systems_14_1.png)
396419

397420

398421

@@ -404,11 +427,7 @@ plot(sol, vars=[2,3,4], tspan=(105.0,130.0))
404427
````
405428

406429

407-
````
408-
Error: UndefVarError: sol not defined
409-
````
410-
411-
430+
![](figures/08-spiking_neural_systems_15_1.png)
412431

413432

414433

@@ -466,11 +485,7 @@ plot(sol, vars=1)
466485
````
467486

468487

469-
````
470-
Error: UndefVarError: top not defined
471-
````
472-
473-
488+
![](figures/08-spiking_neural_systems_17_1.png)
474489

475490

476491

@@ -486,11 +501,7 @@ plot!(sol, vars=1)
486501
````
487502

488503

489-
````
490-
Error: UndefVarError: top not defined
491-
````
492-
493-
504+
![](figures/08-spiking_neural_systems_18_1.png)
494505

495506

496507

@@ -534,23 +545,15 @@ plot(sol, vars=1)
534545
````
535546

536547

537-
````
538-
Error: UndefVarError: top not defined
539-
````
540-
541-
548+
![](figures/08-spiking_neural_systems_19_1.png)
542549

543550
````julia
544551

545552
plot(sol, vars=7)
546553
````
547554

548555

549-
````
550-
Error: UndefVarError: sol not defined
551-
````
552-
553-
556+
![](figures/08-spiking_neural_systems_20_1.png)
554557

555558

556559

@@ -562,11 +565,7 @@ plot(sol, vars=[5,6])
562565
````
563566

564567

565-
````
566-
Error: UndefVarError: sol not defined
567-
````
568-
569-
568+
![](figures/08-spiking_neural_systems_21_1.png)
570569

571570

572571

@@ -585,23 +584,15 @@ plot(sol, vars=7)
585584
````
586585

587586

588-
````
589-
Error: UndefVarError: top not defined
590-
````
591-
592-
587+
![](figures/08-spiking_neural_systems_22_1.png)
593588

594589
````julia
595590

596591
plot(sol, vars=[5,6])
597592
````
598593

599594

600-
````
601-
Error: UndefVarError: sol not defined
602-
````
603-
604-
595+
![](figures/08-spiking_neural_systems_23_1.png)
605596

606597

607598

@@ -620,27 +611,74 @@ plot(sol, vars=7)
620611
````
621612

622613

623-
````
624-
Error: UndefVarError: top not defined
625-
````
626-
627-
614+
![](figures/08-spiking_neural_systems_24_1.png)
628615

629616
````julia
630617

631618
plot(sol, vars=[5,6])
632619
````
633620

634621

635-
````
636-
Error: UndefVarError: sol not defined
637-
````
638-
639-
622+
![](figures/08-spiking_neural_systems_25_1.png)
640623

641624

642625

643626
Just changing those two time constants has changed the dynamics to short-term depression. This is still frequency dependent. Changing these parameters can generate a variety of different short-term dynamics.
644627

645628
## Summary
646629
That's it for now. Thanks for making it this far. If you want to learn more about neuronal dynamics, [this is a great resource](https://neuronaldynamics.epfl.ch/online/index.html). If you want to learn more about Julia check out the [official website](https://julialang.org/) and to learn more about the DifferentialEquations package you are in the right place, because this chapter is part of a [larger tutorial series about just that](https://github.com/SciML/SciMLTutorials.jl).
630+
631+
632+
## Appendix
633+
634+
This tutorial is part of the SciMLTutorials.jl repository, found at: <https://github.com/SciML/SciMLTutorials.jl>.
635+
For more information on doing scientific machine learning (SciML) with open source software, check out <https://sciml.ai/>.
636+
637+
To locally run this tutorial, do the following commands:
638+
```
639+
using SciMLTutorials
640+
SciMLTutorials.weave_file("models","08-spiking_neural_systems.jmd")
641+
```
642+
643+
Computer Information:
644+
```
645+
Julia Version 1.4.2
646+
Commit 44fa15b150* (2020-05-23 18:35 UTC)
647+
Platform Info:
648+
OS: Linux (x86_64-pc-linux-gnu)
649+
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
650+
WORD_SIZE: 64
651+
LIBM: libopenlibm
652+
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
653+
Environment:
654+
JULIA_LOAD_PATH = /builds/JuliaGPU/DiffEqTutorials.jl:
655+
JULIA_DEPOT_PATH = /builds/JuliaGPU/DiffEqTutorials.jl/.julia
656+
JULIA_CUDA_MEMORY_LIMIT = 2147483648
657+
JULIA_NUM_THREADS = 8
658+
659+
```
660+
661+
Package Information:
662+
663+
```
664+
Status `/builds/JuliaGPU/DiffEqTutorials.jl/tutorials/models/Project.toml`
665+
[479239e8-5488-4da2-87a7-35f2df7eef83] Catalyst 5.0.0
666+
[459566f4-90b8-5000-8ac3-15dfb0a30def] DiffEqCallbacks 2.14.1
667+
[f3b72e0c-5b89-59e1-b016-84e28bfd966d] DiffEqDevTools 2.27.0
668+
[055956cb-9e8b-5191-98cc-73ae4a59e68a] DiffEqPhysics 3.6.0
669+
[0c46a032-eb83-5123-abaf-570d42b7fbaa] DifferentialEquations 6.15.0
670+
[31c24e10-a181-5473-b8eb-7969acd0382f] Distributions 0.23.12
671+
[587475ba-b771-5e3f-ad9e-33799f191a9c] Flux 0.11.1
672+
[f6369f11-7733-5829-9624-2563aa707210] ForwardDiff 0.10.12
673+
[23fbe1c1-3f47-55db-b15f-69d7ec21a316] Latexify 0.14.0
674+
[961ee093-0014-501f-94e3-6117800e7a78] ModelingToolkit 3.20.0
675+
[2774e3e8-f4cf-5e23-947b-6d7e65073b56] NLsolve 4.4.1
676+
[315f7962-48a3-4962-8226-d0f33b1235f0] NeuralPDE 2.3.0
677+
[429524aa-4258-5aef-a3af-852621145aeb] Optim 1.2.0
678+
[1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] OrdinaryDiffEq 5.42.8
679+
[91a5bcdd-55d7-5caf-9e0b-520d859cae80] Plots 1.6.5
680+
[731186ca-8d62-57ce-b412-fbd966d074cd] RecursiveArrayTools 2.7.0
681+
[789caeaf-c7a9-5a7d-9973-96adeb23e2a0] StochasticDiffEq 6.26.0
682+
[37e2e46d-f89d-539d-b4ee-838fcccc9c8e] LinearAlgebra
683+
[2f01184e-e22b-5df5-ae63-d93ebab69eaf] SparseArrays
684+
```
-18 Bytes
Loading
-73 Bytes
Loading
-156 Bytes
Loading
-202 Bytes
Loading
15.4 KB
Loading
14 KB
Loading
19.8 KB
Loading
22.6 KB
Loading

0 commit comments

Comments
 (0)