Skip to content

Commit

Permalink
replace all links to go to the new website
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Nov 13, 2024
1 parent 8970562 commit 78895af
Show file tree
Hide file tree
Showing 10 changed files with 360 additions and 396 deletions.
90 changes: 49 additions & 41 deletions docs/tutorials/01_morph_neurons.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"cells": [
{
"cell_type": "markdown",
"id": "9ad6d0c2",
"id": "e32c96c4",
"metadata": {},
"source": [
"# Basics of Jaxley"
]
},
{
"cell_type": "markdown",
"id": "b57a89e0",
"id": "4a5ed7b3",
"metadata": {},
"source": [
"In this tutorial, you will learn how to:\n",
Expand Down Expand Up @@ -58,7 +58,7 @@
},
{
"cell_type": "markdown",
"id": "f009b964",
"id": "bf258599",
"metadata": {},
"source": [
"First, we import the relevant libraries:"
Expand All @@ -67,7 +67,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "ea59ef44",
"id": "520ccc1e",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -88,15 +88,15 @@
},
{
"cell_type": "markdown",
"id": "12dcbcb1",
"id": "fd9ebcaf",
"metadata": {},
"source": [
"We will now build our first cell in `Jaxley`. You have two options to do this: you can either build a cell bottom-up by defining the morphology yourselve, or you can [load cells from SWC files]().\n"
"We will now build our first cell in `Jaxley`. You have two options to do this: you can either build a cell bottom-up by defining the morphology yourselve, or you can [load cells from SWC files](https://jaxleyverse.github.io/jaxley/latest/tutorial/00_jaxley_api.ipynb/).\n"
]
},
{
"cell_type": "markdown",
"id": "6da9d36f",
"id": "721b28e3",
"metadata": {},
"source": [
"### Define the cell from scratch\n",
Expand All @@ -107,7 +107,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "9b6d4f69",
"id": "2045c204",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -117,7 +117,7 @@
},
{
"cell_type": "markdown",
"id": "06840750",
"id": "c7174009",
"metadata": {},
"source": [
"Next, we can assemble branches into a cell. To do so, we have to define for each branch what its parent branch is. A `-1` entry means that this branch does not have a parent."
Expand All @@ -126,7 +126,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "cc51d8ca",
"id": "36b22f57",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -136,15 +136,15 @@
},
{
"cell_type": "markdown",
"id": "1d86a82e",
"id": "fd133c02",
"metadata": {},
"source": [
"To learn more about `Compartment`s, `Branch`es, and `Cell`s, see [this tutorial](More backgrond on compartments, branches, as and indexing like `cell.branch(0)` is in [this tutorial](https://jaxleyverse.github.io/jaxley/latest/tutorial/00_jaxley_api.ipynb/)."
]
},
{
"cell_type": "markdown",
"id": "b056433c",
"id": "dd7de7ed",
"metadata": {},
"source": [
"### Read the cell from an SWC file\n",
Expand All @@ -153,20 +153,20 @@
"\n",
"```cell = jx.read_swc(fname, nseg=4)```\n",
"\n",
"Details on handling SWC files can be found in [this tutorial]()."
"Details on handling SWC files can be found in [this tutorial](https://jaxley.readthedocs.io/en/latest/tutorials/08_importing_morphologies.html)."
]
},
{
"cell_type": "markdown",
"id": "1a6085f9",
"id": "04b2f9f6",
"metadata": {},
"source": [
"### Visualize the cells"
]
},
{
"cell_type": "markdown",
"id": "8c91fbbd",
"id": "8d417e50",
"metadata": {},
"source": [
"Cells can be visualized as follows:"
Expand All @@ -175,7 +175,7 @@
{
"cell_type": "code",
"execution_count": 22,
"id": "2632e59c",
"id": "26161684",
"metadata": {},
"outputs": [
{
Expand All @@ -198,7 +198,7 @@
},
{
"cell_type": "markdown",
"id": "e9510bea",
"id": "e02e3f6d",
"metadata": {},
"source": [
"### Insert mechanisms\n",
Expand All @@ -209,7 +209,7 @@
{
"cell_type": "code",
"execution_count": 23,
"id": "f61e1cc6",
"id": "a43f666c",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -220,7 +220,7 @@
},
{
"cell_type": "markdown",
"id": "3f383712",
"id": "cc80bbd5",
"metadata": {},
"source": [
"Once the cell is created, we can inspect its `.nodes` attribute which lists all properties of the cell:"
Expand All @@ -229,7 +229,7 @@
{
"cell_type": "code",
"execution_count": 24,
"id": "0a3218e8",
"id": "a64d27e7",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -585,7 +585,7 @@
},
{
"cell_type": "markdown",
"id": "96a6d36a",
"id": "17c3f945",
"metadata": {},
"source": [
"You can also inspect just parts of the `cell`, for example its 1st branch:"
Expand All @@ -594,7 +594,7 @@
{
"cell_type": "code",
"execution_count": 27,
"id": "0325df59",
"id": "79e54e48",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -726,7 +726,7 @@
},
{
"cell_type": "markdown",
"id": "e6e63d2d",
"id": "f2715e8e",
"metadata": {},
"source": [
"The easiest way to know which branch is the 1st branch (or, e.g., the zero-eth compartment of the 1st branch) is to plot it in a different color:"
Expand All @@ -735,7 +735,7 @@
{
"cell_type": "code",
"execution_count": 28,
"id": "4e43a860",
"id": "adfe9b88",
"metadata": {},
"outputs": [
{
Expand All @@ -758,15 +758,15 @@
},
{
"cell_type": "markdown",
"id": "e026d48d",
"id": "3ed619f3",
"metadata": {},
"source": [
"More background and features on indexing as `cell.branch(0)` is in [this tutorial](https://jaxleyverse.github.io/jaxley/latest/tutorial/00_jaxley_api.ipynb/)."
]
},
{
"cell_type": "markdown",
"id": "679dff5f",
"id": "addd0f81",
"metadata": {},
"source": [
"### Stimulate the cell\n",
Expand All @@ -777,7 +777,7 @@
{
"cell_type": "code",
"execution_count": 75,
"id": "21458488",
"id": "acb04249",
"metadata": {},
"outputs": [
{
Expand All @@ -803,7 +803,7 @@
},
{
"cell_type": "markdown",
"id": "7d6504b6",
"id": "4243feae",
"metadata": {},
"source": [
"We then stimulate one of the compartments of the cell with this step current:"
Expand All @@ -812,7 +812,7 @@
{
"cell_type": "code",
"execution_count": 76,
"id": "6e858f6f",
"id": "c672f42f",
"metadata": {},
"outputs": [
{
Expand All @@ -830,15 +830,15 @@
},
{
"cell_type": "markdown",
"id": "388bfe51",
"id": "0c2a5d05",
"metadata": {},
"source": [
"### Define recordings"
]
},
{
"cell_type": "markdown",
"id": "5d9ce1fb",
"id": "1c8fc290",
"metadata": {},
"source": [
"Next, you have to define where to record the voltage. In this case, we will record the voltage at two locations:"
Expand All @@ -847,7 +847,7 @@
{
"cell_type": "code",
"execution_count": 77,
"id": "42e73486",
"id": "22f0ba99",
"metadata": {},
"outputs": [
{
Expand All @@ -867,7 +867,7 @@
},
{
"cell_type": "markdown",
"id": "4be45797",
"id": "ad2b612f",
"metadata": {},
"source": [
"We can again visualize these locations to understand where we inserted recordings:"
Expand All @@ -876,7 +876,7 @@
{
"cell_type": "code",
"execution_count": 78,
"id": "9ec232c0",
"id": "5d496bdc",
"metadata": {},
"outputs": [
{
Expand All @@ -899,7 +899,7 @@
},
{
"cell_type": "markdown",
"id": "15b39d1b",
"id": "6fc954c2",
"metadata": {},
"source": [
"### Simulate the cell response\n",
Expand All @@ -910,7 +910,7 @@
{
"cell_type": "code",
"execution_count": 79,
"id": "054bb084",
"id": "3f2b6e72",
"metadata": {},
"outputs": [
{
Expand All @@ -928,7 +928,7 @@
},
{
"cell_type": "markdown",
"id": "d160c7b7",
"id": "f7505714",
"metadata": {},
"source": [
"The `jx.integrate` function returns an array of shape `(num_recordings, num_timepoints). In our case, we inserted `2` recordings and we simulated for 10ms at a 0.025 time step, which leads to 402 time steps.\n",
Expand All @@ -939,7 +939,7 @@
{
"cell_type": "code",
"execution_count": 80,
"id": "40617008",
"id": "1da5c31a",
"metadata": {},
"outputs": [
{
Expand All @@ -961,19 +961,27 @@
},
{
"cell_type": "markdown",
"id": "af620281",
"id": "5cb35db9",
"metadata": {},
"source": [
"At the location of the first recording (in blue) the cell spiked, whereas at the second recording, it did not. This makes sense because we only inserted sodium and potassium channels into the first branch, but not in the entire cell."
]
},
{
"cell_type": "markdown",
"id": "b06fb180",
"id": "fc95bb4f",
"metadata": {},
"source": [
"Congrats! You have just run your first morphologically detailed neuron simulation in `Jaxley`. We suggest to continue by learning how to [build networks](https://jaxleyverse.github.io/jaxley/latest/tutorial/02_small_network/). If you are only interested in single cell simulations, you can directly jump to learning how to [modify parameters of your simulation](https://jaxleyverse.github.io/jaxley/latest/tutorial/03_setting_parameters/). If you want to simulate detailed morphologies from SWC files, checkout our tutorial on [working with detailed morphologies](https://jaxleyverse.github.io/jaxley/latest/tutorial/08_importing_morphologies/)."
"Congrats! You have just run your first morphologically detailed neuron simulation in `Jaxley`. We suggest to continue by learning how to [build networks](https://jaxley.readthedocs.io/en/latest/tutorials/02_small_network.html). If you are only interested in single cell simulations, you can directly jump to learning how to [modify parameters of your simulation](https://jaxley.readthedocs.io/en/latest/tutorials/03_setting_parameters.html). If you want to simulate detailed morphologies from SWC files, checkout our tutorial on [working with detailed morphologies](https://jaxley.readthedocs.io/en/latest/tutorials/08_importing_morphologies.html)."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "49241f33",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 78895af

Please sign in to comment.