From e981b90543432da992bc794c2289db498698b595 Mon Sep 17 00:00:00 2001 From: Brent Huisman <brenthuisman@users.noreply.github.com> Date: Fri, 5 Feb 2021 17:00:36 +0100 Subject: [PATCH] Clarify that spike detector can serve as endpoint in connection. (#1339) --- doc/python/interconnectivity.rst | 13 +++++++++++-- python/cells.cpp | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/python/interconnectivity.rst b/doc/python/interconnectivity.rst index 86f3d02f..71d8ebad 100644 --- a/doc/python/interconnectivity.rst +++ b/doc/python/interconnectivity.rst @@ -14,11 +14,11 @@ Interconnectivity .. attribute:: source - The source end point of the connection (type: :class:`arbor.cell_member`). + The source end point of the connection (type: :class:`arbor.cell_member`, which can be initialized with a (gid, index) tuple). .. attribute:: dest - The destination end point of the connection (type: :class:`arbor.cell_member`). + The destination end point of the connection (type: :class:`arbor.cell_member`, which can be initialized with a (gid, index) tuple). .. attribute:: weight @@ -65,3 +65,12 @@ Interconnectivity .. attribute:: ggap The gap junction conductance [μS]. + +.. class:: spike_detector + + A spike detector, generates a spike when voltage crosses a threshold. Can be used as source endpoint for an :ref:`arbor.connection`. + + .. attribute:: threshold + + Voltage threshold of spike detector [mV] + diff --git a/python/cells.cpp b/python/cells.cpp index 2f610f56..8331ed9a 100644 --- a/python/cells.cpp +++ b/python/cells.cpp @@ -297,13 +297,13 @@ void register_cells(pybind11::module& m) { // arb::threshold_detector pybind11::class_<arb::threshold_detector> detector(m, "spike_detector", - "A spike detector, generates a spike when voltage crosses a threshold."); + "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( [](double thresh) { return arb::threshold_detector{thresh}; }), "threshold"_a) - .def_readonly("threshold", &arb::threshold_detector::threshold, "Voltage threshold of spike detector [ms]") + .def_readonly("threshold", &arb::threshold_detector::threshold, "Voltage threshold of spike detector [mV]") .def("__repr__", [](const arb::threshold_detector& d){ return util::pprintf("<arbor.threshold_detector: threshold {} mV>", d.threshold);}) .def("__str__", [](const arb::threshold_detector& d){ -- GitLab