diff --git a/doc/concepts/cable_cell.rst b/doc/concepts/cable_cell.rst index 60ffdce9169e70e969595eeb23ba2d59bd516321..a619051264b61e50e8ecf49eb786f9f6f81b6d64 100644 --- a/doc/concepts/cable_cell.rst +++ b/doc/concepts/cable_cell.rst @@ -5,7 +5,7 @@ Cable cells An Arbor *cable cell* is a full :ref:`description <modelcelldesc>` of a cell with morphology and cell dynamics like ion species and their properties, ion -channels, synapses, gap junction mechanisms, stimuli and spike detectors. +channels, synapses, gap junction mechanisms, stimuli and threshold detectors. Cable cells are constructed from three components: diff --git a/doc/concepts/cell.rst b/doc/concepts/cell.rst index eaef2c438812835df9a82ab4aa9603b6045238c7..117b1960e9b0d7303c28aa0015c7e1b6db6825c2 100644 --- a/doc/concepts/cell.rst +++ b/doc/concepts/cell.rst @@ -26,7 +26,7 @@ Cells interact with each other via spike exchange and gap junctions. Cell interactions via :ref:`connections <modelconnections>` and :ref:`gap junctions <modelgapjunctions>` occur between **source**, **target** and **gap junction site** locations on a cell. Connections are formed from sources to targets. Gap junctions are formed between two gap junction sites. An example of a source on a -:ref:`cable cell<modelcablecell>` is a :ref:`threshold detector <cablecell-threshold-detectors>` (spike detector); +:ref:`cable cell<modelcablecell>` is a :ref:`threshold detector <cablecell-threshold-detectors>`; an example of a target on a cable cell is a :ref:`synapse <cablecell-synapses>`. **Sources**, **targets** and **gap junction sites** are placed on sets of one or more locations on a cell. diff --git a/doc/concepts/decor.rst b/doc/concepts/decor.rst index db6264c75bd9af391233875396be5ca369f9c8fa..62f2690e7bc71b6f65f992cf9b964327e6344fc3 100644 --- a/doc/concepts/decor.rst +++ b/doc/concepts/decor.rst @@ -22,7 +22,7 @@ The choice of region or locset is reflected in the two broad classes of dynamics * :ref:`Synapse mechanisms <cablecell-synapses>`. * :ref:`Gap junction mechanisms <cablecell-gj-mechs>`. - * :ref:`Threshold detectors <cablecell-threshold-detectors>` (spike detectors). + * :ref:`Threshold detectors <cablecell-threshold-detectors>` * :ref:`Stimuli <cablecell-stimuli>`. * :ref:`Probes <cablecell-probes>`. @@ -353,19 +353,19 @@ A point mechanism (synapse) can form the target of a :term:`connection` on a cel .. _cablecell-threshold-detectors: -2. Threshold detectors (spike detectors). +2. Threshold detectors. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Spike detectors have a dual use: they can be used to record spike times, but are also used in propagating signals +Threshold detectors have a dual use: they can be used to record spike times, but are also used in propagating signals between cells. An example where we're interested in when a threshold of ``-10 mV`` is reached: .. code-block:: Python - # Placing a spike detector might look like this. + # Placing a threshold detector might look like this. decor = arbor.decor() - decor.place('"root"', arbor.spike_detector(-10), "my_spike_detector") + decor.place('"root"', arbor.threshold_detector(-10), "detector") - # At this point, "my_spike_detector" could be connected to another cell, + # At this point, "detector" could be connected to another cell, # and it would transmit events upon the voltage crossing the threshold. # Just printing those spike times goes as follows. @@ -376,7 +376,7 @@ between cells. An example where we're interested in when a threshold of ``-10 mV for sp in sim.spikes(): print(" ", sp) -See also :term:`spike detector`. +See also :term:`threshold detector`. .. _cablecell-gj-mechs: diff --git a/doc/concepts/domdec.rst b/doc/concepts/domdec.rst index f4dac781a639972c421f640d563838be4eadc66a..bc9ea903d4d0b4832e21ccb10dadc34e73351f22 100644 --- a/doc/concepts/domdec.rst +++ b/doc/concepts/domdec.rst @@ -37,8 +37,8 @@ We define some terms as used in the context of connectivity connection Tuple of ``(source, target, weight, delay)`` describing an axon/synapse connection as travelling time (`delay`) and attenuation - (`weight`) between two sites `source = (gid, spike_detector)` and `target - = (gid, synapse)` where `spike_detector` and `synapse` are string labels. + (`weight`) between two sites `source = (gid, threshold_detector)` and `target + = (gid, synapse)` where `threshold_detector` and `synapse` are string labels. cell_group List of same-kinded cells that share some information. Must not be split diff --git a/doc/concepts/interconnectivity.rst b/doc/concepts/interconnectivity.rst index 8c56064801cb1bfbe9467165a2c6d685a6220f10..a88e44eb82fd1a3a898c9eea34ee4dd47ec2b699 100644 --- a/doc/concepts/interconnectivity.rst +++ b/doc/concepts/interconnectivity.rst @@ -105,7 +105,7 @@ full recipe. action potential Spikes travel over :term:`connections <connection>`. In a synapse, they generate an event. - spike detector + threshold detector :ref:`Placed <cablecell-place>` on a cell. Possible source of a connection. Detects crossing of a fixed threshold and generates corresponding events. Also used to :ref:`record spikes <>` for analysis. See :ref:`here diff --git a/doc/concepts/probe_sample.rst b/doc/concepts/probe_sample.rst index cdd480c4515af1e4885614ecc9aed908606b9e22..0e3b0fcf94eb9c5f923a876459638b842a5ae298 100644 --- a/doc/concepts/probe_sample.rst +++ b/doc/concepts/probe_sample.rst @@ -61,8 +61,8 @@ Definitions Spiking ******* -Spike detectors have a dual use: they can be used to record spike times, but are also used in propagating signals -between cells. See also :term:`spike detector` and :ref:`cablecell-threshold-detectors`. +Threshold detectors have a dual use: they can be used to record spike times, but are also used in propagating signals +between cells. See also :term:`threshold detector` and :ref:`cablecell-threshold-detectors`. API diff --git a/doc/concepts/recipe.rst b/doc/concepts/recipe.rst index c3b98ecff4ceaaccfde38a6736768514dfb6941e..c6ad21a036c91c7d375de74c98b1d1fcaf4aaee8 100644 --- a/doc/concepts/recipe.rst +++ b/doc/concepts/recipe.rst @@ -23,11 +23,11 @@ An example model To better illustrate the content of a recipe, let's consider the following network of three cells: -- ``Cell 0``: Is a single soma, with ``hh`` (Hodgkin-huxley) dynamics. A spike detector +- ``Cell 0``: Is a single soma, with ``hh`` (Hodgkin-huxley) dynamics. A threshold detector labelled "detector_0" is attached to the middle of the soma. The detector will generate a spike event when the voltage goes above 10 mV. At the same spot on the soma, a current clamp is also attached, with the intention of triggering some spikes. All of the preceding info — - the morphology, dynamics, spike detector and current clamp — constitute what is termed the + the morphology, dynamics, threshold detector and current clamp — constitute what is termed the **description** of the cell. ``Cell 0`` should be modelled as a :ref:`cable cell<modelcablecell>`, (because cable cells allow complex dynamics such as ``hh``). This is referred to as diff --git a/doc/dev/communication.rst b/doc/dev/communication.rst index 81661345337bec61e45ac0b45680c47a53ee02f5..5ac1c5f3f25fcee21129a2181ad94106d4f09a85 100644 --- a/doc/dev/communication.rst +++ b/doc/dev/communication.rst @@ -11,7 +11,7 @@ reduced to a simple time value. The connection is abstracted into a weight and a delay; modelling all axonal processes. While this may seem crude, it is a well supported model and commonly used in neuronal simulations. -Connections are formed between sources (cable cell: spike detectors) and targets +Connections are formed between sources (cable cell: threshold detectors) and targets (cable cell: synapses). During runtime, events from all sources are concatenated on all MPI ranks using ``Allgatherv`` and targets are responsible for selecting events they have subscribed to. This is optimised for by sorting events locally diff --git a/doc/dev/mechanism_abi.rst b/doc/dev/mechanism_abi.rst index 6c866051102a6e66f80422d98466d680b93a52e9..7fe829c98a3ae9b8c36c5825e79791bb6516af36 100644 --- a/doc/dev/mechanism_abi.rst +++ b/doc/dev/mechanism_abi.rst @@ -177,7 +177,7 @@ fully formed to the interface. At this point: .. c:member:: arb_index_type n_detectors - Number of spike detectors + Number of threshold detectors .. c:member:: arb_index_type* vec_ci diff --git a/doc/python/decor.rst b/doc/python/decor.rst index f8fbc43e143904bf53446a2382019ef8e2059649..bf7fe413f5653362d78c712e9d25e722e9d0c5eb 100644 --- a/doc/python/decor.rst +++ b/doc/python/decor.rst @@ -152,7 +152,7 @@ Cable cell decoration .. method:: place(locations, d, label) :noindex: - Add a voltage spike detector at each location in ``locations`` and label the group of detectors with ``label``. + Add a voltage threshold detector at each location in ``locations`` and label the group of detectors with ``label``. The label can be used to form connections from one of the detectors in the :py:class:`arbor.recipe` by creating a :py:class:`arbor.connection`. diff --git a/doc/python/interconnectivity.rst b/doc/python/interconnectivity.rst index 971147f7632da348c7005e8a3c94e3d7f1462ac1..e5c40905b5e33f78dc81da5f7633c032c182eea2 100644 --- a/doc/python/interconnectivity.rst +++ b/doc/python/interconnectivity.rst @@ -54,10 +54,10 @@ Interconnectivity labels['synapse_site'] = '(location 1 0.5)' labels['root'] = '(root)' - # Place 'expsyn' mechanism on "synapse_site", and a spike detector at "root" + # Place 'expsyn' mechanism on "synapse_site", and a threshold detector at "root" decor = arbor.decor() decor.place('"synapse_site"', 'expsyn', 'syn') - decor.place('"root"', arbor.spike_detector(-10), 'detector') + decor.place('"root"', arbor.threshold_detector(-10), 'detector') # Implement the connections_on() function on a recipe as follows: def connections_on(gid): @@ -104,12 +104,11 @@ Interconnectivity The unit-less weight of the gap junction connection. -.. class:: spike_detector +.. class:: threshold_detector - A spike detector, generates a spike when voltage crosses a threshold. Can be used as source endpoint for an + A threshold detector, generates a spike when voltage crosses a threshold. Can be used as source endpoint for an :class:`arbor.connection`. .. attribute:: threshold - Voltage threshold of spike detector [mV] - + Voltage threshold of threshold detector [mV] diff --git a/doc/python/simulation.rst b/doc/python/simulation.rst index 818c73633d6599d752446833e1246f628d872231..76531effe77f83a38fed724d2ece7457628b13f8 100644 --- a/doc/python/simulation.rst +++ b/doc/python/simulation.rst @@ -232,7 +232,7 @@ spikes generated by any MPI rank. Spikes recorded during a simulation are returned as a NumPy structured datatype with two fields, ``source`` and ``time``. The ``source`` field itself is a structured datatype with two fields, -``gid`` and ``index``, identifying the spike detector that generated the spike. +``gid`` and ``index``, identifying the threshold detector that generated the spike. .. Note:: diff --git a/doc/tutorial/network_ring.rst b/doc/tutorial/network_ring.rst index e7170c12526be70efe9b1b67b33a4101d90dd672..06e73c39c2f9e53053e1dad482bf2c11c91ad715 100644 --- a/doc/tutorial/network_ring.rst +++ b/doc/tutorial/network_ring.rst @@ -51,7 +51,7 @@ The synapse is given the label ``'syn'``, which is later used to form :py:class: (see :py:class:`arbor.mechanism`). In particular, the ``e`` parameter of ``expsyn`` defaults to ``0``, which makes it, given the typical resting potential of cell membranes of ``-70 mV``, an excitatory synapse. -Step **(4)** places a spike detector at the ``'root'``. The detector is given the label ``'detector'``, which is later used to form +Step **(4)** places a threshold detector at the ``'root'``. The detector is given the label ``'detector'``, which is later used to form :py:class:`arbor.connection` objects originating *from* the cell. .. Note:: diff --git a/doc/tutorial/single_cell_allen.rst b/doc/tutorial/single_cell_allen.rst index 16c53748183e7d51063a868b045c78a2a03c354c..292e2afca44b300ba666efb07ebd6184c2a50e89 100644 --- a/doc/tutorial/single_cell_allen.rst +++ b/doc/tutorial/single_cell_allen.rst @@ -107,7 +107,7 @@ Step **(8)** assigns the regional mechanisms. Now that the electro-physiology is all set up, let's move on to the experimental setup. Step **(9)** configures the :class:`stimulus <arbor.iclamp>` of 150 nA for a duration of 1 s, starting after 200 ms -of the start of the simulation. We'll also install a :class:`arbor.spike_detector` that triggers at -40 mV. (The +of the start of the simulation. We'll also install a :class:`arbor.threshold_detector` that triggers at -40 mV. (The location is usually the soma, as is confirmed by coordinates found in the experimental dataset at ``488683423.nwb/general/intracellular_ephys/Electrode 1/location``) @@ -147,7 +147,7 @@ Then, we extract Arbor's output, accessible after the simulation ran at :width: 400 :align: center - Plot of experiment 35 of the Allen model, compared to the reference generated by the AllenSDK. In green: the spike detector output; in shaded grey: the stimulus. + Plot of experiment 35 of the Allen model, compared to the reference generated by the AllenSDK. In green: the threshold detector output; in shaded grey: the stimulus. .. note:: diff --git a/doc/tutorial/single_cell_detailed.rst b/doc/tutorial/single_cell_detailed.rst index c61ad38715d790d5df5a75a115f45eb604dec67c..d7cc8f0868ba9b23fd43d3922131fd5a077104ce 100644 --- a/doc/tutorial/single_cell_detailed.rst +++ b/doc/tutorial/single_cell_detailed.rst @@ -281,9 +281,9 @@ mechanism has a custom 'gbar' parameter. :language: python :lines: 8,56-59 -The decor object is also used to *place* stimuli and spike detectors on the cell using :meth:`arbor.decor.place`. +The decor object is also used to *place* stimuli and threshold detectors on the cell using :meth:`arbor.decor.place`. We place 3 current clamps of 2 nA on the "root" locset defined earlier, starting at time = 10, 30, 50 ms and -lasting 1ms each. As well as spike detectors on the "axon_terminal" locset for voltages above -10 mV. +lasting 1ms each. As well as threshold detectors on the "axon_terminal" locset for voltages above -10 mV. Every placement gets a label. The labels of detectors and synapses are used to form connection from and to them in the recipe. @@ -385,7 +385,7 @@ The probes ^^^^^^^^^^ The model is almost ready for simulation. Except that the only output we would be able to -measure at this point is the spikes from the spike detectors placed in the decor. +measure at this point is the spikes from the threshold detectors placed in the decor. The :class:`arbor.single_cell_model` can also measure the voltage on specific locations of the cell. We can indicate the location we would like to probe using labels from the :class:`label_dict`: @@ -406,9 +406,9 @@ The cell and model descriptions are now complete and we can run the simulation: The results ^^^^^^^^^^^ -Finally we move on to the data collection segment of the example. We have added a spike detector +Finally we move on to the data collection segment of the example. We have added a threshold detector on the "axon_terminal" locset. The :class:`arbor.single_cell_model` automatically registers all -spikes on the cell from all spike detectors on the cell and saves the times at which they occurred. +spikes on the cell from all threshold detectors on the cell and saves the times at which they occurred. .. literalinclude:: ../../python/example/single_cell_detailed.py :language: python diff --git a/doc/tutorial/single_cell_model.rst b/doc/tutorial/single_cell_model.rst index 252c596aef490425b1c82b63f07c398c6259c182..e0f5394f51677d5949deed675f7a87f29ba1bba8 100644 --- a/doc/tutorial/single_cell_model.rst +++ b/doc/tutorial/single_cell_model.rst @@ -32,7 +32,7 @@ and a current clamp stimulus, then run the model for 30 ms. The first step is to construct the cell. In Arbor, the abstract representation used to define a cell with branching cable morphology is a ``cable_cell``, which holds a description of the cell's morphology, named regions and locations on the morphology, and -descriptions of ion channels, synapses, spike detectors and electrical properties. +descriptions of ion channels, synapses, threshold detectors and electrical properties. Our *single-segment HH cell* has a simple morphology and dynamics, constructed as follows: @@ -73,9 +73,9 @@ following way: HH dynamics on the region we previously named ``"soma"`` in our label dictionary. * :meth:`arbor.decor.place` is used to add objects on a precise :class:`arbor.location` on a cell. Examples of objects that are *placed* are synapses, - spike detectors, current stimuli, and probes. In the above example we place a current stimulus + threshold detectors, current stimuli, and probes. In the above example we place a current stimulus :class:`arbor.iclamp` with a duration of 2 ms and a current of 0.8 nA, starting at 10 ms - on the location we previously labelled ``"midpoint"``. We also place a :class:`arbor.spike_detector` + on the location we previously labelled ``"midpoint"``. We also place a :class:`arbor.threshold_detector` with a threshold of -10 mV on the same location. Step **(4)** constructs the :class:`arbor.cable_cell` from the segment tree and dictionary of labelled regions and locations. @@ -93,7 +93,7 @@ The single cell model has 4 main functions: 1. It holds the **global properties** of the model 2. It registers **probes** on specific locations on the cell to measure the voltage. 3. It **runs** the simulation. -4. It collects **spikes** from spike detectors and voltage **traces** from registered probes. +4. It collects **spikes** from threshold detectors and voltage **traces** from registered probes. Right now, we'll only set a probe and run the simulation. @@ -115,7 +115,7 @@ The results ----------- Our cell and model have been defined and we have run our simulation. Now we can look at what -the spike detector and a voltage probes from our model have produced. +the threshold detector and a voltage probes from our model have produced. .. literalinclude:: ../../python/example/single_cell_model.py :language: python diff --git a/python/cells.cpp b/python/cells.cpp index 9ac0a32d7773065022f2fa0e7d08ac2c4491efe3..6baa949802e5a59c038724ba60c62670a8536e1a 100644 --- a/python/cells.cpp +++ b/python/cells.cpp @@ -577,8 +577,15 @@ void register_cells(pybind11::module& m) { return util::pprintf("<arbor.iclamp: frequency {} Hz>", c.frequency);}); // arb::threshold_detector - - pybind11::class_<arb::threshold_detector> detector(m, "spike_detector", + struct spike_detector {}; + pybind11::class_<spike_detector> sd(m, "spike_detector", "Deprecated, please use 'threshold_detector'"); + sd.def(pybind11::init( + [](pybind11::object) -> spike_detector { + throw arb::arbor_exception{"Deprecated, please use 'threshold_detector' instead."}; + return {}; // unreachable + })); + + pybind11::class_<arb::threshold_detector> detector(m, "threshold_detector", "A spike detector, generates a spike when voltage crosses a threshold. Can be used as source endpoint for an arbor.connection."); detector .def(pybind11::init( diff --git a/python/example/gap_junctions.py b/python/example/gap_junctions.py index 2f93e22424a5e948bad345f241033368ded038bf..dcdbbfa5912ec75b4ecad6a447bdebe928f351e6 100644 --- a/python/example/gap_junctions.py +++ b/python/example/gap_junctions.py @@ -51,8 +51,8 @@ def make_cable_cell(gid): # Attach one synapse and gap junction each on their labeled sites .place('"synapse_site"', arbor.synapse("expsyn"), "syn") .place('"gj_site"', arbor.junction("gj"), "gj") - # Attach spike detector to cell root - .place('"root"', arbor.spike_detector(-10), "detector") + # Attach detector to cell root + .place('"root"', arbor.threshold_detector(-10), "detector") ) return arbor.cable_cell(tree, labels, decor) diff --git a/python/example/network_ring.py b/python/example/network_ring.py index 6013131001b254aa096ddf2e5d536d5bc4c99e92..3e0f3de6e8d76481817df680bb8507b54811dff0 100755 --- a/python/example/network_ring.py +++ b/python/example/network_ring.py @@ -64,8 +64,8 @@ def make_cable_cell(gid): .paint('"soma"', arbor.density("hh")).paint('"dend"', arbor.density("pas")) # (4) Attach a single synapse. .place('"synapse_site"', arbor.synapse("expsyn"), "syn") - # Attach a spike detector with threshold of -10 mV. - .place('"root"', arbor.spike_detector(-10), "detector") + # Attach a detector with threshold of -10 mV. + .place('"root"', arbor.threshold_detector(-10), "detector") ) return arbor.cable_cell(tree, labels, decor) diff --git a/python/example/network_ring_gpu.py b/python/example/network_ring_gpu.py index 3d071d1649bf3faf9a60a197f318c2d53cab7586..61b7be3e7b41d260a086c7c2abe1e5918c9b07d5 100644 --- a/python/example/network_ring_gpu.py +++ b/python/example/network_ring_gpu.py @@ -66,8 +66,8 @@ def make_cable_cell(gid): # (4) Attach a single synapse. decor.place('"synapse_site"', arbor.synapse("expsyn"), "syn") - # Attach a spike detector with threshold of -10 mV. - decor.place('"root"', arbor.spike_detector(-10), "detector") + # Attach a detector with threshold of -10 mV. + decor.place('"root"', arbor.threshold_detector(-10), "detector") cell = arbor.cable_cell(tree, labels, decor) diff --git a/python/example/network_ring_mpi.py b/python/example/network_ring_mpi.py index 6892a498eebd29dcee04a603d1a1a8869d90511c..dc1b0d2ce8053ee4dd6d5775f4cefe09794ad6a9 100644 --- a/python/example/network_ring_mpi.py +++ b/python/example/network_ring_mpi.py @@ -66,8 +66,8 @@ def make_cable_cell(gid): .paint('"soma"', arbor.density("hh")).paint('"dend"', arbor.density("pas")) # (4) Attach a single synapse. .place('"synapse_site"', arbor.synapse("expsyn"), "syn") - # Attach a spike detector with threshold of -10 mV. - .place('"root"', arbor.spike_detector(-10), "detector") + # Attach a detector with threshold of -10 mV. + .place('"root"', arbor.threshold_detector(-10), "detector") ) return arbor.cable_cell(tree, labels, decor) diff --git a/python/example/plasticity.py b/python/example/plasticity.py index ee20edccfccdca73dd1e8f0f5ec41e1ed9065f2b..ba4c209989fab8289aaf0e63a93e84be9ee07675 100644 --- a/python/example/plasticity.py +++ b/python/example/plasticity.py @@ -54,7 +54,7 @@ class recipe(A.recipe): # - synapse to receive incoming spikes from the source cell. decor.place("(location 0 0.5)", A.synapse("expsyn"), "synapse") # - detector for reporting spikes on the cable cells. - decor.place("(location 0 0.5)", A.spike_detector(-10.0), "detector") + decor.place("(location 0 0.5)", A.threshold_detector(-10.0), "detector") # return the cable cell description return A.cable_cell(tree, A.label_dict(), decor) diff --git a/python/example/single_cell_allen.py b/python/example/single_cell_allen.py index 359b62e245174ff3d6f461d1a645c3dacd7c9691..1296a29b2b418134c2dae2e3b07aff4ee34c5bf7 100644 --- a/python/example/single_cell_allen.py +++ b/python/example/single_cell_allen.py @@ -107,9 +107,9 @@ def make_cell(swc, fit): else: vs[k] = v decor.paint(f'"{region}"', arbor.density(arbor.mechanism(nm, vs))) - # (9) attach stimulus and spike detector + # (9) attach stimulus and detector decor.place('"midpoint"', arbor.iclamp(200, 1000, 0.15), "ic") - decor.place('"midpoint"', arbor.spike_detector(-40), "sd") + decor.place('"midpoint"', arbor.threshold_detector(-40), "sd") # (10) discretisation strategy: max compartment length decor.discretization(arbor.cv_policy_max_extent(20)) diff --git a/python/example/single_cell_detailed.py b/python/example/single_cell_detailed.py index b9f85fd99850f4dd3702850a899fc4cc7c188613..37873ebaa13fd581b82162299c2c0d8c451f3c3d 100755 --- a/python/example/single_cell_detailed.py +++ b/python/example/single_cell_detailed.py @@ -57,11 +57,11 @@ decor.paint('"soma"', Vm=-50) decor.paint('"all"', density("pas")) decor.paint('"custom"', density("hh")) decor.paint('"dend"', density("Ih", {"gbar": 0.001})) -# Place stimuli and spike detectors. +# Place stimuli and detectors. decor.place('"root"', arbor.iclamp(10, 1, current=2), "iclamp0") decor.place('"root"', arbor.iclamp(30, 1, current=2), "iclamp1") decor.place('"root"', arbor.iclamp(50, 1, current=2), "iclamp2") -decor.place('"axon_terminal"', arbor.spike_detector(-10), "detector") +decor.place('"axon_terminal"', arbor.threshold_detector(-10), "detector") # Set discretisation: Soma as one CV, 1um everywhere else decor.discretization('(replace (single (region "soma")) (max-extent 1.0))') diff --git a/python/example/single_cell_detailed_recipe.py b/python/example/single_cell_detailed_recipe.py index 4443b9f3acf8c3c5bbb30eb79b423cdf5aab67ff..ac01e73af92df51bb05b7e5472518eb3bf35b334 100644 --- a/python/example/single_cell_detailed_recipe.py +++ b/python/example/single_cell_detailed_recipe.py @@ -56,11 +56,11 @@ decor = ( .paint('"all"', density("pas")) .paint('"custom"', density("hh")) .paint('"dend"', density("Ih", {"gbar": 0.001})) - # Place stimuli and spike detectors. + # Place stimuli and detectors. .place('"root"', arbor.iclamp(10, 1, current=2), "iclamp0") .place('"root"', arbor.iclamp(30, 1, current=2), "iclamp1") .place('"root"', arbor.iclamp(50, 1, current=2), "iclamp2") - .place('"axon_terminal"', arbor.spike_detector(-10), "detector") + .place('"axon_terminal"', arbor.threshold_detector(-10), "detector") # Set discretisation: Soma as one CV, 1um everywhere else .discretization('(replace (single (region "soma")) (max-extent 1.0))') ) diff --git a/python/example/single_cell_model.py b/python/example/single_cell_model.py index 28d52b1c423b75e69605889de8c9b21b691a4371..229862ab71dd16deb0ee8639680f320580539092 100755 --- a/python/example/single_cell_model.py +++ b/python/example/single_cell_model.py @@ -19,7 +19,7 @@ decor = ( .set_property(Vm=-40) .paint('"soma"', arbor.density("hh")) .place('"midpoint"', arbor.iclamp(10, 2, 0.8), "iclamp") - .place('"midpoint"', arbor.spike_detector(-10), "detector") + .place('"midpoint"', arbor.threshold_detector(-10), "detector") ) # (4) Create cell and the single cell model based on it diff --git a/python/example/single_cell_nml.py b/python/example/single_cell_nml.py index 7e0f63fec817b36b2f78ff92c252553a3bab8da5..0061e72b0ab5ce41be7996e8438f38f954b0964f 100755 --- a/python/example/single_cell_nml.py +++ b/python/example/single_cell_nml.py @@ -63,7 +63,7 @@ decor = ( .place('"stim_site"', arbor.iclamp(10, 1, current=0.5), "iclamp2") .place('"stim_site"', arbor.iclamp(8, 1, current=4), "iclamp3") # Detect spikes at the soma with a voltage threshold of -10 mV. - .place('"axon_end"', arbor.spike_detector(-10), "detector") + .place('"axon_end"', arbor.threshold_detector(-10), "detector") # Set discretisation: Soma as one CV, 1um everywhere else .discretization('(replace (single (region "soma")) (max-extent 1.0))') ) diff --git a/python/example/single_cell_recipe.py b/python/example/single_cell_recipe.py index 315d0a088cb2b45d67dd8989cc19948d76d77e80..6b7800091b6c6f764b9d3b25aadb46fe90362493 100644 --- a/python/example/single_cell_recipe.py +++ b/python/example/single_cell_recipe.py @@ -23,7 +23,7 @@ decor = ( .set_property(Vm=-40) .paint('"soma"', arbor.density("hh")) .place('"midpoint"', arbor.iclamp(10, 2, 0.8), "iclamp") - .place('"midpoint"', arbor.spike_detector(-10), "detector") + .place('"midpoint"', arbor.threshold_detector(-10), "detector") ) cell = arbor.cable_cell(tree, labels, decor) diff --git a/python/example/single_cell_stdp.py b/python/example/single_cell_stdp.py index 4330b9c269bec0659b0cc37423a4d040b14bdfb6..a2079748f522a0fec3df8a6850722552faebe0c0 100755 --- a/python/example/single_cell_stdp.py +++ b/python/example/single_cell_stdp.py @@ -32,7 +32,7 @@ class single_recipe(arbor.recipe): arbor.decor() .set_property(Vm=-40) .paint("(all)", arbor.density("hh")) - .place('"center"', arbor.spike_detector(-10), "detector") + .place('"center"', arbor.threshold_detector(-10), "detector") .place('"center"', arbor.synapse("expsyn"), "synapse") .place( '"center"', diff --git a/python/example/single_cell_swc.py b/python/example/single_cell_swc.py index aa0e2df74f56681ddfaca75843747db2f6dfd76a..43e76cdb012d8f077e77fc9930dba9df318ec3db 100755 --- a/python/example/single_cell_swc.py +++ b/python/example/single_cell_swc.py @@ -52,7 +52,7 @@ decor = ( .place('"stim_site"', arbor.iclamp(10, 1, current=0.5), "iclamp2") .place('"stim_site"', arbor.iclamp(8, 1, current=4), "iclamp3") # Detect spikes at the soma with a voltage threshold of -10 mV. - .place('"axon_end"', arbor.spike_detector(-10), "detector") + .place('"axon_end"', arbor.threshold_detector(-10), "detector") # Create the policy used to discretise the cell into CVs. # Use a single CV for the soma, and CVs of maximum length 1 μm elsewhere. .discretization('(replace (single (region "soma")) (max-extent 1.0))') diff --git a/python/test/fixtures.py b/python/test/fixtures.py index 1e82a8b0b6860795523e87c8854ec52096163826..7263321593d6fd7dd8839ac6925176a2721b5797 100644 --- a/python/test/fixtures.py +++ b/python/test/fixtures.py @@ -206,7 +206,7 @@ class art_spiker_recipe(arbor.recipe): decor.set_property(Vm=-40) decor.paint('"soma"', arbor.density("hh")) decor.place('"midpoint"', arbor.iclamp(10, 2, 0.8), "iclamp") - decor.place('"midpoint"', arbor.spike_detector(-10), "detector") + decor.place('"midpoint"', arbor.threshold_detector(-10), "detector") # return tuple of tree, labels, and decor for creating a cable cell (can still be modified before calling arbor.cable_cell()) return tree, labels, decor