Skip to content
Merged
Show file tree
Hide file tree
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
Binary file added tutorial/img/vc-level-2-post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorial/img/vc-level-3-post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 68 additions & 8 deletions tutorial/tour.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -228,23 +228,85 @@
"The given $R_f$ value is typical for Axon, HEKA, and Sutter."
]
},
{
"cell_type": "markdown",
"id": "13f7b3c8-ac0f-4c59-8b0a-4e082e81487a",
"metadata": {},
"source": [
"## Level 2: Fast capacitance and compensation\n",
"\n",
"<img src=\"./img/vc-level-2-post.png\" style=\"margin:auto\" />\n",
"\n",
"This level adds \n",
"\n",
"- A pipette (conventional patch clamp) or parasitic (planar patch clamp) capacitance $C_p$, and its amplifier estimate $C^*_p$\n",
"\n",
"Compared to level 3, only equations 5 and 7 are changed:"
]
},
{
"cell_type": "markdown",
"id": "7c991600-9683-45a6-8545-5c480c518215",
"metadata": {},
"source": [
"\\begin{align}\n",
"2.5 && \\dot{V}_\\text{rc} &= \\frac{R_f I_1 + b - V_\\text{rc}}{(\\tau_\\text{rc} - a)} \\\\\n",
" && a &= \\alpha R_s^* (C_p - C_p^*) \\\\\n",
" && b &= R_f (C_p - C_p^*) \\frac{\\dot{V}_s - \\beta \\dot{V}_e}{1 - \\beta}\n",
"\\end{align}\n",
"\n",
"\\begin{align}\n",
"2.7. && \\tau_o \\dot{I}_\\text{obs} = I_1 + (C_p - C_p^*) \\dot{V}_r - I_\\text{obs}\n",
"\\end{align}"
]
},
{
"cell_type": "markdown",
"id": "c6cd0eeb-a098-44e9-8865-8584ce368ce9",
"metadata": {},
"source": [
"New parameters are\n",
"\n",
"| Parameter | Units | Meaning | Typical value |\n",
"|-----------|-------|-------------------------------------------------|---------------|\n",
"| $C_p$ | pF | True pipette or parasitic capacitance, unknown | 5 pF |\n",
"| $C_p^*$ | pF | Estimated fast capacitance, read from amplifier | 5 pF |\n",
"\n",
"Note that the true capacitance artefact is more complex.\n",
"Similarly, most amplifiers have more complex compensation, including multiple capacitances and time delays."
]
},
{
"cell_type": "markdown",
"id": "9c446bf1-678e-4502-a12e-e22b411c4217",
"metadata": {},
"source": [
"## Level 1: Stray capacitance\n",
"\n",
"The level 1 model adds a \"stray capacitance\" over the measurement resistor $R_f$.\n",
"It is equivalent to level 0, described below, but uses 1st order approximations for all filters.\n",
"\n",
"Full equations can be found in the \"simplifications\" notebook."
]
},
{
"cell_type": "markdown",
"id": "f0982179-7da0-49d0-ae2f-a1ce724babe7",
"metadata": {},
"source": [
"## Level 0: The full model\n",
"\n",
"Next, we jump straight to the Level 0 model.\n",
"\n",
"<img src=\"./img/vc-level-0.png\" style=\"margin:auto\" />\n",
"\n",
"This level adds\n",
"\n",
"- A pipette (conventional patch clamp) or parasitic (planar patch clamp) capacitance $C_p$, and its amplifier estimate $C^*_p$\n",
"- A stray capacitance on the measurement resistor $\\tilde{C}_f$, and a finite op-amp speed with time constant $\\tau_a$\n",
"- A finite op-amp speed with time constant $\\tau_a$\n",
"- A two-part output filter, where \"Filter 1\" affects series resistance compensation, while \"Filter 2\" does not.\n",
"- Arbitrary equations for the output filters and the stimulus filter (allowing e.g. Bessel formulations)"
"- Arbitrary equations for the output filters and the stimulus filter (allowing e.g. Bessel formulations)\n",
"\n",
"And, as in level 1, we now have\n",
"\n",
"- A stray capacitance on the measurement resistor $\\tilde{C}_f$"
]
},
{
Expand Down Expand Up @@ -313,8 +375,6 @@
"\n",
"| Parameter | Units | Meaning | Typical value |\n",
"|---------------|-------|----------------------------------------------------|---------------|\n",
"| $C_p$ | pF | True pipette capacitance, unknown | 5 pF |\n",
"| $C^*_p$ | pF | Estimated pipette capacitance, read from amplifier | 5 pF |\n",
"| $\\tilde{C}_f$ | pF | Compensated stray capacitance on measuring resistor, unknown | 5e-3 pF |\n",
"| $\\tau_a$ | ms | Time constant of measurement op-amp, unknown | 13e-6 ms |\n",
"| $t_r$ | ms | Stimulus filter setting | 0.04 ms |\n",
Expand All @@ -339,7 +399,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.12"
"version": "3.13.13"
}
},
"nbformat": 4,
Expand Down