diff --git a/multi-area-model.ipynb b/multi-area-model.ipynb index 765111899f6ff1ab91d8a16bcea30fd4976735d1..f7ba4974479438079c16caf1b515c0fd7b507972 100644 --- a/multi-area-model.ipynb +++ b/multi-area-model.ipynb @@ -8,6 +8,14 @@ "# Down-scaled multi-area model" ] }, + { + "cell_type": "markdown", + "id": "3e163b35-5330-48ca-8c7e-9e0a884520ca", + "metadata": {}, + "source": [ + "## Import dependencies" + ] + }, { "cell_type": "code", "execution_count": null, @@ -33,10 +41,10 @@ }, { "cell_type": "markdown", - "id": "0c6b6a3c", + "id": "98555af1-a5c5-4db6-85dc-6d07e40f38cc", "metadata": {}, "source": [ - "Create config file." + "## Create config file" ] }, { @@ -66,16 +74,21 @@ "from multiarea_model import MultiAreaModel" ] }, + { + "cell_type": "markdown", + "id": "df83f5ea-1c4b-44d3-9926-01786aa46e14", + "metadata": {}, + "source": [ + "## Specify paramters of model" + ] + }, { "cell_type": "markdown", "id": "2cedd26b", "metadata": {}, "source": [ - "Neurons and indegrees are both scaled down to 0.5%.\n", - "Can usually be simulated on a local machine.\n", - "\n", - "**Warning: This will not yield reasonable dynamical results from the\n", - "network and is only meant to demonstrate the simulation workflow.**" + "### 1. Scaling parameter\n", + "Neurons and indegrees are both scaled down to 0.5%, where the model can usually be simulated on a local machine.<br> **Warning: This will not yield reasonable dynamical results from the network and is only meant to demonstrate the simulation workflow.**" ] }, { @@ -93,7 +106,7 @@ "id": "d53f1eab", "metadata": {}, "source": [ - "Specify model and simulation parameters." + "### 2. Model and simulation parameters" ] }, { @@ -119,8 +132,24 @@ " 'fullscale_rates': 'tests/fullscale_rates.json',\n", " 'input_params': input_params,\n", " 'connection_params': conn_params,\n", - " 'neuron_params': neuron_params}\n", - "\n", + " 'neuron_params': neuron_params}" + ] + }, + { + "cell_type": "markdown", + "id": "a0730f70-ed9b-4664-b677-3dda965a01ef", + "metadata": {}, + "source": [ + "### 3. Simulation paramters" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "21484ed3-295f-4d06-b757-2969aac429a4", + "metadata": {}, + "outputs": [], + "source": [ "sim_params = {'t_sim': 2000.,\n", " 'num_processes': 1,\n", " 'local_num_threads': 1,\n", @@ -134,7 +163,7 @@ "id": "de4a6703", "metadata": {}, "source": [ - "Instantiate a multi-area model, predict firing rates from theroy, and run the simulation. " + "## Instantiate a multi-area model, predict firing rates from theroy " ] }, { @@ -162,6 +191,14 @@ " \"rate of {0:.3f} spikes/s across all populations.\".format(np.mean(r[:, -1])))" ] }, + { + "cell_type": "markdown", + "id": "0c1cad59-81d0-4e24-ac33-13c4ca8c6dec", + "metadata": {}, + "source": [ + "## Run the simulation" + ] + }, { "cell_type": "code", "execution_count": null, @@ -172,12 +209,20 @@ "M.simulation.simulate()" ] }, + { + "cell_type": "markdown", + "id": "9be9287d-4891-4b4b-bd19-cfc2ebed02ac", + "metadata": {}, + "source": [ + "## Load and process simulation results data" + ] + }, { "cell_type": "markdown", "id": "8726a93d", "metadata": {}, "source": [ - "Load spike data." + "### 1. Load spike data" ] }, { @@ -195,7 +240,7 @@ "id": "8793e033", "metadata": {}, "source": [ - "Compute instantaneous rate per neuron across all populations." + "### 2. Compute instantaneous rate per neuron across all populations" ] }, { @@ -209,12 +254,20 @@ "rate = spikecount / M.simulation.params['dt'] * 1e3 / np.sum(M.N_vec)" ] }, + { + "cell_type": "markdown", + "id": "57ff902c-d6ce-4f96-9e4f-8e3e7166ab66", + "metadata": {}, + "source": [ + "## Simulation results visualization" + ] + }, { "cell_type": "markdown", "id": "38ddd973", "metadata": {}, "source": [ - "Plot instantaneous and mean rate." + "### 1. Instantaneous and mean rate" ] }, { @@ -238,7 +291,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -252,7 +305,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.8.10" } }, "nbformat": 4,