diff --git a/arbor/include/arbor/lif_cell.hpp b/arbor/include/arbor/lif_cell.hpp index 64557616f2e03d0fdae119a5c17fe0acda9b2a2e..17ab8d8eb4067492711d9a74e0e98816d2a7ffbb 100644 --- a/arbor/include/arbor/lif_cell.hpp +++ b/arbor/include/arbor/lif_cell.hpp @@ -15,6 +15,7 @@ struct ARB_SYMBOL_VISIBLE lif_cell { double V_th = 10; // Firing threshold [mV]. double C_m = 20; // Membrane capacitance [pF]. double E_L = 0; // Resting potential [mV]. + double E_R = E_L; // Reset potential [mV]. double V_m = E_L; // Initial value of the Membrane potential [mV]. double t_ref = 2; // Refractory period [ms]. diff --git a/arbor/lif_cell_group.cpp b/arbor/lif_cell_group.cpp index 1dffa20d3c89b66b800edd0ff3ae2cc2932b8208..e018128c2d3fc8c0af0436a1cc4b283ca09ba77f 100644 --- a/arbor/lif_cell_group.cpp +++ b/arbor/lif_cell_group.cpp @@ -11,10 +11,24 @@ using namespace arb; // Constructor containing gid of first cell in a group and a container of all cells. -lif_cell_group::lif_cell_group(const std::vector<cell_gid_type>& gids, const recipe& rec, cell_label_range& cg_sources, cell_label_range& cg_targets): - gids_(gids) -{ +lif_cell_group::lif_cell_group(const std::vector<cell_gid_type>& gids, + const recipe& rec, + cell_label_range& cg_sources, + cell_label_range& cg_targets): + gids_(gids) { + lif_cell_group::set_binning_policy(binning_kind::none, 0); + for (auto gid: gids_) { + const auto& cell = util::any_cast<lif_cell>(rec.get_cell_description(gid)); + // set up cell state + cells_.push_back(cell); + last_time_updated_.push_back(0.0); + // tell our caller about this cell's connections + cg_sources.add_cell(); + cg_targets.add_cell(); + cg_sources.add_label(cell.source, {0, 1}); + cg_targets.add_label(cell.target, {0, 1}); + // insert probes where needed auto probes = rec.get_probes(gid); for (const auto lid: util::count_along(probes)) { const auto& probe = probes[lid]; @@ -27,23 +41,6 @@ lif_cell_group::lif_cell_group(const std::vector<cell_gid_type>& gids, const rec } } } - // Default to no binning of events - lif_cell_group::set_binning_policy(binning_kind::none, 0); - - cells_.reserve(gids_.size()); - last_time_updated_.resize(gids_.size()); - next_time_updatable_.resize(gids_.size()); - - for (auto lid: util::make_span(gids_.size())) { - cells_.push_back(util::any_cast<lif_cell>(rec.get_cell_description(gids_[lid]))); - } - - for (const auto& c: cells_) { - cg_sources.add_cell(); - cg_targets.add_cell(); - cg_sources.add_label(c.source, {0, 1}); - cg_targets.add_label(c.target, {0, 1}); - } } cell_kind lif_cell_group::get_cell_kind() const { @@ -103,6 +100,12 @@ void lif_cell_group::reset() { util::fill(next_time_updatable_, 0.); } +// produce voltage V_m at t1, given cell state at t0 and no spikes in [t0, t1) +static double +lif_decay(const lif_cell& cell, double t0, double t1) { + return (cell.V_m - cell.E_L)*exp((t0 - t1)/cell.tau_m) + cell.E_L; +} + // Advances a single cell (lid) with the exact solution (jumps can be arbitrary). // Parameter dt is ignored, since we make jumps between two consecutive spikes. void lif_cell_group::advance_cell(time_type tfinal, time_type dt, cell_gid_type lid, const event_lane_subrange& event_lanes) { @@ -171,10 +174,8 @@ void lif_cell_group::advance_cell(time_type tfinal, time_type dt, cell_gid_type } // skip event if neuron is in refactory period if (time >= t) { - // Let the membrane potential decay. - cell.V_m *= exp((t - time) / cell.tau_m); - // Add jump due to spike(s). - cell.V_m += weight / cell.C_m; + // Let the membrane potential decay towards E_L and add spike contribution(s) + cell.V_m = lif_decay(cell, t, time) + weight / cell.C_m; // Update current time t = time; // If crossing threshold occurred @@ -184,8 +185,8 @@ void lif_cell_group::advance_cell(time_type tfinal, time_type dt, cell_gid_type // Advance to account for the refractory period. // This means decay will also start at t + t_ref t += cell.t_ref; - // Reset the voltage to resting potential. - cell.V_m = cell.E_L; + // Reset the voltage. + cell.V_m = cell.E_R; } } } @@ -200,8 +201,13 @@ void lif_cell_group::advance_cell(time_type tfinal, time_type dt, cell_gid_type switch (kind) { case lif_probe_kind::voltage: { // Compute, but do not _set_ V_m + // default value, if _in_ refractory period, this + // will be E_R, so no further action needed. auto U = cell.V_m; - if (time >= t) U *= exp((t - time) / cell.tau_m); + if (time >= t) { + // we are not in the refractory period, apply decay + U = lif_decay(cell, t, time); + } // Store U for later use. sampled_voltages.push_back(U); // Set up reference to sampled value diff --git a/doc/concepts/lif_cell.rst b/doc/concepts/lif_cell.rst index 18fdcd44d21ba757e38a966e5750d98b615848a1..28c71c47b6f6bc3681d903794bf8dac9aa43441c 100644 --- a/doc/concepts/lif_cell.rst +++ b/doc/concepts/lif_cell.rst @@ -5,7 +5,9 @@ LIF cells The description of a LIF cell is used to control the leaky integrate-and-fire dynamics: +* Starting potential :math:`V_\mathrm{0}`, by default :math:`V_\mathrm{0} = E_\mathrm{L}` * Resting potential :math:`E_\mathrm{L}` +* Reset potential :math:`E_\mathrm{R}`, by default :math:`E_\mathrm{R} = E_\mathrm{L}` * Membrane potential decaying constant :math:`\tau_\mathrm{m}` * Membrane capacitance :math:`C_\mathrm{m}` * Firing threshold :math:`U_\mathrm{threshold}` @@ -21,20 +23,21 @@ mechanisms. The LIF cell's time dynamics are this: -0. :math:`U_\mathrm{m}(0) = E_\mathrm{L}` -1. If the cell is in its refractory state :math:`U_\mathrm{m}(t) = E_\mathrm{L}` -2. Otherwise :math:`U'_\mathrm{m}(t) = \sum\limits_\mathrm{spike} w_\mathrm{spike} \cdot\delta(t - t_\mathrm{spike}) -\frac{1}{\tau_\mathrm{m}}U_\mathrm{m}(t)` +0. :math:`U_\mathrm{m}(0) = V_\mathrm{0}`, +1. If the cell is in its refractory state :math:`U_\mathrm{m}(t) = E_\mathrm{R}` +2. Otherwise + :math:`U'_\mathrm{m}(t) = \sum\limits_\mathrm{spike} w_\mathrm{spike}\cdot\delta(t - t_\mathrm{spike}) - \frac{1}{\tau_\mathrm{m}}\left(U_\mathrm{m}(t)) - E_\mathrm{L}\right)` + where :math:`w_\mathrm{spike}` represents the weight of the synaptic connection associated with the given spike event. 3. If :math:`U_\mathrm{m}(t_0) \geq U_\mathrm{threshold}`: emit spike and enter refractory period until :math:`t = t_0 + t_\mathrm{ref}` LIF cells can be probed to obtain their current membrane potential, see :ref:`probesample`. .. figure:: ../images/lif.svg - :width: 400 + :width: 600 :align: center Plot of the potential over time for a LIF cell. - API --- diff --git a/doc/cpp/index.rst b/doc/cpp/index.rst index bd97b673ee7f18e6068665aeaef770d6fdf3ffbe..ba9af649ba6174be962df7295d06c9b7640a9b64 100644 --- a/doc/cpp/index.rst +++ b/doc/cpp/index.rst @@ -23,3 +23,4 @@ A :cpp:type:`arb::recipe` describes a model, and a :cpp:type:`arb::simulation` i simulation profiler cable_cell + lif_cell diff --git a/doc/cpp/lif_cell.rst b/doc/cpp/lif_cell.rst new file mode 100644 index 0000000000000000000000000000000000000000..60a72881a4a63e19ecb28974f4499372b37bc2be --- /dev/null +++ b/doc/cpp/lif_cell.rst @@ -0,0 +1,54 @@ +.. _cpplifcell: + +LIF cells +=========== + +.. cpp:namespace:: arb + +.. cpp:class:: lif_cell + + A benchmarking cell (leaky integrate-and-fire), used by Arbor developers to test communication performance, + with neuronal parameters: + + .. cpp:function:: lif_cell(cell_tag_type source, cell_tag_type target) + + Constructor: assigns the label ``source`` to the single built-in source on the cell; and assigns the + label ``target`` to the single built-in target on the cell. + + .. cpp:member:: cell_tag_type source + + The label of the single built-in source on the cell. Used for forming connections from the cell in the + :cpp:class:`recipe` by creating a :cpp:class:`connection`. + + .. cpp:member:: cell_tag_type target + + The label of the single built-in target on the cell. Used for forming connections to the cell in the + :cpp:class:`recipe` by creating a :cpp:class:`connection`. + + .. cpp:member:: double tau_m + + Membrane potential decaying constant [ms]. + + .. cpp:member:: double V_th + + Firing threshold [mV]. + + .. cpp:member:: double C_m + + Membrane capacitance [pF]. + + .. cpp:member:: double E_L + + Resting potential [mV]. + + .. cpp:member:: double E_R + + Reset potential [mV]. + + .. cpp:member:: double V_m + + Initial value of the Membrane potential [mV]. + + .. cpp:member:: double t_ref + + Refractory period [ms]. diff --git a/doc/images/lif.svg b/doc/images/lif.svg index b4c31ddb8ffbe5ba1c45bc325adfe110a6d90ea9..bd1dee6185ff7f5410e70393fed388f226819853 100644 --- a/doc/images/lif.svg +++ b/doc/images/lif.svg @@ -7,7 +7,7 @@ <rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <cc:Work> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> - <dc:date>2022-10-27T16:15:02.520502</dc:date> + <dc:date>2022-11-02T18:09:45.216110</dc:date> <dc:format>image/svg+xml</dc:format> <dc:creator> <cc:Agent> @@ -42,50 +42,13 @@ z <defs> <path d="M 0 3 L 0 -3 -" id="m13e9bbe748" style="stroke:#000000;stroke-width:1.5;"/> +" id="m80d41eef7a" style="stroke:#ff0000;stroke-width:1.5;"/> </defs> - <g clip-path="url(#pe30e7958f1)"> - <use style="stroke:#000000;stroke-width:1.5;" x="109.8" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="120.96" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="132.12" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="143.28" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="154.44" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="165.6" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="176.76" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="187.92" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="199.08" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="210.24" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="221.4" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="232.56" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="243.72" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="254.88" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="266.04" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="277.2" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="288.36" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="299.52" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="310.68" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="321.84" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="333" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="344.16" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="355.32" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="366.48" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="377.64" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="388.8" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="399.96" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="411.12" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="422.28" xlink:href="#m13e9bbe748" y="88.92"/> - <use style="stroke:#000000;stroke-width:1.5;" x="433.44" xlink:href="#m13e9bbe748" y="88.92"/> - </g> - </g> - <g id="PathCollection_2"> - <defs> - <path d="M 0 3 -L 0 -3 -" id="m028051d5a0" style="stroke:#ff0000;stroke-width:1.5;"/> - </defs> - <g clip-path="url(#pe30e7958f1)"> - <use style="fill:#ff0000;stroke:#ff0000;stroke-width:1.5;" x="176.76" xlink:href="#m028051d5a0" y="70.8"/> - <use style="fill:#ff0000;stroke:#ff0000;stroke-width:1.5;" x="333" xlink:href="#m028051d5a0" y="70.8"/> + <g clip-path="url(#p00981e8856)"> + <use style="fill:#ff0000;stroke:#ff0000;stroke-width:1.5;" x="120.96" xlink:href="#m80d41eef7a" y="88.92"/> + <use style="fill:#ff0000;stroke:#ff0000;stroke-width:1.5;" x="154.44" xlink:href="#m80d41eef7a" y="88.92"/> + <use style="fill:#ff0000;stroke:#ff0000;stroke-width:1.5;" x="187.92" xlink:href="#m80d41eef7a" y="88.92"/> + <use style="fill:#ff0000;stroke:#ff0000;stroke-width:1.5;" x="221.4" xlink:href="#m80d41eef7a" y="88.92"/> </g> </g> <g id="matplotlib.axis_1"> @@ -94,15 +57,15 @@ L 0 -3 <defs> <path d="M 0 0 L 0 3.5 -" id="m9275e96962" style="stroke:#000000;stroke-width:0.8;"/> +" id="mb31456d35c" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m9275e96962" y="252"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#mb31456d35c" y="252"/> </g> </g> <g id="text_1"> - <!-- 0.0 --> - <g transform="translate(46.048437 266.598437)scale(0.1 -0.1)"> + <!-- 0 --> + <g transform="translate(50.81875 266.598437)scale(0.1 -0.1)"> <defs> <path d="M 31.78125 66.40625 Q 24.171875 66.40625 20.328125 58.90625 @@ -125,28 +88,20 @@ Q 6.59375 54.828125 13.0625 64.515625 Q 19.53125 74.21875 31.78125 74.21875 z " id="DejaVuSans-48"/> - <path d="M 10.6875 12.40625 -L 21 12.40625 -L 21 0 -L 10.6875 0 -z -" id="DejaVuSans-46"/> </defs> <use xlink:href="#DejaVuSans-48"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_2"> <g id="line2d_2"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="98.64" xlink:href="#m9275e96962" y="252"/> + <use style="stroke:#000000;stroke-width:0.8;" x="120.96" xlink:href="#mb31456d35c" y="252"/> </g> </g> <g id="text_2"> - <!-- 0.2 --> - <g transform="translate(90.688438 266.598437)scale(0.1 -0.1)"> + <!-- 2 --> + <g transform="translate(117.77875 266.598437)scale(0.1 -0.1)"> <defs> <path d="M 19.1875 8.296875 L 53.609375 8.296875 @@ -173,21 +128,19 @@ Q 31.109375 20.453125 19.1875 8.296875 z " id="DejaVuSans-50"/> </defs> - <use xlink:href="#DejaVuSans-48"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-50"/> + <use xlink:href="#DejaVuSans-50"/> </g> </g> </g> <g id="xtick_3"> <g id="line2d_3"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="143.28" xlink:href="#m9275e96962" y="252"/> + <use style="stroke:#000000;stroke-width:0.8;" x="187.92" xlink:href="#mb31456d35c" y="252"/> </g> </g> <g id="text_3"> - <!-- 0.4 --> - <g transform="translate(135.328438 266.598437)scale(0.1 -0.1)"> + <!-- 4 --> + <g transform="translate(184.73875 266.598437)scale(0.1 -0.1)"> <defs> <path d="M 37.796875 64.3125 L 12.890625 25.390625 @@ -207,21 +160,19 @@ L 4.890625 26.703125 z " id="DejaVuSans-52"/> </defs> - <use xlink:href="#DejaVuSans-48"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-52"/> + <use xlink:href="#DejaVuSans-52"/> </g> </g> </g> <g id="xtick_4"> <g id="line2d_4"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="187.92" xlink:href="#m9275e96962" y="252"/> + <use style="stroke:#000000;stroke-width:0.8;" x="254.88" xlink:href="#mb31456d35c" y="252"/> </g> </g> <g id="text_4"> - <!-- 0.6 --> - <g transform="translate(179.968438 266.598437)scale(0.1 -0.1)"> + <!-- 6 --> + <g transform="translate(251.69875 266.598437)scale(0.1 -0.1)"> <defs> <path d="M 33.015625 40.375 Q 26.375 40.375 22.484375 35.828125 @@ -254,21 +205,19 @@ Q 48.484375 72.75 52.59375 71.296875 z " id="DejaVuSans-54"/> </defs> - <use xlink:href="#DejaVuSans-48"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-54"/> + <use xlink:href="#DejaVuSans-54"/> </g> </g> </g> <g id="xtick_5"> <g id="line2d_5"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="232.56" xlink:href="#m9275e96962" y="252"/> + <use style="stroke:#000000;stroke-width:0.8;" x="321.84" xlink:href="#mb31456d35c" y="252"/> </g> </g> <g id="text_5"> - <!-- 0.8 --> - <g transform="translate(224.608438 266.598437)scale(0.1 -0.1)"> + <!-- 8 --> + <g transform="translate(318.65875 266.598437)scale(0.1 -0.1)"> <defs> <path d="M 31.78125 34.625 Q 24.75 34.625 20.71875 30.859375 @@ -310,21 +259,19 @@ Q 18.3125 60.0625 18.3125 54.390625 z " id="DejaVuSans-56"/> </defs> - <use xlink:href="#DejaVuSans-48"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-56"/> + <use xlink:href="#DejaVuSans-56"/> </g> </g> </g> <g id="xtick_6"> <g id="line2d_6"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="277.2" xlink:href="#m9275e96962" y="252"/> + <use style="stroke:#000000;stroke-width:0.8;" x="388.8" xlink:href="#mb31456d35c" y="252"/> </g> </g> <g id="text_6"> - <!-- 1.0 --> - <g transform="translate(269.248437 266.598437)scale(0.1 -0.1)"> + <!-- 10 --> + <g transform="translate(382.4375 266.598437)scale(0.1 -0.1)"> <defs> <path d="M 12.40625 8.296875 L 28.515625 8.296875 @@ -341,42 +288,11 @@ z " id="DejaVuSans-49"/> </defs> <use xlink:href="#DejaVuSans-49"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-48"/> - </g> - </g> - </g> - <g id="xtick_7"> - <g id="line2d_7"> - <g> - <use style="stroke:#000000;stroke-width:0.8;" x="321.84" xlink:href="#m9275e96962" y="252"/> - </g> - </g> - <g id="text_7"> - <!-- 1.2 --> - <g transform="translate(313.888438 266.598437)scale(0.1 -0.1)"> - <use xlink:href="#DejaVuSans-49"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-50"/> - </g> - </g> - </g> - <g id="xtick_8"> - <g id="line2d_8"> - <g> - <use style="stroke:#000000;stroke-width:0.8;" x="366.48" xlink:href="#m9275e96962" y="252"/> - </g> - </g> - <g id="text_8"> - <!-- 1.4 --> - <g transform="translate(358.528437 266.598437)scale(0.1 -0.1)"> - <use xlink:href="#DejaVuSans-49"/> - <use x="63.623047" xlink:href="#DejaVuSans-46"/> - <use x="95.410156" xlink:href="#DejaVuSans-52"/> + <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> - <g id="text_9"> + <g id="text_7"> <!-- Time $(t/ms)$ --> <g transform="translate(192.35 280.276563)scale(0.1 -0.1)"> <defs> @@ -595,17 +511,17 @@ z </g> <g id="matplotlib.axis_2"> <g id="ytick_1"> - <g id="line2d_9"> + <g id="line2d_7"> <defs> <path d="M 0 0 L -3.5 0 -" id="m7d9d9dfb13" style="stroke:#000000;stroke-width:0.8;"/> +" id="m54e896f0ae" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m7d9d9dfb13" y="233.88"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m54e896f0ae" y="233.88"/> </g> </g> - <g id="text_10"> + <g id="text_8"> <!-- −40 --> <g transform="translate(25.895312 237.679219)scale(0.1 -0.1)"> <defs> @@ -623,12 +539,12 @@ z </g> </g> <g id="ytick_2"> - <g id="line2d_10"> + <g id="line2d_8"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m7d9d9dfb13" y="197.64"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m54e896f0ae" y="197.64"/> </g> </g> - <g id="text_11"> + <g id="text_9"> <!-- −30 --> <g transform="translate(25.895312 201.439219)scale(0.1 -0.1)"> <defs> @@ -672,12 +588,12 @@ z </g> </g> <g id="ytick_3"> - <g id="line2d_11"> + <g id="line2d_9"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m7d9d9dfb13" y="161.4"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m54e896f0ae" y="161.4"/> </g> </g> - <g id="text_12"> + <g id="text_10"> <!-- −20 --> <g transform="translate(25.895312 165.199219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-8722"/> @@ -687,12 +603,12 @@ z </g> </g> <g id="ytick_4"> - <g id="line2d_12"> + <g id="line2d_10"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m7d9d9dfb13" y="125.16"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m54e896f0ae" y="125.16"/> </g> </g> - <g id="text_13"> + <g id="text_11"> <!-- −10 --> <g transform="translate(25.895312 128.959219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-8722"/> @@ -702,12 +618,12 @@ z </g> </g> <g id="ytick_5"> - <g id="line2d_13"> + <g id="line2d_11"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m7d9d9dfb13" y="88.92"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m54e896f0ae" y="88.92"/> </g> </g> - <g id="text_14"> + <g id="text_12"> <!-- 0 --> <g transform="translate(40.6375 92.719219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-48"/> @@ -715,12 +631,12 @@ z </g> </g> <g id="ytick_6"> - <g id="line2d_14"> + <g id="line2d_12"> <g> - <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m7d9d9dfb13" y="52.68"/> + <use style="stroke:#000000;stroke-width:0.8;" x="54" xlink:href="#m54e896f0ae" y="52.68"/> </g> </g> - <g id="text_15"> + <g id="text_13"> <!-- 10 --> <g transform="translate(34.275 56.479219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> @@ -728,10 +644,117 @@ z </g> </g> </g> - <g id="text_16"> - <!-- Potential $(U_\mathrm{m}/mV)$ --> - <g transform="translate(19.815625 188.08)rotate(-90)scale(0.1 -0.1)"> + <g id="text_14"> + <!-- Membrane Potential $(V_\mathrm{m}/mV)$ --> + <g transform="translate(19.815625 216.23)rotate(-90)scale(0.1 -0.1)"> <defs> + <path d="M 9.8125 72.90625 +L 24.515625 72.90625 +L 43.109375 23.296875 +L 61.8125 72.90625 +L 76.515625 72.90625 +L 76.515625 0 +L 66.890625 0 +L 66.890625 64.015625 +L 48.09375 14.015625 +L 38.1875 14.015625 +L 19.390625 64.015625 +L 19.390625 0 +L 9.8125 0 +z +" id="DejaVuSans-77"/> + <path d="M 48.6875 27.296875 +Q 48.6875 37.203125 44.609375 42.84375 +Q 40.53125 48.484375 33.40625 48.484375 +Q 26.265625 48.484375 22.1875 42.84375 +Q 18.109375 37.203125 18.109375 27.296875 +Q 18.109375 17.390625 22.1875 11.75 +Q 26.265625 6.109375 33.40625 6.109375 +Q 40.53125 6.109375 44.609375 11.75 +Q 48.6875 17.390625 48.6875 27.296875 +z +M 18.109375 46.390625 +Q 20.953125 51.265625 25.265625 53.625 +Q 29.59375 56 35.59375 56 +Q 45.5625 56 51.78125 48.09375 +Q 58.015625 40.1875 58.015625 27.296875 +Q 58.015625 14.40625 51.78125 6.484375 +Q 45.5625 -1.421875 35.59375 -1.421875 +Q 29.59375 -1.421875 25.265625 0.953125 +Q 20.953125 3.328125 18.109375 8.203125 +L 18.109375 0 +L 9.078125 0 +L 9.078125 75.984375 +L 18.109375 75.984375 +z +" id="DejaVuSans-98"/> + <path d="M 41.109375 46.296875 +Q 39.59375 47.171875 37.8125 47.578125 +Q 36.03125 48 33.890625 48 +Q 26.265625 48 22.1875 43.046875 +Q 18.109375 38.09375 18.109375 28.8125 +L 18.109375 0 +L 9.078125 0 +L 9.078125 54.6875 +L 18.109375 54.6875 +L 18.109375 46.1875 +Q 20.953125 51.171875 25.484375 53.578125 +Q 30.03125 56 36.53125 56 +Q 37.453125 56 38.578125 55.875 +Q 39.703125 55.765625 41.0625 55.515625 +z +" id="DejaVuSans-114"/> + <path d="M 34.28125 27.484375 +Q 23.390625 27.484375 19.1875 25 +Q 14.984375 22.515625 14.984375 16.5 +Q 14.984375 11.71875 18.140625 8.90625 +Q 21.296875 6.109375 26.703125 6.109375 +Q 34.1875 6.109375 38.703125 11.40625 +Q 43.21875 16.703125 43.21875 25.484375 +L 43.21875 27.484375 +z +M 52.203125 31.203125 +L 52.203125 0 +L 43.21875 0 +L 43.21875 8.296875 +Q 40.140625 3.328125 35.546875 0.953125 +Q 30.953125 -1.421875 24.3125 -1.421875 +Q 15.921875 -1.421875 10.953125 3.296875 +Q 6 8.015625 6 15.921875 +Q 6 25.140625 12.171875 29.828125 +Q 18.359375 34.515625 30.609375 34.515625 +L 43.21875 34.515625 +L 43.21875 35.40625 +Q 43.21875 41.609375 39.140625 45 +Q 35.0625 48.390625 27.6875 48.390625 +Q 23 48.390625 18.546875 47.265625 +Q 14.109375 46.140625 10.015625 43.890625 +L 10.015625 52.203125 +Q 14.9375 54.109375 19.578125 55.046875 +Q 24.21875 56 28.609375 56 +Q 40.484375 56 46.34375 49.84375 +Q 52.203125 43.703125 52.203125 31.203125 +z +" id="DejaVuSans-97"/> + <path d="M 54.890625 33.015625 +L 54.890625 0 +L 45.90625 0 +L 45.90625 32.71875 +Q 45.90625 40.484375 42.875 44.328125 +Q 39.84375 48.1875 33.796875 48.1875 +Q 26.515625 48.1875 22.3125 43.546875 +Q 18.109375 38.921875 18.109375 30.90625 +L 18.109375 0 +L 9.078125 0 +L 9.078125 54.6875 +L 18.109375 54.6875 +L 18.109375 46.1875 +Q 21.34375 51.125 25.703125 53.5625 +Q 30.078125 56 35.796875 56 +Q 45.21875 56 50.046875 50.171875 +Q 54.890625 44.34375 54.890625 33.015625 +z +" id="DejaVuSans-110"/> <path d="M 19.671875 64.796875 L 19.671875 37.40625 L 32.078125 37.40625 @@ -792,83 +815,12 @@ L 9.28125 54.6875 L 9.28125 70.21875 z " id="DejaVuSans-116"/> - <path d="M 54.890625 33.015625 -L 54.890625 0 -L 45.90625 0 -L 45.90625 32.71875 -Q 45.90625 40.484375 42.875 44.328125 -Q 39.84375 48.1875 33.796875 48.1875 -Q 26.515625 48.1875 22.3125 43.546875 -Q 18.109375 38.921875 18.109375 30.90625 -L 18.109375 0 -L 9.078125 0 -L 9.078125 54.6875 -L 18.109375 54.6875 -L 18.109375 46.1875 -Q 21.34375 51.125 25.703125 53.5625 -Q 30.078125 56 35.796875 56 -Q 45.21875 56 50.046875 50.171875 -Q 54.890625 44.34375 54.890625 33.015625 -z -" id="DejaVuSans-110"/> - <path d="M 34.28125 27.484375 -Q 23.390625 27.484375 19.1875 25 -Q 14.984375 22.515625 14.984375 16.5 -Q 14.984375 11.71875 18.140625 8.90625 -Q 21.296875 6.109375 26.703125 6.109375 -Q 34.1875 6.109375 38.703125 11.40625 -Q 43.21875 16.703125 43.21875 25.484375 -L 43.21875 27.484375 -z -M 52.203125 31.203125 -L 52.203125 0 -L 43.21875 0 -L 43.21875 8.296875 -Q 40.140625 3.328125 35.546875 0.953125 -Q 30.953125 -1.421875 24.3125 -1.421875 -Q 15.921875 -1.421875 10.953125 3.296875 -Q 6 8.015625 6 15.921875 -Q 6 25.140625 12.171875 29.828125 -Q 18.359375 34.515625 30.609375 34.515625 -L 43.21875 34.515625 -L 43.21875 35.40625 -Q 43.21875 41.609375 39.140625 45 -Q 35.0625 48.390625 27.6875 48.390625 -Q 23 48.390625 18.546875 47.265625 -Q 14.109375 46.140625 10.015625 43.890625 -L 10.015625 52.203125 -Q 14.9375 54.109375 19.578125 55.046875 -Q 24.21875 56 28.609375 56 -Q 40.484375 56 46.34375 49.84375 -Q 52.203125 43.703125 52.203125 31.203125 -z -" id="DejaVuSans-97"/> <path d="M 9.421875 75.984375 L 18.40625 75.984375 L 18.40625 0 L 9.421875 0 z " id="DejaVuSans-108"/> - <path d="M 15.484375 72.90625 -L 25.390625 72.90625 -L 16.796875 28.609375 -Q 16.265625 25.640625 16.046875 23.703125 -Q 15.828125 21.78125 15.828125 20.3125 -Q 15.828125 13.578125 19.578125 10.078125 -Q 23.34375 6.59375 30.609375 6.59375 -Q 40.046875 6.59375 45.28125 11.765625 -Q 50.53125 16.9375 52.78125 28.609375 -L 61.375 72.90625 -L 71.296875 72.90625 -L 62.5 27.390625 -Q 59.625 12.640625 51.5625 5.609375 -Q 43.5 -1.421875 29.5 -1.421875 -Q 18.5625 -1.421875 12.1875 4.078125 -Q 5.8125 9.578125 5.8125 19 -Q 5.8125 20.703125 6.046875 22.828125 -Q 6.296875 24.953125 6.78125 27.390625 -z -" id="DejaVuSans-Oblique-85"/> <path d="M 20.609375 0 L 7.8125 72.90625 L 17.484375 72.90625 @@ -879,97 +831,85 @@ L 32.078125 0 z " id="DejaVuSans-Oblique-86"/> </defs> - <use transform="translate(0 0.015625)" xlink:href="#DejaVuSans-80"/> - <use transform="translate(60.302734 0.015625)" xlink:href="#DejaVuSans-111"/> - <use transform="translate(121.484375 0.015625)" xlink:href="#DejaVuSans-116"/> - <use transform="translate(160.693359 0.015625)" xlink:href="#DejaVuSans-101"/> - <use transform="translate(222.216797 0.015625)" xlink:href="#DejaVuSans-110"/> - <use transform="translate(285.595703 0.015625)" xlink:href="#DejaVuSans-116"/> - <use transform="translate(324.804688 0.015625)" xlink:href="#DejaVuSans-105"/> - <use transform="translate(352.587891 0.015625)" xlink:href="#DejaVuSans-97"/> - <use transform="translate(413.867188 0.015625)" xlink:href="#DejaVuSans-108"/> - <use transform="translate(441.650391 0.015625)" xlink:href="#DejaVuSans-32"/> - <use transform="translate(473.4375 0.015625)" xlink:href="#DejaVuSans-40"/> - <use transform="translate(512.451172 0.015625)" xlink:href="#DejaVuSans-Oblique-85"/> - <use transform="translate(585.644531 -16.390625)scale(0.7)" xlink:href="#DejaVuSans-109"/> - <use transform="translate(656.567383 0.015625)" xlink:href="#DejaVuSans-47"/> - <use transform="translate(690.258789 0.015625)" xlink:href="#DejaVuSans-Oblique-109"/> - <use transform="translate(787.670898 0.015625)" xlink:href="#DejaVuSans-Oblique-86"/> - <use transform="translate(856.079102 0.015625)" xlink:href="#DejaVuSans-41"/> + <use transform="translate(0 0.015625)" xlink:href="#DejaVuSans-77"/> + <use transform="translate(86.279297 0.015625)" xlink:href="#DejaVuSans-101"/> + <use transform="translate(147.802734 0.015625)" xlink:href="#DejaVuSans-109"/> + <use transform="translate(245.214844 0.015625)" xlink:href="#DejaVuSans-98"/> + <use transform="translate(308.691406 0.015625)" xlink:href="#DejaVuSans-114"/> + <use transform="translate(349.804688 0.015625)" xlink:href="#DejaVuSans-97"/> + <use transform="translate(411.083984 0.015625)" xlink:href="#DejaVuSans-110"/> + <use transform="translate(474.462891 0.015625)" xlink:href="#DejaVuSans-101"/> + <use transform="translate(535.986328 0.015625)" xlink:href="#DejaVuSans-32"/> + <use transform="translate(567.773438 0.015625)" xlink:href="#DejaVuSans-80"/> + <use transform="translate(628.076172 0.015625)" xlink:href="#DejaVuSans-111"/> + <use transform="translate(689.257812 0.015625)" xlink:href="#DejaVuSans-116"/> + <use transform="translate(728.466797 0.015625)" xlink:href="#DejaVuSans-101"/> + <use transform="translate(789.990234 0.015625)" xlink:href="#DejaVuSans-110"/> + <use transform="translate(853.369141 0.015625)" xlink:href="#DejaVuSans-116"/> + <use transform="translate(892.578125 0.015625)" xlink:href="#DejaVuSans-105"/> + <use transform="translate(920.361328 0.015625)" xlink:href="#DejaVuSans-97"/> + <use transform="translate(981.640625 0.015625)" xlink:href="#DejaVuSans-108"/> + <use transform="translate(1009.423828 0.015625)" xlink:href="#DejaVuSans-32"/> + <use transform="translate(1041.210938 0.015625)" xlink:href="#DejaVuSans-40"/> + <use transform="translate(1080.224609 0.015625)" xlink:href="#DejaVuSans-Oblique-86"/> + <use transform="translate(1148.632812 -16.390625)scale(0.7)" xlink:href="#DejaVuSans-109"/> + <use transform="translate(1219.555664 0.015625)" xlink:href="#DejaVuSans-47"/> + <use transform="translate(1253.24707 0.015625)" xlink:href="#DejaVuSans-Oblique-109"/> + <use transform="translate(1350.65918 0.015625)" xlink:href="#DejaVuSans-Oblique-86"/> + <use transform="translate(1419.067383 0.015625)" xlink:href="#DejaVuSans-41"/> </g> </g> </g> - <g id="line2d_15"> - <path clip-path="url(#pe30e7958f1)" d="M 54 52.68 + <g id="LineCollection_1"> + <path clip-path="url(#p00981e8856)" d="M 221.4 179.52 +L 248.184 179.52 +" style="fill:none;stroke:#808080;stroke-width:1.5;"/> + </g> + <g id="line2d_13"> + <path clip-path="url(#p00981e8856)" d="M 54 52.68 L 388.8 52.68 -" style="fill:none;stroke:#808080;stroke-linecap:square;stroke-width:1.5;"/> +" style="fill:none;stroke:#cccccc;stroke-linecap:square;stroke-width:1.5;"/> </g> - <g id="line2d_16"> - <path clip-path="url(#pe30e7958f1)" d="M 54 241.128 -L 388.8 241.128 -" style="fill:none;stroke:#808080;stroke-linecap:square;stroke-width:1.5;"/> + <g id="line2d_14"> + <path clip-path="url(#p00981e8856)" d="M 54 136.032 +L 388.8 136.032 +" style="fill:none;stroke:#cccccc;stroke-linecap:square;stroke-width:1.5;"/> </g> - <g id="line2d_17"> - <path clip-path="url(#pe30e7958f1)" d="M 54 172.272 -L 59.58 172.06388 -L 65.16 171.85628 -L 70.74 171.649199 -L 76.32 171.442634 -L 81.9 171.236585 -L 87.48 171.03105 -L 93.06 170.826029 -L 98.64 170.62152 -L 104.22 170.417521 -L 109.8 152.094032 -L 115.38 151.936294 -L 120.96 133.65895 -L 126.54 133.547242 -L 132.12 115.315814 -L 137.7 115.249906 -L 143.28 97.064164 -L 148.86 97.043829 -L 154.44 78.903545 -L 160.02 78.928555 -L 165.6 60.833502 -L 171.18 60.903631 -L 176.76 241.128 -L 182.34 241.128 -L 187.92 241.128 -L 193.5 241.128 -L 199.08 241.128 -L 204.66 241.128 -L 210.24 241.128 -L 215.82 241.128 -L 221.4 223.008 -L 226.98 222.673199 -L 232.56 204.219233 -L 238.14 203.931345 -L 243.72 185.524176 -L 249.3 185.282967 -L 254.88 166.922361 -L 260.46 166.727598 -L 266.04 148.413322 -L 271.62 148.264775 -L 277.2 129.996598 -L 282.78 129.894035 -L 288.36 111.671728 -L 293.94 111.614919 -L 299.52 93.438253 -L 305.1 93.426971 -L 310.68 75.295718 -L 316.26 75.329736 -L 321.84 57.243669 -L 327.42 57.322761 -L 333 241.128 -L 338.58 241.128 -L 344.16 241.128 -L 349.74 241.128 -L 355.32 241.128 -L 360.9 241.128 -L 366.48 241.128 -L 372.06 241.128 -L 377.64 223.008 -L 383.22 222.673199 + <g id="line2d_15"> + <path clip-path="url(#p00981e8856)" d="M 54 172.272 +L 388.8 172.272 +" style="fill:none;stroke:#cccccc;stroke-linecap:square;stroke-width:1.5;"/> + </g> + <g id="line2d_16"> + <path clip-path="url(#p00981e8856)" d="M 54 154.152 +L 73.251 152.183443 +L 93.339 150.35731 +L 114.264 148.673962 +L 120.123 148.239082 +L 120.96 111.938198 +L 137.7 114.231031 +L 153.603 116.206799 +L 154.44 80.065662 +L 165.321 83.587755 +L 176.202 86.888215 +L 187.083 89.980959 +L 187.92 53.970651 +L 197.127 58.362142 +L 206.334 62.518616 +L 216.378 66.79972 +L 220.563 68.509052 +L 221.4 172.272 +L 248.184 172.272 +L 261.576 169.485869 +L 274.968 166.913554 +L 289.197 164.397048 +L 304.263 161.955922 +L 320.166 159.606482 +L 336.906 157.362864 +L 354.483 155.237026 +L 372.06 153.322466 +L 387.963 151.755449 +L 387.963 151.755449 " style="fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;"/> </g> <g id="patch_3"> @@ -992,53 +932,80 @@ L 388.8 252 L 388.8 34.56 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> - <g id="text_17"> - <g id="patch_7"> - <path d="M 56.696 58.759688 -L 105.496 58.759688 -L 105.496 41.081563 -L 56.696 41.081563 -z -" style="fill:#ffffff;stroke:#ffffff;stroke-linejoin:miter;"/> - </g> - <!-- $U_\mathrm{threshold}$ --> - <g transform="translate(60.696 52.68)scale(0.1 -0.1)"> + <g id="text_15"> + <!-- Spikes --> + <g transform="translate(62.37 91.679375)scale(0.1 -0.1)"> <defs> - <path d="M 54.890625 33.015625 -L 54.890625 0 -L 45.90625 0 -L 45.90625 32.71875 -Q 45.90625 40.484375 42.875 44.328125 -Q 39.84375 48.1875 33.796875 48.1875 -Q 26.515625 48.1875 22.3125 43.546875 -Q 18.109375 38.921875 18.109375 30.90625 -L 18.109375 0 -L 9.078125 0 -L 9.078125 75.984375 -L 18.109375 75.984375 -L 18.109375 46.1875 -Q 21.34375 51.125 25.703125 53.5625 -Q 30.078125 56 35.796875 56 -Q 45.21875 56 50.046875 50.171875 -Q 54.890625 44.34375 54.890625 33.015625 + <path d="M 53.515625 70.515625 +L 53.515625 60.890625 +Q 47.90625 63.578125 42.921875 64.890625 +Q 37.9375 66.21875 33.296875 66.21875 +Q 25.25 66.21875 20.875 63.09375 +Q 16.5 59.96875 16.5 54.203125 +Q 16.5 49.359375 19.40625 46.890625 +Q 22.3125 44.4375 30.421875 42.921875 +L 36.375 41.703125 +Q 47.40625 39.59375 52.65625 34.296875 +Q 57.90625 29 57.90625 20.125 +Q 57.90625 9.515625 50.796875 4.046875 +Q 43.703125 -1.421875 29.984375 -1.421875 +Q 24.8125 -1.421875 18.96875 -0.25 +Q 13.140625 0.921875 6.890625 3.21875 +L 6.890625 13.375 +Q 12.890625 10.015625 18.65625 8.296875 +Q 24.421875 6.59375 29.984375 6.59375 +Q 38.421875 6.59375 43.015625 9.90625 +Q 47.609375 13.234375 47.609375 19.390625 +Q 47.609375 24.75 44.3125 27.78125 +Q 41.015625 30.8125 33.5 32.328125 +L 27.484375 33.5 +Q 16.453125 35.6875 11.515625 40.375 +Q 6.59375 45.0625 6.59375 53.421875 +Q 6.59375 63.09375 13.40625 68.65625 +Q 20.21875 74.21875 32.171875 74.21875 +Q 37.3125 74.21875 42.625 73.28125 +Q 47.953125 72.359375 53.515625 70.515625 z -" id="DejaVuSans-104"/> - <path d="M 41.109375 46.296875 -Q 39.59375 47.171875 37.8125 47.578125 -Q 36.03125 48 33.890625 48 -Q 26.265625 48 22.1875 43.046875 -Q 18.109375 38.09375 18.109375 28.8125 -L 18.109375 0 -L 9.078125 0 +" id="DejaVuSans-83"/> + <path d="M 18.109375 8.203125 +L 18.109375 -20.796875 +L 9.078125 -20.796875 L 9.078125 54.6875 L 18.109375 54.6875 -L 18.109375 46.1875 -Q 20.953125 51.171875 25.484375 53.578125 -Q 30.03125 56 36.53125 56 -Q 37.453125 56 38.578125 55.875 -Q 39.703125 55.765625 41.0625 55.515625 +L 18.109375 46.390625 +Q 20.953125 51.265625 25.265625 53.625 +Q 29.59375 56 35.59375 56 +Q 45.5625 56 51.78125 48.09375 +Q 58.015625 40.1875 58.015625 27.296875 +Q 58.015625 14.40625 51.78125 6.484375 +Q 45.5625 -1.421875 35.59375 -1.421875 +Q 29.59375 -1.421875 25.265625 0.953125 +Q 20.953125 3.328125 18.109375 8.203125 z -" id="DejaVuSans-114"/> +M 48.6875 27.296875 +Q 48.6875 37.203125 44.609375 42.84375 +Q 40.53125 48.484375 33.40625 48.484375 +Q 26.265625 48.484375 22.1875 42.84375 +Q 18.109375 37.203125 18.109375 27.296875 +Q 18.109375 17.390625 22.1875 11.75 +Q 26.265625 6.109375 33.40625 6.109375 +Q 40.53125 6.109375 44.609375 11.75 +Q 48.6875 17.390625 48.6875 27.296875 +z +" id="DejaVuSans-112"/> + <path d="M 9.078125 75.984375 +L 18.109375 75.984375 +L 18.109375 31.109375 +L 44.921875 54.6875 +L 56.390625 54.6875 +L 27.390625 29.109375 +L 57.625 0 +L 45.90625 0 +L 18.109375 26.703125 +L 18.109375 0 +L 9.078125 0 +z +" id="DejaVuSans-107"/> <path d="M 44.28125 53.078125 L 44.28125 44.578125 Q 40.484375 46.53125 36.375 47.5 @@ -1070,56 +1037,115 @@ Q 31.78125 56 36.171875 55.265625 Q 40.578125 54.546875 44.28125 53.078125 z " id="DejaVuSans-115"/> - <path d="M 45.40625 46.390625 -L 45.40625 75.984375 -L 54.390625 75.984375 -L 54.390625 0 -L 45.40625 0 -L 45.40625 8.203125 -Q 42.578125 3.328125 38.25 0.953125 -Q 33.9375 -1.421875 27.875 -1.421875 -Q 17.96875 -1.421875 11.734375 6.484375 -Q 5.515625 14.40625 5.515625 27.296875 -Q 5.515625 40.1875 11.734375 48.09375 -Q 17.96875 56 27.875 56 -Q 33.9375 56 38.25 53.625 -Q 42.578125 51.265625 45.40625 46.390625 + </defs> + <use xlink:href="#DejaVuSans-83"/> + <use x="63.476562" xlink:href="#DejaVuSans-112"/> + <use x="126.953125" xlink:href="#DejaVuSans-105"/> + <use x="154.736328" xlink:href="#DejaVuSans-107"/> + <use x="209.021484" xlink:href="#DejaVuSans-101"/> + <use x="270.544922" xlink:href="#DejaVuSans-115"/> + </g> + </g> + <g id="text_16"> + <!-- $t_\mathrm{ref}$ --> + <g transform="translate(227.842 189.527375)scale(0.1 -0.1)"> + <defs> + <path d="M 37.109375 75.984375 +L 37.109375 68.5 +L 28.515625 68.5 +Q 23.6875 68.5 21.796875 66.546875 +Q 19.921875 64.59375 19.921875 59.515625 +L 19.921875 54.6875 +L 34.71875 54.6875 +L 34.71875 47.703125 +L 19.921875 47.703125 +L 19.921875 0 +L 10.890625 0 +L 10.890625 47.703125 +L 2.296875 47.703125 +L 2.296875 54.6875 +L 10.890625 54.6875 +L 10.890625 58.5 +Q 10.890625 67.625 15.140625 71.796875 +Q 19.390625 75.984375 28.609375 75.984375 z -M 14.796875 27.296875 -Q 14.796875 17.390625 18.875 11.75 -Q 22.953125 6.109375 30.078125 6.109375 -Q 37.203125 6.109375 41.296875 11.75 -Q 45.40625 17.390625 45.40625 27.296875 -Q 45.40625 37.203125 41.296875 42.84375 -Q 37.203125 48.484375 30.078125 48.484375 -Q 22.953125 48.484375 18.875 42.84375 -Q 14.796875 37.203125 14.796875 27.296875 +" id="DejaVuSans-102"/> + </defs> + <use transform="translate(0 0.78125)" xlink:href="#DejaVuSans-Oblique-116"/> + <use transform="translate(39.208984 -15.625)scale(0.7)" xlink:href="#DejaVuSans-114"/> + <use transform="translate(67.988281 -15.625)scale(0.7)" xlink:href="#DejaVuSans-101"/> + <use transform="translate(111.054688 -15.625)scale(0.7)" xlink:href="#DejaVuSans-102"/> + </g> + </g> + <g id="text_17"> + <g id="patch_7"> + <path d="M 58.37 61.519063 +L 84.07 61.519063 +L 84.07 43.840938 +L 58.37 43.840938 z -" id="DejaVuSans-100"/> +" style="fill:#ffffff;stroke:#ffffff;stroke-linejoin:miter;"/> + </g> + <!-- $U_\mathrm{thr}$ --> + <g transform="translate(62.37 55.439375)scale(0.1 -0.1)"> + <defs> + <path d="M 15.484375 72.90625 +L 25.390625 72.90625 +L 16.796875 28.609375 +Q 16.265625 25.640625 16.046875 23.703125 +Q 15.828125 21.78125 15.828125 20.3125 +Q 15.828125 13.578125 19.578125 10.078125 +Q 23.34375 6.59375 30.609375 6.59375 +Q 40.046875 6.59375 45.28125 11.765625 +Q 50.53125 16.9375 52.78125 28.609375 +L 61.375 72.90625 +L 71.296875 72.90625 +L 62.5 27.390625 +Q 59.625 12.640625 51.5625 5.609375 +Q 43.5 -1.421875 29.5 -1.421875 +Q 18.5625 -1.421875 12.1875 4.078125 +Q 5.8125 9.578125 5.8125 19 +Q 5.8125 20.703125 6.046875 22.828125 +Q 6.296875 24.953125 6.78125 27.390625 +z +" id="DejaVuSans-Oblique-85"/> + <path d="M 54.890625 33.015625 +L 54.890625 0 +L 45.90625 0 +L 45.90625 32.71875 +Q 45.90625 40.484375 42.875 44.328125 +Q 39.84375 48.1875 33.796875 48.1875 +Q 26.515625 48.1875 22.3125 43.546875 +Q 18.109375 38.921875 18.109375 30.90625 +L 18.109375 0 +L 9.078125 0 +L 9.078125 75.984375 +L 18.109375 75.984375 +L 18.109375 46.1875 +Q 21.34375 51.125 25.703125 53.5625 +Q 30.078125 56 35.796875 56 +Q 45.21875 56 50.046875 50.171875 +Q 54.890625 44.34375 54.890625 33.015625 +z +" id="DejaVuSans-104"/> </defs> <use transform="translate(0 0.09375)" xlink:href="#DejaVuSans-Oblique-85"/> <use transform="translate(73.193359 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-116"/> <use transform="translate(100.639648 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-104"/> <use transform="translate(145.004883 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-114"/> - <use transform="translate(173.78418 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-101"/> - <use transform="translate(216.850586 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-115"/> - <use transform="translate(253.320312 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-104"/> - <use transform="translate(297.685547 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-111"/> - <use transform="translate(340.512695 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-108"/> - <use transform="translate(359.960938 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-100"/> </g> </g> <g id="text_18"> <g id="patch_8"> - <path d="M 56.696 247.207688 -L 75.196 247.207688 -L 75.196 229.529563 -L 56.696 229.529563 + <path d="M 58.37 144.871063 +L 76.87 144.871063 +L 76.87 127.192938 +L 58.37 127.192938 z " style="fill:#ffffff;stroke:#ffffff;stroke-linejoin:miter;"/> </g> <!-- $E_\mathrm{L}$ --> - <g transform="translate(60.696 241.128)scale(0.1 -0.1)"> + <g transform="translate(62.37 138.791375)scale(0.1 -0.1)"> <defs> <path d="M 16.890625 72.90625 L 62.984375 72.90625 @@ -1150,147 +1176,52 @@ z </g> <g id="text_19"> <g id="patch_9"> - <path d="M 56.696 167.479688 -L 79.196 167.479688 -L 79.196 149.801563 -L 56.696 149.801563 + <path d="M 58.37 181.111063 +L 77.87 181.111063 +L 77.87 163.432938 +L 58.37 163.432938 z " style="fill:#ffffff;stroke:#ffffff;stroke-linejoin:miter;"/> </g> - <!-- $U_\mathrm{m}$ --> - <g transform="translate(60.696 161.4)scale(0.1 -0.1)"> - <use transform="translate(0 0.09375)" xlink:href="#DejaVuSans-Oblique-85"/> - <use transform="translate(73.193359 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-109"/> - </g> - </g> - <g id="text_20"> - <!-- Spikes in --> - <g transform="translate(60.696 92.544)scale(0.1 -0.1)"> - <defs> - <path d="M 53.515625 70.515625 -L 53.515625 60.890625 -Q 47.90625 63.578125 42.921875 64.890625 -Q 37.9375 66.21875 33.296875 66.21875 -Q 25.25 66.21875 20.875 63.09375 -Q 16.5 59.96875 16.5 54.203125 -Q 16.5 49.359375 19.40625 46.890625 -Q 22.3125 44.4375 30.421875 42.921875 -L 36.375 41.703125 -Q 47.40625 39.59375 52.65625 34.296875 -Q 57.90625 29 57.90625 20.125 -Q 57.90625 9.515625 50.796875 4.046875 -Q 43.703125 -1.421875 29.984375 -1.421875 -Q 24.8125 -1.421875 18.96875 -0.25 -Q 13.140625 0.921875 6.890625 3.21875 -L 6.890625 13.375 -Q 12.890625 10.015625 18.65625 8.296875 -Q 24.421875 6.59375 29.984375 6.59375 -Q 38.421875 6.59375 43.015625 9.90625 -Q 47.609375 13.234375 47.609375 19.390625 -Q 47.609375 24.75 44.3125 27.78125 -Q 41.015625 30.8125 33.5 32.328125 -L 27.484375 33.5 -Q 16.453125 35.6875 11.515625 40.375 -Q 6.59375 45.0625 6.59375 53.421875 -Q 6.59375 63.09375 13.40625 68.65625 -Q 20.21875 74.21875 32.171875 74.21875 -Q 37.3125 74.21875 42.625 73.28125 -Q 47.953125 72.359375 53.515625 70.515625 -z -" id="DejaVuSans-83"/> - <path d="M 18.109375 8.203125 -L 18.109375 -20.796875 -L 9.078125 -20.796875 -L 9.078125 54.6875 -L 18.109375 54.6875 -L 18.109375 46.390625 -Q 20.953125 51.265625 25.265625 53.625 -Q 29.59375 56 35.59375 56 -Q 45.5625 56 51.78125 48.09375 -Q 58.015625 40.1875 58.015625 27.296875 -Q 58.015625 14.40625 51.78125 6.484375 -Q 45.5625 -1.421875 35.59375 -1.421875 -Q 29.59375 -1.421875 25.265625 0.953125 -Q 20.953125 3.328125 18.109375 8.203125 -z -M 48.6875 27.296875 -Q 48.6875 37.203125 44.609375 42.84375 -Q 40.53125 48.484375 33.40625 48.484375 -Q 26.265625 48.484375 22.1875 42.84375 -Q 18.109375 37.203125 18.109375 27.296875 -Q 18.109375 17.390625 22.1875 11.75 -Q 26.265625 6.109375 33.40625 6.109375 -Q 40.53125 6.109375 44.609375 11.75 -Q 48.6875 17.390625 48.6875 27.296875 -z -" id="DejaVuSans-112"/> - <path d="M 9.078125 75.984375 -L 18.109375 75.984375 -L 18.109375 31.109375 -L 44.921875 54.6875 -L 56.390625 54.6875 -L 27.390625 29.109375 -L 57.625 0 -L 45.90625 0 -L 18.109375 26.703125 -L 18.109375 0 -L 9.078125 0 -z -" id="DejaVuSans-107"/> - </defs> - <use xlink:href="#DejaVuSans-83"/> - <use x="63.476562" xlink:href="#DejaVuSans-112"/> - <use x="126.953125" xlink:href="#DejaVuSans-105"/> - <use x="154.736328" xlink:href="#DejaVuSans-107"/> - <use x="209.021484" xlink:href="#DejaVuSans-101"/> - <use x="270.544922" xlink:href="#DejaVuSans-115"/> - <use x="322.644531" xlink:href="#DejaVuSans-32"/> - <use x="354.431641" xlink:href="#DejaVuSans-105"/> - <use x="382.214844" xlink:href="#DejaVuSans-110"/> - </g> - </g> - <g id="text_21"> - <!-- Spikes out --> - <g transform="translate(60.696 70.8)scale(0.1 -0.1)"> + <!-- $E_\mathrm{R}$ --> + <g transform="translate(62.37 175.031375)scale(0.1 -0.1)"> <defs> - <path d="M 8.5 21.578125 -L 8.5 54.6875 -L 17.484375 54.6875 -L 17.484375 21.921875 -Q 17.484375 14.15625 20.5 10.265625 -Q 23.53125 6.390625 29.59375 6.390625 -Q 36.859375 6.390625 41.078125 11.03125 -Q 45.3125 15.671875 45.3125 23.6875 -L 45.3125 54.6875 -L 54.296875 54.6875 -L 54.296875 0 -L 45.3125 0 -L 45.3125 8.40625 -Q 42.046875 3.421875 37.71875 1 -Q 33.40625 -1.421875 27.6875 -1.421875 -Q 18.265625 -1.421875 13.375 4.4375 -Q 8.5 10.296875 8.5 21.578125 + <path d="M 44.390625 34.1875 +Q 47.5625 33.109375 50.5625 29.59375 +Q 53.5625 26.078125 56.59375 19.921875 +L 66.609375 0 +L 56 0 +L 46.6875 18.703125 +Q 43.0625 26.03125 39.671875 28.421875 +Q 36.28125 30.8125 30.421875 30.8125 +L 19.671875 30.8125 +L 19.671875 0 +L 9.8125 0 +L 9.8125 72.90625 +L 32.078125 72.90625 +Q 44.578125 72.90625 50.734375 67.671875 +Q 56.890625 62.453125 56.890625 51.90625 +Q 56.890625 45.015625 53.6875 40.46875 +Q 50.484375 35.9375 44.390625 34.1875 z -M 31.109375 56 +M 19.671875 64.796875 +L 19.671875 38.921875 +L 32.078125 38.921875 +Q 39.203125 38.921875 42.84375 42.21875 +Q 46.484375 45.515625 46.484375 51.90625 +Q 46.484375 58.296875 42.84375 61.546875 +Q 39.203125 64.796875 32.078125 64.796875 z -" id="DejaVuSans-117"/> +" id="DejaVuSans-82"/> </defs> - <use xlink:href="#DejaVuSans-83"/> - <use x="63.476562" xlink:href="#DejaVuSans-112"/> - <use x="126.953125" xlink:href="#DejaVuSans-105"/> - <use x="154.736328" xlink:href="#DejaVuSans-107"/> - <use x="209.021484" xlink:href="#DejaVuSans-101"/> - <use x="270.544922" xlink:href="#DejaVuSans-115"/> - <use x="322.644531" xlink:href="#DejaVuSans-32"/> - <use x="354.431641" xlink:href="#DejaVuSans-111"/> - <use x="415.613281" xlink:href="#DejaVuSans-117"/> - <use x="478.992188" xlink:href="#DejaVuSans-116"/> + <use transform="translate(0 0.09375)" xlink:href="#DejaVuSans-Oblique-69"/> + <use transform="translate(63.183594 -16.3125)scale(0.7)" xlink:href="#DejaVuSans-82"/> </g> </g> </g> </g> <defs> - <clipPath id="pe30e7958f1"> + <clipPath id="p00981e8856"> <rect height="217.44" width="334.8" x="54" y="34.56"/> </clipPath> </defs> diff --git a/doc/python/lif_cell.rst b/doc/python/lif_cell.rst index e79f1b1cfeb381b2e18901bbb5b7eab7c3bc1365..e9450ef75fec9906759b969bc634196f63b2140a 100644 --- a/doc/python/lif_cell.rst +++ b/doc/python/lif_cell.rst @@ -41,6 +41,10 @@ LIF cells Resting potential [mV]. + .. attribute:: E_R + + Reset potential [mV]. + .. attribute:: V_m Initial value of the Membrane potential [mV]. diff --git a/python/cells.cpp b/python/cells.cpp index 01ca7384ac2846e6822b67854d291af2c323a72f..b3d542c437df837eeb245cb480b1899dab018a95 100644 --- a/python/cells.cpp +++ b/python/cells.cpp @@ -226,6 +226,8 @@ void register_cells(pybind11::module& m) { "Membrane capacitance [pF].") .def_readwrite("E_L", &arb::lif_cell::E_L, "Resting potential [mV].") + .def_readwrite("E_R", &arb::lif_cell::E_R, + "Reset potential [mV].") .def_readwrite("V_m", &arb::lif_cell::V_m, "Initial value of the Membrane potential [mV].") .def_readwrite("t_ref", &arb::lif_cell::t_ref, diff --git a/python/test/unit/test_probes.py b/python/test/unit/test_probes.py index ff045a64cb5b4f00a88d87400359955ced3f3aef..dae9aea6eb3061a329eacda4fb8e8165c5b32007 100644 --- a/python/test/unit/test_probes.py +++ b/python/test/unit/test_probes.py @@ -214,15 +214,15 @@ class TestLifProbes(unittest.TestCase): exp = np.array( [ [0.0, -23.0], - [0.1, -22.77114618], - [0.2, -22.54456949], - [0.3, -22.32024727], - [0.4, -22.0981571], - [0.5, -21.87827676], - [0.6, -21.66058427], - [0.7, -21.44505786], - [0.8, -21.23167597], - [0.9, -21.02041726], + [0.1, -23.18905316], + [0.2, -23.37622521], + [0.3, -23.56153486], + [0.4, -23.74500066], + [0.5, -23.92664093], + [0.6, -24.10647386], + [0.7, -24.28451742], + [0.8, -24.46078942], + [0.9, -24.63530748], ] ) for d, _ in smp: diff --git a/test/unit/test_lif_cell_group.cpp b/test/unit/test_lif_cell_group.cpp index 60d8d8c9eee2caff969e33e6e28a0aa2c1570dbe..b2241b2ff3bda7988bbbb5cdec009272affafd20 100644 --- a/test/unit/test_lif_cell_group.cpp +++ b/test/unit/test_lif_cell_group.cpp @@ -127,9 +127,11 @@ public: util::unique_any get_cell_description(cell_gid_type gid) const override { auto cell = lif_cell("src", "tgt"); if (gid == 0) { - cell.E_L = -42; - cell.V_m = -23; - cell.t_ref = 0.2; + cell.E_R = -23; + cell.V_m = -18; + cell.E_L = -13; + cell.t_ref = 0.8; + cell.tau_m = 5; } return cell; } @@ -140,7 +142,9 @@ public: return {arb::lif_probe_voltage{}}; } } - std::vector<event_generator> event_generators(cell_gid_type) const override { return {regular_generator({"tgt"}, 100.0, 0.25, 0.05)}; } + std::vector<event_generator> event_generators(cell_gid_type) const override { + return {regular_generator({"tgt"}, 200.0, 2.0, 1.0, 6.0)}; + } }; TEST(lif_cell_group, throw) { @@ -271,67 +275,407 @@ TEST(lif_cell_group, probe) { [&spikes](const std::vector<spike>& spk) { for (const auto& s: spk) spikes.push_back(s.time); } ); - sim.run(1.5, 0.005); - std::vector<Um_type> exp = {{0, -23}, - {0.025, -22.9425718}, - {0.05, -22.885287}, - {0.075, -22.8281453}, - {0.1, -22.7711462}, - {0.125, -22.7142894}, - {0.15, -22.6575746}, - {0.175, -22.6010014}, - {0.2, -22.5445695}, - {0.225, -22.4882785}, - {0.25, -17.432128}, - {0.275, -17.3886021}, - {0.3, -12.3451849}, - {0.325, -12.3143605}, - {0.35, -7.28361301}, - {0.375, -7.26542672}, - {0.4, -2.24728584}, - {0.425, -2.24167464}, - {0.45, 2.76392255}, - {0.475, 2.75702137}, - {0.5, 7.75013743}, - {0.525, 7.73078628}, - {0.55, -42}, - {0.575, -42}, - {0.6, -42}, - {0.625, -42}, - {0.65, -42}, - {0.675, -42}, - {0.7, -42}, - {0.725, -42}, - {0.75, -37}, - {0.775, -36.9076155}, - {0.8, -31.8154617}, - {0.825, -31.7360224}, - {0.85, -26.6567815}, - {0.875, -26.5902227}, - {0.9, -21.5238302}, - {0.925, -21.4700878}, - {0.95, -16.4164796}, - {0.975, -16.3754897}, - {1, -11.3346021}, - {1.025, -11.306301}, - {1.05, -6.27807055}, - {1.075, -6.26239498}, - {1.1, -1.24675854}, - {1.125, -1.24364554}, - {1.15, 3.75945969}, - {1.175, 3.75007278}, - {1.2, 8.74070931}, - {1.225, 8.71888483}, - {1.25, -42}, - {1.275, -42}, - {1.3, -42}, - {1.325, -42}, - {1.35, -42}, - {1.375, -42}, - {1.4, -42}, - {1.425, -42}, - {1.45, -37}, - {1.475, -36.9076155},}; + sim.run(10, 0.005); +std::vector<Um_type> exp = {{ 0, -18 }, + { 0.025, -17.9750624 }, + { 0.05, -17.9502492 }, + { 0.075, -17.9255597 }, + { 0.1, -17.9009934 }, + { 0.125, -17.8765496 }, + { 0.15, -17.8522277 }, + { 0.175, -17.8280271 }, + { 0.2, -17.8039472 }, + { 0.225, -17.7799874 }, + { 0.25, -17.7561471 }, + { 0.275, -17.7324257 }, + { 0.3, -17.7088227 }, + { 0.325, -17.6853373 }, + { 0.35, -17.6619691 }, + { 0.375, -17.6387174 }, + { 0.4, -17.6155817 }, + { 0.425, -17.5925614 }, + { 0.45, -17.5696559 }, + { 0.475, -17.5468647 }, + { 0.5, -17.5241871 }, + { 0.525, -17.5016226 }, + { 0.55, -17.4791707 }, + { 0.575, -17.4568307 }, + { 0.6, -17.4346022 }, + { 0.625, -17.4124845 }, + { 0.65, -17.3904772 }, + { 0.675, -17.3685796 }, + { 0.7, -17.3467912 }, + { 0.725, -17.3251115 }, + { 0.75, -17.3035399 }, + { 0.775, -17.2820759 }, + { 0.8, -17.2607189 }, + { 0.825, -17.2394685 }, + { 0.85, -17.2183241 }, + { 0.875, -17.1972851 }, + { 0.9, -17.1763511 }, + { 0.925, -17.1555214 }, + { 0.95, -17.1347957 }, + { 0.975, -17.1141733 }, + { 1, -17.0936538 }, + { 1.025, -17.0732366 }, + { 1.05, -17.0529212 }, + { 1.075, -17.0327072 }, + { 1.1, -17.012594 }, + { 1.125, -16.9925811 }, + { 1.15, -16.972668 }, + { 1.175, -16.9528542 }, + { 1.2, -16.9331393 }, + { 1.225, -16.9135227 }, + { 1.25, -16.8940039 }, + { 1.275, -16.8745825 }, + { 1.3, -16.8552579 }, + { 1.325, -16.8360297 }, + { 1.35, -16.8168975 }, + { 1.375, -16.7978606 }, + { 1.4, -16.7789187 }, + { 1.425, -16.7600713 }, + { 1.45, -16.7413178 }, + { 1.475, -16.7226579 }, + { 1.5, -16.7040911 }, + { 1.525, -16.6856169 }, + { 1.55, -16.6672348 }, + { 1.575, -16.6489444 }, + { 1.6, -16.6307452 }, + { 1.625, -16.6126368 }, + { 1.65, -16.5946187 }, + { 1.675, -16.5766904 }, + { 1.7, -16.5588516 }, + { 1.725, -16.5411018 }, + { 1.75, -16.5234404 }, + { 1.775, -16.5058672 }, + { 1.8, -16.4883816 }, + { 1.825, -16.4709833 }, + { 1.85, -16.4536717 }, + { 1.875, -16.4364464 }, + { 1.9, -16.419307 }, + { 1.925, -16.4022532 }, + { 1.95, -16.3852844 }, + { 1.975, -16.3684002 }, + { 2, -6.35160023 }, + { 2.025, -6.38475926 }, + { 2.05, -6.41775291 }, + { 2.075, -6.45058201 }, + { 2.1, -6.48324737 }, + { 2.125, -6.51574981 }, + { 2.15, -6.54809014 }, + { 2.175, -6.58026917 }, + { 2.2, -6.61228771 }, + { 2.225, -6.64414656 }, + { 2.25, -6.67584651 }, + { 2.275, -6.70738836 }, + { 2.3, -6.73877289 }, + { 2.325, -6.77000089 }, + { 2.35, -6.80107314 }, + { 2.375, -6.83199042 }, + { 2.4, -6.8627535 }, + { 2.425, -6.89336314 }, + { 2.45, -6.92382012 }, + { 2.475, -6.95412519 }, + { 2.5, -6.98427912 }, + { 2.525, -7.01428265 }, + { 2.55, -7.04413654 }, + { 2.575, -7.07384153 }, + { 2.6, -7.10339837 }, + { 2.625, -7.1328078 }, + { 2.65, -7.16207054 }, + { 2.675, -7.19118733 }, + { 2.7, -7.22015891 }, + { 2.725, -7.24898599 }, + { 2.75, -7.27766929 }, + { 2.775, -7.30620953 }, + { 2.8, -7.33460743 }, + { 2.825, -7.36286369 }, + { 2.85, -7.39097903 }, + { 2.875, -7.41895414 }, + { 2.9, -7.44678972 }, + { 2.925, -7.47448647 }, + { 2.95, -7.50204508 }, + { 2.975, -7.52946625 }, + { 3, 2.44324935 }, + { 3.025, 2.36622582 }, + { 3.05, 2.28958645 }, + { 3.075, 2.21332932 }, + { 3.1, 2.13745252 }, + { 3.125, 2.06195417 }, + { 3.15, 1.98683236 }, + { 3.175, 1.91208522 }, + { 3.2, 1.83771088 }, + { 3.225, 1.76370749 }, + { 3.25, 1.69007319 }, + { 3.275, 1.61680615 }, + { 3.3, 1.54390452 }, + { 3.325, 1.47136649 }, + { 3.35, 1.39919025 }, + { 3.375, 1.32737399 }, + { 3.4, 1.25591592 }, + { 3.425, 1.18481424 }, + { 3.45, 1.11406718 }, + { 3.475, 1.04367298 }, + { 3.5, 0.973629868 }, + { 3.525, 0.903936098 }, + { 3.55, 0.834589928 }, + { 3.575, 0.765589623 }, + { 3.6, 0.696933458 }, + { 3.625, 0.628619717 }, + { 3.65, 0.560646693 }, + { 3.675, 0.493012686 }, + { 3.7, 0.425716004 }, + { 3.725, 0.358754966 }, + { 3.75, 0.292127898 }, + { 3.775, 0.225833133 }, + { 3.8, 0.159869015 }, + { 3.825, 0.0942338948 }, + { 3.85, 0.0289261308 }, + { 3.875, -0.0360559094 }, + { 3.9, -0.10071385 }, + { 3.925, -0.165049308 }, + { 3.95, -0.229063892 }, + { 3.975, -0.292759202 }, + { 4, 9.64386317 }, + { 4.025, 9.53092643 }, + { 4.05, 9.41855297 }, + { 4.075, 9.30673997 }, + { 4.1, 9.19548464 }, + { 4.125, 9.0847842 }, + { 4.15, 8.97463588 }, + { 4.175, 8.86503692 }, + { 4.2, 8.7559846 }, + { 4.225, 8.64747617 }, + { 4.25, 8.53950893 }, + { 4.275, 8.43208018 }, + { 4.3, 8.32518724 }, + { 4.325, 8.21882742 }, + { 4.35, 8.11299808 }, + { 4.375, 8.00769656 }, + { 4.4, 7.90292024 }, + { 4.425, 7.79866649 }, + { 4.45, 7.69493271 }, + { 4.475, 7.5917163 }, + { 4.5, 7.48901469 }, + { 4.525, 7.3868253 }, + { 4.55, 7.28514558 }, + { 4.575, 7.183973 }, + { 4.6, 7.08330501 }, + { 4.625, 6.98313911 }, + { 4.65, 6.88347279 }, + { 4.675, 6.78430355 }, + { 4.7, 6.68562893 }, + { 4.725, 6.58744644 }, + { 4.75, 6.48975365 }, + { 4.775, 6.3925481 }, + { 4.8, 6.29582736 }, + { 4.825, 6.19958902 }, + { 4.85, 6.10383067 }, + { 4.875, 6.00854992 }, + { 4.9, 5.91374438 }, + { 4.925, 5.81941168 }, + { 4.95, 5.72554948 }, + { 4.975, 5.63215541 }, + { 5, -23 }, + { 5.025, -23 }, + { 5.05, -23 }, + { 5.075, -23 }, + { 5.1, -23 }, + { 5.125, -23 }, + { 5.15, -23 }, + { 5.175, -23 }, + { 5.2, -23 }, + { 5.225, -23 }, + { 5.25, -23 }, + { 5.275, -23 }, + { 5.3, -23 }, + { 5.325, -23 }, + { 5.35, -23 }, + { 5.375, -23 }, + { 5.4, -23 }, + { 5.425, -23 }, + { 5.45, -23 }, + { 5.475, -23 }, + { 5.5, -23 }, + { 5.525, -23 }, + { 5.55, -23 }, + { 5.575, -23 }, + { 5.6, -23 }, + { 5.625, -23 }, + { 5.65, -23 }, + { 5.675, -23 }, + { 5.7, -23 }, + { 5.725, -23 }, + { 5.75, -23 }, + { 5.775, -23 }, + { 5.8, -23 }, + { 5.825, -22.9501248 }, + { 5.85, -22.9004983 }, + { 5.875, -22.8511194 }, + { 5.9, -22.8019867 }, + { 5.925, -22.7530991 }, + { 5.95, -22.7044553 }, + { 5.975, -22.6560542 }, + { 6, -22.6078944 }, + { 6.025, -22.5599748 }, + { 6.05, -22.5122942 }, + { 6.075, -22.4648515 }, + { 6.1, -22.4176453 }, + { 6.125, -22.3706746 }, + { 6.15, -22.3239382 }, + { 6.175, -22.2774349 }, + { 6.2, -22.2311635 }, + { 6.225, -22.1851228 }, + { 6.25, -22.1393119 }, + { 6.275, -22.0937293 }, + { 6.3, -22.0483742 }, + { 6.325, -22.0032452 }, + { 6.35, -21.9583414 }, + { 6.375, -21.9136614 }, + { 6.4, -21.8692044 }, + { 6.425, -21.824969 }, + { 6.45, -21.7809543 }, + { 6.475, -21.7371591 }, + { 6.5, -21.6935824 }, + { 6.525, -21.6502229 }, + { 6.55, -21.6070798 }, + { 6.575, -21.5641518 }, + { 6.6, -21.5214379 }, + { 6.625, -21.478937 }, + { 6.65, -21.4366482 }, + { 6.675, -21.3945702 }, + { 6.7, -21.3527021 }, + { 6.725, -21.3110428 }, + { 6.75, -21.2695913 }, + { 6.775, -21.2283466 }, + { 6.8, -21.1873075 }, + { 6.825, -21.1464732 }, + { 6.85, -21.1058425 }, + { 6.875, -21.0654144 }, + { 6.9, -21.025188 }, + { 6.925, -20.9851622 }, + { 6.95, -20.945336 }, + { 6.975, -20.9057085 }, + { 7, -20.8662786 }, + { 7.025, -20.8270454 }, + { 7.05, -20.7880078 }, + { 7.075, -20.749165 }, + { 7.1, -20.7105159 }, + { 7.125, -20.6720595 }, + { 7.15, -20.6337949 }, + { 7.175, -20.5957212 }, + { 7.2, -20.5578374 }, + { 7.225, -20.5201425 }, + { 7.25, -20.4826357 }, + { 7.275, -20.4453159 }, + { 7.3, -20.4081822 }, + { 7.325, -20.3712337 }, + { 7.35, -20.3344696 }, + { 7.375, -20.2978887 }, + { 7.4, -20.2614904 }, + { 7.425, -20.2252735 }, + { 7.45, -20.1892373 }, + { 7.475, -20.1533809 }, + { 7.5, -20.1177032 }, + { 7.525, -20.0822035 }, + { 7.55, -20.0468809 }, + { 7.575, -20.0117344 }, + { 7.6, -19.9767633 }, + { 7.625, -19.9419665 }, + { 7.65, -19.9073433 }, + { 7.675, -19.8728928 }, + { 7.7, -19.8386141 }, + { 7.725, -19.8045064 }, + { 7.75, -19.7705687 }, + { 7.775, -19.7368004 }, + { 7.8, -19.7032005 }, + { 7.825, -19.6697681 }, + { 7.85, -19.6365025 }, + { 7.875, -19.6034028 }, + { 7.9, -19.5704682 }, + { 7.925, -19.5376979 }, + { 7.95, -19.5050909 }, + { 7.975, -19.4726467 }, + { 8, -19.4403642 }, + { 8.025, -19.4082428 }, + { 8.05, -19.3762815 }, + { 8.075, -19.3444797 }, + { 8.1, -19.3128365 }, + { 8.125, -19.2813511 }, + { 8.15, -19.2500227 }, + { 8.175, -19.2188506 }, + { 8.2, -19.1878339 }, + { 8.225, -19.156972 }, + { 8.25, -19.1262639 }, + { 8.275, -19.0957091 }, + { 8.3, -19.0653066 }, + { 8.325, -19.0350558 }, + { 8.35, -19.0049558 }, + { 8.375, -18.9750059 }, + { 8.4, -18.9452055 }, + { 8.425, -18.9155536 }, + { 8.45, -18.8860497 }, + { 8.475, -18.8566929 }, + { 8.5, -18.8274825 }, + { 8.525, -18.7984178 }, + { 8.55, -18.7694981 }, + { 8.575, -18.7407226 }, + { 8.6, -18.7120906 }, + { 8.625, -18.6836015 }, + { 8.65, -18.6552544 }, + { 8.675, -18.6270487 }, + { 8.7, -18.5989837 }, + { 8.725, -18.5710586 }, + { 8.75, -18.5432728 }, + { 8.775, -18.5156257 }, + { 8.8, -18.4881164 }, + { 8.825, -18.4607443 }, + { 8.85, -18.4335087 }, + { 8.875, -18.406409 }, + { 8.9, -18.3794444 }, + { 8.925, -18.3526143 }, + { 8.95, -18.325918 }, + { 8.975, -18.2993549 }, + { 9, -18.2729242 }, + { 9.025, -18.2466254 }, + { 9.05, -18.2204578 }, + { 9.075, -18.1944206 }, + { 9.1, -18.1685133 }, + { 9.125, -18.1427353 }, + { 9.15, -18.1170858 }, + { 9.175, -18.0915642 }, + { 9.2, -18.0661699 }, + { 9.225, -18.0409023 }, + { 9.25, -18.0157607 }, + { 9.275, -17.9907445 }, + { 9.3, -17.965853 }, + { 9.325, -17.9410857 }, + { 9.35, -17.916442 }, + { 9.375, -17.8919211 }, + { 9.4, -17.8675226 }, + { 9.425, -17.8432457 }, + { 9.45, -17.8190899 }, + { 9.475, -17.7950546 }, + { 9.5, -17.7711392 }, + { 9.525, -17.747343 }, + { 9.55, -17.7236655 }, + { 9.575, -17.7001061 }, + { 9.6, -17.6766643 }, + { 9.625, -17.6533393 }, + { 9.65, -17.6301307 }, + { 9.675, -17.6070378 }, + { 9.7, -17.5840601 }, + { 9.725, -17.561197 }, + { 9.75, -17.538448 }, + { 9.775, -17.5158123 }, + { 9.8, -17.4932896 }, + { 9.825, -17.4708793 }, + { 9.85, -17.4485807 }, + { 9.875, -17.4263933 }, + { 9.9, -17.4043165 }, + { 9.925, -17.3823499 }, + { 9.95, -17.3604929 }, + { 9.975, -17.3387448 },}; ASSERT_TRUE(testing::seq_eq(ums[{0, 0}], exp)); ASSERT_TRUE(testing::seq_eq(ums[{0, 1}], exp)); @@ -341,6 +685,6 @@ TEST(lif_cell_group, probe) { // now check the spikes std::sort(spikes.begin(), spikes.end()); EXPECT_EQ(spikes.size(), 3); - std::vector<double> sexp{0.35, 0.55, 1.25}; + std::vector<double> sexp{2, 4, 5}; ASSERT_TRUE(testing::seq_almost_eq<double>(spikes, sexp)); }