Skip to content
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

Connectivity #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions demos/exploring_the_epileptor_codim_3_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -37,7 +37,9 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"Epileptorcd3 = EpileptorCodim3()"
Expand Down Expand Up @@ -30094,6 +30096,41 @@
"show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Connectivity\n",
"\n",
"The EpileptorCodim3 model comes with permittivity coupling. This means that the fast variable x of one node feeds into the slow variable z of a connected node. This is done by taking the difference between the variable x of connected node, multiplying this by a global coupling strenght Ks and adding this to the equation of zdot. The value of Ks is by default 0, no coupling, but a standard value for coupling is 0.3"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sim = simulator.Simulator(\n",
" model=EpileptorCodim3(Ks=0.3),\n",
" connectivity=connectivity.Connectivity(load_default=True),\n",
" coupling=coupling.Linear(a=0.0152),\n",
" integrator=integrators.HeunDeterministic(dt=2 ** -4),\n",
" monitors=monitors.TemporalAverage(period=2 ** -2),\n",
" simulation_length=2 ** 12,\n",
").configure()\n",
"\n",
"(tavg_time, tavg_data), = sim.run()\n",
"\n",
"plt.figure(figsize=(10,10))\n",
"plt.plot(tavg_time, tavg_data[:, 0, :, 0]/2 + numpy.r_[:76], 'r',label='x')\n",
"xlabel('Time (ms)')\n",
"ylabel('nodes')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down