diff --git a/tutorial/img/vc-level-2-post.png b/tutorial/img/vc-level-2-post.png new file mode 100644 index 0000000..d6a8dd0 Binary files /dev/null and b/tutorial/img/vc-level-2-post.png differ diff --git a/tutorial/img/vc-level-3-post.png b/tutorial/img/vc-level-3-post.png index 4fdd584..31c487b 100644 Binary files a/tutorial/img/vc-level-3-post.png and b/tutorial/img/vc-level-3-post.png differ diff --git a/tutorial/tour.ipynb b/tutorial/tour.ipynb index 061fb78..a009917 100644 --- a/tutorial/tour.ipynb +++ b/tutorial/tour.ipynb @@ -228,6 +228,67 @@ "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", + "\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", @@ -235,16 +296,17 @@ "source": [ "## Level 0: The full model\n", "\n", - "Next, we jump straight to the Level 0 model.\n", - "\n", "\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$" ] }, { @@ -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", @@ -339,7 +399,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.12" + "version": "3.13.13" } }, "nbformat": 4,