diff --git a/arbor/include/arbor/units.hpp b/arbor/include/arbor/units.hpp index b7be90b7b..0146570d8 100644 --- a/arbor/include/arbor/units.hpp +++ b/arbor/include/arbor/units.hpp @@ -59,6 +59,7 @@ constexpr inline auto pA = pico * A; constexpr inline auto V = ::units::precise::volt; constexpr inline auto mV = milli * V; +constexpr inline auto uV = micro * V; constexpr inline auto Hz = ::units::precise::second.pow(-1); constexpr inline auto kHz = kilo * Hz; diff --git a/python/cells.cpp b/python/cells.cpp index bd1eee744..5897ffd49 100644 --- a/python/cells.cpp +++ b/python/cells.cpp @@ -266,7 +266,9 @@ void register_cells(py::module& m) { std::optional E_R, std::optional V_m, std::optional t_ref) { - auto cell = arb::lif_cell{std::move(source_label), std::move(target_label)}; + auto cell = arb::lif_cell{}; + cell.source = std::move(source_label); + cell.target = std::move(target_label); if (tau_m) cell.tau_m = *tau_m; if (V_th) cell.V_th = *V_th; if (C_m) cell.C_m = *C_m; diff --git a/test/unit/test_simulation.cpp b/test/unit/test_simulation.cpp index 8fa4c08d5..17b61c901 100644 --- a/test/unit/test_simulation.cpp +++ b/test/unit/test_simulation.cpp @@ -124,11 +124,15 @@ struct lif_chain: public recipe { cell_kind get_cell_kind(cell_gid_type) const override { return cell_kind::lif; } util::unique_any get_cell_description(cell_gid_type) const override { // A hair-trigger LIF cell with tiny time constant and no refractory period. - lif_cell lif("src", "tgt"); - lif.tau_m = 0.01*U::ms; // time constant (ms) - lif.t_ref = 0*U::ms; // refactory period (ms) - lif.V_th = lif.E_L + 0.001*U::mV; // threshold voltage 1 µV higher than resting - return lif; + auto E_L = 0_mV; + return lif_cell { + .source = "src", + .target = "tgt", + .tau_m = 0.01*U::ms, // time constant + .V_th = E_L + 1.0*U::uV, // threshold voltage 1 µV higher than resting + .E_L = E_L, + .t_ref = 0*U::ms, // refactory period (ms) + }; } std::vector connections_on(cell_gid_type target) const override {