Skip to content

Commit

Permalink
Got all of them?
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Dec 20, 2024
1 parent 4d80a8d commit c9ac597
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions arbor/include/arbor/units.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion python/cells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ void register_cells(py::module& m) {
std::optional<U::quantity> E_R,
std::optional<U::quantity> V_m,
std::optional<U::quantity> 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;
Expand Down
14 changes: 9 additions & 5 deletions test/unit/test_simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<cell_connection> connections_on(cell_gid_type target) const override {
Expand Down

0 comments on commit c9ac597

Please sign in to comment.