-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converted NEST by example to Jupyter notebook and updated for 2.12. #602
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ec7249c
Added IPython Notebook version of NEST by example.
hakonsbm 33953ed
Merge branch 'fix552' into nest_by_example
hakonsbm e75454e
Added table summarizing the network model.
hakonsbm 877fc90
Made adjustments for conversion to pdf.
hakonsbm 7978721
Fixed typo.
hakonsbm acf51e5
Merge remote-tracking branch 'github.com/nest/nest-simulator.git/mast…
hakonsbm 550f10c
Shortened the file name.
hakonsbm de2d095
Did some rephrasings and fixed some typos.
hakonsbm 091f47c
Cleaned up folder, fixed examples, added conversion script.
hakonsbm 4ac324e
Fixed some small typos.
hakonsbm d9e5917
Removed further files no longer needed after conversion to notebook
heplesser 320e692
Merge pull request #15 from heplesser/hakon_nest_by_example
hakonsbm 7b7e9de
Removed a reference to removed example scripts.
hakonsbm f18d721
Merge branch 'master' into nest_by_example
hakonsbm 477435c
Removed example script changed in master.
hakonsbm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2,437 changes: 2,437 additions & 0 deletions
2,437
...NEST by Example - An Introduction to the Neural Simulation Tool NEST Version 2.12.0.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
((*- extends 'article.tplx' -*)) | ||
|
||
((* set cell_style = 'style_python.tplx' *)) | ||
|
||
((* block header *)) | ||
((( super() ))) | ||
\usepackage{multicol} | ||
\usepackage{tabularx} | ||
\usepackage{multirow} | ||
\usepackage{colortbl} | ||
\usepackage{authblk} | ||
|
||
\newcommand{\hdr}[2]{% | ||
\textbf{\makebox[0pt]{\hspace{5mm}#1}\hspace{0.5\linewidth}\makebox[0pt][c]{#2}}% | ||
} | ||
\author[1]{Marc-Oliver Gewaltig} | ||
\author[2]{Abigail Morrison} | ||
\author[3, 2]{Hans Ekkehard Plesser} | ||
\affil[1]{Blue Brain Project, Ecole Polytechnique Federale de | ||
Lausanne, QI-J, Lausanne 1015, Switzerland} | ||
\affil[2]{Institute of Neuroscience and Medicine (INM-6) | ||
Functional Neural Circuits Group, J\"ulich Research Center, 52425 | ||
J\"ulich, Germany} | ||
\affil[3]{Dept of Mathematical Sciences and Technology, | ||
Norwegian University of Life Sciences, PO Box 5003, 1432 Aas, | ||
Norway} | ||
\date{} | ||
((* endblock header *)) | ||
|
||
|
||
((* block abstract *)) | ||
\abstract{The neural simulation tool NEST can simulate small to very | ||
large networks of point-neurons or neurons with a few | ||
compartments. In this chapter, we show by example how models are | ||
programmed and simulated in NEST. | ||
|
||
This document is based on a preprint version of | ||
\cite{Gewa:2012(533)} and has been updated for NEST 2.12. | ||
|
||
\begin{description} | ||
\item[Updated to 2.12.0] Håkon\ Mørk, December 2016 | ||
\item[Edited] Sacha J.\ van Albada, May 2015 | ||
\item[Updated to 2.6.0] Hans E.\ Plesser, December 2014 | ||
\item[Updated to 2.4.0] Hans E.\ Plesser, June 2014 | ||
\item[Updated to 2.2.2] Hans E.\ Plesser \& Marc-Oliver Gewaltig, | ||
December 2012 | ||
\end{description} | ||
} | ||
((* endblock abstract *)) | ||
|
||
((* block markdowncell *)) | ||
|
||
((*- if not cell.metadata.get('table', {}) and not cell.metadata.get('bib', {})-*)) | ||
((( super() ))) | ||
((*- endif -*)) | ||
((*- if cell.metadata.get('table', {}) -*)) | ||
|
||
\begin{table}[!htp] | ||
\noindent | ||
\caption{Summary of the network model.} | ||
\begin{tabularx}{0.95\linewidth}{|l|X|}\hline | ||
% | ||
\multicolumn{2}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{A}{Model Summary}}\\\hline | ||
\textbf{Populations} & Three: excitatory, inhibitory, external input \\\hline | ||
\textbf{Topology} & --- \\\hline | ||
\textbf{Connectivity} & Random convergent connections with probability | ||
$P=0.1$ and fixed in-degree of $C_E=P N_E$ and $C_I=P N_I$. | ||
\\\hline | ||
{\textbf{Neuron model}} & Leaky integrate-and-fire, fixed voltage | ||
threshold, fixed absolute refractory time (voltage clamp) \\\hline | ||
\textbf{Channel models} & --- \\\hline | ||
\textbf{Synapse model} & $\delta$-current inputs (discontinuous | ||
voltage jumps) \\\hline | ||
\textbf{Plasticity} & ---\\\hline | ||
\textbf{Input} & Independent fixed-rate Poisson spike trains to all | ||
neurons \\\hline | ||
\textbf{Measurements} & Spike activity \\\hline | ||
\end{tabularx} | ||
|
||
\vspace{2ex} | ||
|
||
\noindent\begin{tabularx}{0.95\linewidth}{|l|l|X|}\hline | ||
\multicolumn{3}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{B}{Populations}}\\\hline | ||
\textbf{Name} & \textbf{Elements} & \textbf{Size} \\\hline | ||
E & Iaf neuron & $N_{\text{E}} = 4N_{\text{I}}$ \\\hline | ||
I & Iaf neuron & $N_{\text{I}}$ \\\hline | ||
E$_{\text{ext}}$ & Poisson generator & $1$ \\\hline | ||
\end{tabularx} | ||
|
||
\vspace{2ex} | ||
|
||
\noindent\begin{tabularx}{0.95\linewidth}{|l|l|l|X|}\hline | ||
\multicolumn{4}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{C}{Connectivity}}\\\hline | ||
\textbf{Name} & \textbf{Source} & \textbf{Target} & \textbf{Pattern} \\\hline | ||
EE & E & E & | ||
Random convergent $C_{\text{E}}\rightarrow 1$, weight $J$, delay $D$ \\\hline | ||
IE & E & I & | ||
Random convergent $C_{\text{E}}\rightarrow 1$, weight $J$, delay $D$ \\\hline | ||
EI & I & E & | ||
Random convergent $C_{\text{I}}\rightarrow 1$, weight $-gJ$, delay $D$ \\\hline | ||
II & I & I & | ||
Random convergent $C_{\text{I}}\rightarrow 1$, weight $-gJ$, delay $D$ \\\hline | ||
Ext& E$_{\text{ext}}$ & E $\cup$ I & | ||
Divergent $1 \rightarrow N_{\text{E}} + N_{\text{I}}$, weight $J$, delay $D$ \\\hline | ||
\end{tabularx} | ||
|
||
\vspace{2ex} | ||
|
||
\noindent\begin{tabularx}{0.95\linewidth}{|l|X|}\hline | ||
\multicolumn{2}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{D}{Neuron and Synapse Model}}\\\hline | ||
\textbf{Name} & Iaf neuron \\\hline | ||
\textbf{Type} & Leaky integrate-and-fire, $\delta$-current input\\\hline | ||
\raisebox{-4.5ex}{\parbox{5em}{\textbf{Sub\-threshold dynamics}}} & | ||
\rule{1em}{0em}\vspace*{-3.5ex} | ||
\begin{equation*} | ||
\begin{array}{r@{\;=\;}ll} | ||
\tau_m \dot{V_m}(t) & -V_m(t) + R_m I(t) &\text{if not refractory}\; (t > t^*+\tau_{\text{rp}}) \\[1ex] | ||
V_m(t) & V_{\text{r}} & \text{while refractory}\; (t^*<t\leq t^*+\tau_{\text{rp}}) \\[2ex] | ||
I(t) & \multicolumn{2}{l}{\frac{\tau_m}{R_m} \sum_{\tilde{t}} w | ||
\delta(t-(\tilde{t}+D))} | ||
\end{array} | ||
\end{equation*} | ||
\vspace*{-2.5ex}\rule{1em}{0em} | ||
\\\hline | ||
\multirow{3}{*}{\textbf{Spiking}} & | ||
If $V_m(t-)<V_{\theta} \wedge V_m(t+)\geq V_{\theta}$ | ||
\vspace*{-1ex} | ||
\begin{enumerate}\setlength{\itemsep}{-0.5ex} | ||
\item set $t^* = t$ | ||
\item emit spike with time-stamp $t^*$ | ||
\end{enumerate} | ||
\vspace*{-4ex}\rule{1em}{0em} | ||
\\\hline | ||
\end{tabularx} | ||
|
||
\vspace{2ex} | ||
|
||
\noindent\begin{tabularx}{0.95\linewidth}{|l|X|}\hline | ||
\multicolumn{2}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{E}{Input}}\\\hline | ||
\textbf{Type} & \textbf{Description} \\\hline | ||
{Poisson generator} & Fixed rate $\nu_{\text{ext}} \cdot C_{\text{E}}$, | ||
one generator providing independent input to each target neuron\\\hline | ||
\end{tabularx} | ||
|
||
\vspace{2ex} | ||
|
||
\noindent\begin{tabularx}{0.95\linewidth}{|X|}\hline | ||
\multicolumn{1}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{F}{Measurements}}\\\hline | ||
Spike activity as raster plots, rates and ``global frequencies'', no | ||
details given \\\hline | ||
\end{tabularx} | ||
\end{table} | ||
\begin{table}[!htp] | ||
\noindent | ||
\caption{\label{nest:tab:Brunelparams} Summary of the network | ||
parameters for the model.} | ||
\begin{tabularx}{0.95\linewidth}{Xr} | ||
% | ||
\multicolumn{2}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{G}{Network | ||
Parameters}}\\ | ||
\textbf{Parameter} & \textbf{Value}\\\hline | ||
Number of excitatory neurons $N_E$ & 8000 \\ | ||
Number of inhibitory neurons $N_I$ & 2000\\ | ||
Excitatory synapses per neuron $C_E$ & 800 \\ | ||
Inhibitory synapses per neuron $C_I$ & 200 \\ | ||
\hline | ||
\end{tabularx} | ||
\begin{tabularx}{0.95\linewidth}{Xr} | ||
\multicolumn{2}{|l|}{\color{white}\cellcolor[gray]{0.0}\hdr{H}{Neuron | ||
Parameters}}\\ | ||
\textbf{Parameter} & \textbf{Value}\\\hline | ||
Membrane time constant $\tau_m$ & 20 ms\\ | ||
Refractory period $\tau_{\text{rp}}$ & 2 ms\\ | ||
Firing threshold $V_{\text{th}}$ & 20 mV\\ | ||
Membrane capacitance $C_m$ & 1 pF\\ | ||
Resting potential $V_E$ & 0 mV\\ | ||
Reset potential $V_{\text{reset}}$ & 10 mV\\ | ||
Excitatory PSP amplitude $J_E$ & 0.1 mV\\ | ||
Inhibitory PSP amplitude $J_I$ & $-0.5$ mV\\ | ||
Synaptic delay $D$ & 1.5 ms \\ | ||
Background rate $\eta$ & 2.0 \\ | ||
\hline | ||
\end{tabularx} | ||
\end{table} | ||
((*- endif -*)) | ||
((* endblock markdowncell *)) | ||
|
||
((* block bibliography *)) | ||
\bibliography{NEST_by_Example} | ||
\bibliographystyle{apalike} | ||
((* endblock bibliography *)) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add here "Converted to Jupyter Notebook and updated ..."