diff --git a/doc/concepts/decor.rst b/doc/concepts/decor.rst index 630af679323239f29d0346b5fb43f4c597577564..db6264c75bd9af391233875396be5ca369f9c8fa 100644 --- a/doc/concepts/decor.rst +++ b/doc/concepts/decor.rst @@ -356,6 +356,28 @@ A point mechanism (synapse) can form the target of a :term:`connection` on a cel 2. Threshold detectors (spike detectors). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Spike 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. + decor = arbor.decor() + decor.place('"root"', arbor.spike_detector(-10), "my_spike_detector") + + # At this point, "my_spike_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. + sim = arbor.simulation(...) + sim.record(arbor.spike_recording.all) + sim.run(...) + print("spikes:") + for sp in sim.spikes(): + print(" ", sp) + +See also :term:`spike detector`. + .. _cablecell-gj-mechs: 3. Gap junction connection sites @@ -424,6 +446,7 @@ constant stimuli and constant amplitude stimuli restricted to a fixed time inter 5. Probes ~~~~~~~~~ +See :ref:`probesample`. API --- diff --git a/doc/concepts/interconnectivity.rst b/doc/concepts/interconnectivity.rst index 5ff303a267141b813d9661d1b03225f0520b614a..4fee5f696332593f582e29b1d02f442c351850db 100644 --- a/doc/concepts/interconnectivity.rst +++ b/doc/concepts/interconnectivity.rst @@ -39,6 +39,19 @@ A recipe lets you define which sites are connected to which. action potential Spikes travel over :term:`connections <connection>`. In a synapse, they generate an event. + spike 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 + <cablecell-threshold-detectors>` for more information. + + spike source cell + Artificial cell to generate spikes on a given schedule, see :ref:`spike cell <spikecell>`. + + recording + By default, spikes are used for communication, but not stored for analysis, + however, :ref:`simulation <modelsimulation>` objects can be instructed to record spikes. + event In a synapse :term:`spikes <spike>` generate events, which constitute stimulation of the synapse mechanism and the transmission of a signal. A synapse may receive events directly from an diff --git a/doc/concepts/labels.rst b/doc/concepts/labels.rst index a103e0e5ee17e59b1fc27951cb271cc42bafcfc4..7027275384f0ef5e2d53143da560c1ecae4e3fbd 100644 --- a/doc/concepts/labels.rst +++ b/doc/concepts/labels.rst @@ -866,4 +866,4 @@ API --- * :ref:`Python <pylabels>` -* *TODO*: C++ documentation. +* :ref:`C++ <cpplabels>` diff --git a/doc/concepts/mechanisms.rst b/doc/concepts/mechanisms.rst index 36d17164753996cdeeeb9401b6b2a349cb8494a1..3146af8d004027792a8b069e6dd6a923ab57564a 100644 --- a/doc/concepts/mechanisms.rst +++ b/doc/concepts/mechanisms.rst @@ -267,4 +267,4 @@ API --- * :ref:`Python <py_mechanisms>` -* *TODO* C++ documentation. +* :ref:`C++ <cpp_mechanisms>` diff --git a/doc/concepts/probe_sample.rst b/doc/concepts/probe_sample.rst index 6ea48b0d534bcca20411a24cfb9eb9e543a78278..cdd480c4515af1e4885614ecc9aed908606b9e22 100644 --- a/doc/concepts/probe_sample.rst +++ b/doc/concepts/probe_sample.rst @@ -58,6 +58,12 @@ Definitions An object representing a series of monotonically increasing points in time, used for determining sample times (see :ref:`pyrecipe`). +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`. + API --- diff --git a/doc/concepts/simulation.rst b/doc/concepts/simulation.rst index 6dc7c0551ca2c8d99e68754cd2f1a73488fc11fa..c0ab208ee1a8f392ccd23dd4ea3b0dbba3b3e75e 100644 --- a/doc/concepts/simulation.rst +++ b/doc/concepts/simulation.rst @@ -20,6 +20,15 @@ To build a simulation the following is needed: not given, the default context will be used, which allocates one thread, one process (MPI task), and no GPU. +Configuring data extraction +--------------------------- + +Two kinds of data extraction can be set up: +1. certain state variables can be :ref:`sampled <probesample>` by attaching a + sampler to a probe. +2. spikes can be recorded by either a callback (C++) or a preset recording model + (Python), see the API docs linked below. + Simulation execution and interaction ------------------------------------ diff --git a/doc/python/simulation.rst b/doc/python/simulation.rst index 943291e38ab2d06b4cb92f0456f23a66254faaa8..533041d7dd8a0d45651196ac5fd171248bc6424a 100644 --- a/doc/python/simulation.rst +++ b/doc/python/simulation.rst @@ -214,7 +214,8 @@ over the local and distributed hardware resources (see :ref:`pydomdec`). Then, t Recording spikes ---------------- -By default, spikes are not recorded. Recording is enabled with the +Spikes are generated by various sources, including detectors and spike source +cells, but by default, spikes are not recorded. Recording is enabled with the :py:func:`simulation.record` method, which takes a single argument instructing the simulation object to record no spikes, all locally generated spikes, or all spikes generated by any MPI rank.