diff --git a/example/ring/parameters.hpp b/example/ring/parameters.hpp index 7f1d685735fb01fd03f55e4f1388bcc7ce1392d7..0ca046c4501b1b935a96350502dfd36888ddb0e9 100644 --- a/example/ring/parameters.hpp +++ b/example/ring/parameters.hpp @@ -22,6 +22,9 @@ struct cell_parameters { std::array<double,2> branch_probs = {1.0, 0.5}; // Probability of a branch occuring. std::array<unsigned,2> compartments = {20, 2}; // Compartment count on a branch. std::array<double,2> lengths = {200, 20}; // Length of branch in μm. + + // The number of synapses per cell. + unsigned synapses = 1; }; struct ring_params { @@ -65,6 +68,7 @@ ring_params read_options(int argc, char** argv) { param_from_json(params.cell.branch_probs, "branch-probs", json); param_from_json(params.cell.compartments, "compartments", json); param_from_json(params.cell.lengths, "lengths", json); + param_from_json(params.cell.synapses, "synapses", json); if (!json.empty()) { for (auto it=json.begin(); it!=json.end(); ++it) { diff --git a/example/ring/ring.cpp b/example/ring/ring.cpp index 30cd1c54f7efcea1bf608ee3fb40d670c6c8bb0e..d63640dd68facf1ac93be6742e6e6b135b40598c 100644 --- a/example/ring/ring.cpp +++ b/example/ring/ring.cpp @@ -86,7 +86,7 @@ public: std::vector<arb::event_generator> event_generators(cell_gid_type gid) const override { std::vector<arb::event_generator> gens; if (!gid) { - gens.push_back(arb::explicit_generator(arb::pse_vector{{{0, 0}, 0.1, 1.0}})); + gens.push_back(arb::explicit_generator(arb::pse_vector{{{0, 0}, event_weight_, 1.0}})); } return gens; } @@ -109,7 +109,7 @@ private: cell_size_type num_cells_; cell_parameters cell_params_; double min_delay_; - float event_weight_ = 0.01; + float event_weight_ = 0.05; }; struct cell_stats { @@ -341,6 +341,11 @@ arb::mc_cell branch_cell(arb::cell_gid_type gid, const cell_parameters& params) // Add a synapse to the mid point of the first dendrite. cell.add_synapse({1, 0.5}, "expsyn"); + // Add additional synapses that will not be connected to anything. + for (unsigned i=1u; i<params.synapses; ++i) { + cell.add_synapse({1, 0.5}, "expsyn"); + } + return cell; }