From 072787e8c4e3361502a521abe737b8d66ed659c9 Mon Sep 17 00:00:00 2001 From: Robert A McDougal Date: Fri, 3 Apr 2026 11:56:14 -0400 Subject: [PATCH 1/2] more neutral language when discussing Boltzmann vs linear ramp --- docs/guide/specify_and_verify_the_functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/specify_and_verify_the_functions.rst b/docs/guide/specify_and_verify_the_functions.rst index 8044dc6524..bed9daac3f 100644 --- a/docs/guide/specify_and_verify_the_functions.rst +++ b/docs/guide/specify_and_verify_the_functions.rst @@ -18,7 +18,7 @@ Under apicals_x, we select gnabar_hh . . . and the right lower corner of the CellBuilder shows us that the default function is a Boltzmann function. -Our model isn't smart enough for a Boltzmann function. We just want a plain, dumb, linear ramp. +Our model doesn't require a Boltzmann function. We just want a plain, simple, linear ramp. That's easy enough--we click on f(p) in the right panel and scroll down to Ramp . . . From e0ef758e6a1023b0c20956936effd94962000ab5 Mon Sep 17 00:00:00 2001 From: Robert A McDougal Date: Fri, 3 Apr 2026 12:28:40 -0400 Subject: [PATCH 2/2] more neutrality in the code --- docs/courses/hopfield_brody_network_in_python.rst | 2 +- share/lib/hoc/binfo.hoc | 2 +- share/lib/python/neuron/rxd/geometry3d/surfaces.pyx | 2 +- share/lib/python/neuron/rxd/species.py | 2 +- src/coreneuron/network/partrans_setup.cpp | 4 ++-- src/mswin/nrnsetupmingw.nsi.in | 6 +++--- src/nrncvode/netcvode.cpp | 2 +- src/nrniv/bbsavestate.cpp | 2 +- src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp | 4 ++-- src/nrniv/partrans.cpp | 4 ++-- test/coreneuron/unit/solver/test_solver.cpp | 2 +- test/unit_tests/container/node.cpp | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/courses/hopfield_brody_network_in_python.rst b/docs/courses/hopfield_brody_network_in_python.rst index 55b9833e32..985ad8a66f 100644 --- a/docs/courses/hopfield_brody_network_in_python.rst +++ b/docs/courses/hopfield_brody_network_in_python.rst @@ -53,7 +53,7 @@ How it works The synchronization mechanism requires that all of the cells fire spontaneously at similar frequencies. It is obvious that if all cells are started at the same time, they will still be roughly synchronous after one cycle (since they have similar intrinsic cycle periods). After two cycles, they will have drifted further apart. After many cycles, differences in period will be magnified, leading to no temporal relationship of firing. -The key observation utilized here is that firing is fairly synchronized one cycle after onset. The trick is to reset the cells after each cycle so that they start together again. They then fire with temporal differences equal to the differences in their intrinsic periods. This resetting can be provided by an inhibitory input which pushes state variable *m* down far from threshold (hyperpolarized, as it were). This could be accomplished through an external pacemaker that reset all the cells, thereby imposing an external frequency onto the network. The interesting observation in this network is that pacemaking can also be imposed from within, though an intrinsic connectivity that enslaves all members to the will of the masses. +The key observation utilized here is that firing is fairly synchronized one cycle after onset. The trick is to reset the cells after each cycle so that they start together again. They then fire with temporal differences equal to the differences in their intrinsic periods. This resetting can be provided by an inhibitory input which pushes state variable *m* down far from threshold (hyperpolarized, as it were). This could be accomplished through an external pacemaker that reset all the cells, thereby imposing an external frequency onto the network. The interesting observation in this network is that pacemaking can also be imposed from within, through an intrinsic connectivity that synchronizes all members via collective dynamics. Exercises to gain familiarity with the model ---------- diff --git a/share/lib/hoc/binfo.hoc b/share/lib/hoc/binfo.hoc index bbd42c443c..59a045d587 100644 --- a/share/lib/hoc/binfo.hoc +++ b/share/lib/hoc/binfo.hoc @@ -321,7 +321,7 @@ proc multisplit_divide() {local i, x \ //printf("%d %s pc.multisplit(%g, %d, 2)\n", pc.id, secname(), px.x[i], sids.x[i]) pc.multisplit(px.x[i], sids.x[i], 2) v(px.x[i]) = sids.x[i] - }else if (v(px.x[i]) != sids.x[i]) { // sanity check + }else if (v(px.x[i]) != sids.x[i]) { // consistency check printf("i=%d px.x[i]=%d v=%g sids.x[i]=%g\n", i, px.x[i], v(px.x[i]), sids.x[i]) execerror("Subtrees at same parent with different sid", "") } diff --git a/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx b/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx index bf3aac2eb1..fafc5b1c23 100644 --- a/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx +++ b/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx @@ -374,7 +374,7 @@ cpdef _triangulate_surface_given_chunks(list objects, xs, ys, zs, internal_membr objs = chunk_objsa[b][c] cells = chunk_ptsa[b][c] if cells and not objs: - # we should never get here; this is just a sanity check + # we should never get here; this is just a consistency check missing_objs += 1 continue for i, j, k in cells: diff --git a/share/lib/python/neuron/rxd/species.py b/share/lib/python/neuron/rxd/species.py index b556f9a5d0..88ba651a5d 100644 --- a/share/lib/python/neuron/rxd/species.py +++ b/share/lib/python/neuron/rxd/species.py @@ -1409,7 +1409,7 @@ def ijk_from_index(self, index): jk = index - nynz * i j = int(jk / self._nz) k = jk % self._nz - # sanity check + # consistency check assert index == self._nodes_by_location(i, j, k) return i, j, k diff --git a/src/coreneuron/network/partrans_setup.cpp b/src/coreneuron/network/partrans_setup.cpp index 6d474da619..60f777acf6 100644 --- a/src/coreneuron/network/partrans_setup.cpp +++ b/src/coreneuron/network/partrans_setup.cpp @@ -112,13 +112,13 @@ void nrn_partrans::gap_mpi_setup(int ngroup) { int nhost = nrnmpi_numprocs; - // sanity check. all the sgids we are asked to send, we actually have + // verify: all the sgids we are asked to send, we actually have for (int i = 0; i < outsrcdspl_[nhost]; ++i) { sgid_t sgid = send_to_want[i]; assert(src2info.find(sgid) != src2info.end()); } - // sanity check. all the sgids we receive, we actually need. + // verify: all the sgids we receive, we actually need. for (int i = 0; i < insrcdspl_[nhost]; ++i) { sgid_t sgid = recv_from_have[i]; assert(tar2info.find(sgid) != tar2info.end()); diff --git a/src/mswin/nrnsetupmingw.nsi.in b/src/mswin/nrnsetupmingw.nsi.in index 48eb1eb295..0de620228b 100644 --- a/src/mswin/nrnsetupmingw.nsi.in +++ b/src/mswin/nrnsetupmingw.nsi.in @@ -271,11 +271,11 @@ SectionEnd ; modifies no other variables. ; ; Usage: - ; Push "this is a long ass string" - ; Push "ass" + ; Push "this is a long example string" + ; Push "example" ; Call StrStr ; Pop $R0 - ; ($R0 at this point is "ass string") + ; ($R0 at this point is "example string") Function StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle diff --git a/src/nrncvode/netcvode.cpp b/src/nrncvode/netcvode.cpp index 5ddc73b9b2..18b2b5fdd4 100644 --- a/src/nrncvode/netcvode.cpp +++ b/src/nrncvode/netcvode.cpp @@ -6380,7 +6380,7 @@ bool Cvode::is_owner(neuron::container::data_handle const& handle) { for (int it = 0; it < nrn_nthread; ++it) { CvodeThreadData& z = CTD(it); NrnThread* nt_ = nrn_threads + it; - // ugly start but include root in single for loop + // inelegant start but include root in single for loop for (int i = -1; i < z.vnode_end_index_; ++i) { int in = (i == -1) ? z.rootnode_begin_index_ : i; if (i == -1) { diff --git a/src/nrniv/bbsavestate.cpp b/src/nrniv/bbsavestate.cpp index 21fcc60bb0..81ded04c7e 100644 --- a/src/nrniv/bbsavestate.cpp +++ b/src/nrniv/bbsavestate.cpp @@ -1272,7 +1272,7 @@ static void tqcallback(const TQItem* tq, int i) { // all spikes from a PreSyn were delivered before that PreSyn fired // again. The assumption did not hold for existing Blue Brain models. // Therefore we extend the algorithm to any number of spikes with - // different initiation times from the same PreSyn. For sanity we + // different initiation times from the same PreSyn. For simplicity we // assume Presyns do not fire more than once every 0.1 ms. // Unfortunately this possibility makes mpi exchange much more // difficult as the number of doubles exchanged can be greater than diff --git a/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp b/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp index a91b69ec14..adce074d84 100644 --- a/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp +++ b/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp @@ -151,7 +151,7 @@ void nrnthreads_all_weights_return(std::vector& weights) { * i_membrane_, or time. See coreneuron/io/nrn_setup.cpp:legacy_index2pointer. * We allow coreneuron to copy to NEURON's AoS data as CoreNEURON knows * how its data is arranged (SoA and possibly permuted). - * This function figures out the size (just for sanity check) + * This function figures out the size (for validation) * and data pointer to be returned based on type and thread id. * The ARTIFICIAL_CELL type case is special as there is no thread specific * Memb_list for those. @@ -618,7 +618,7 @@ int core2nrn_nmodlrandom(int tid, assert(ml); } - auto& nrnindices = nrn_mech_random_indices(type); // for sanity checking + auto& nrnindices = nrn_mech_random_indices(type); // for validation assert(nrnindices == indices); assert(nmodlrandom.size() == indices.size() * ml->nodecount); diff --git a/src/nrniv/partrans.cpp b/src/nrniv/partrans.cpp index 7a23249e4c..eae0f13820 100644 --- a/src/nrniv/partrans.cpp +++ b/src/nrniv/partrans.cpp @@ -708,9 +708,9 @@ void nrnmpi_setup_transfer() { // 2) Call the have_to_want function. auto [send_to_want, recv_from_have] = have_to_want(ownsrc, needsrc, sgid_alltoallv); - // sanity check. all the sgids we are asked to send, we actually have + // verify: all the sgids we are asked to send, we actually have int n = send_to_want.displ[nhost]; - // sanity check. all the sgids we receive, we actually need. + // verify: all the sgids we receive, we actually need. // also set the sid2insrc_ value to the proper recv_from_have index. n = recv_from_have.displ[nhost]; for (int i = 0; i < n; ++i) { diff --git a/test/coreneuron/unit/solver/test_solver.cpp b/test/coreneuron/unit/solver/test_solver.cpp index cce70d0f33..2c5da1f6af 100644 --- a/test/coreneuron/unit/solver/test_solver.cpp +++ b/test/coreneuron/unit/solver/test_solver.cpp @@ -70,7 +70,7 @@ struct ToyModelConfig { produce_rhs{[](auto, auto) { return -16.0; }}; }; -// TODO include some global lock as a sanity check (only one instance of +// TODO include some global lock as a consistency check (only one instance of // SetupThreads should exist at any given time) struct SetupThreads { SetupThreads(SolverImplementation impl, ToyModelConfig config = {}) { diff --git a/test/unit_tests/container/node.cpp b/test/unit_tests/container/node.cpp index 0e8298f269..2d0d3ba05c 100644 --- a/test/unit_tests/container/node.cpp +++ b/test/unit_tests/container/node.cpp @@ -548,7 +548,7 @@ TEST_CASE("Deleting a row from a frozen SoA container causes a fatal error", "[.][tests_that_abort]") { auto& node_data = neuron::model().node_data(); // SoA data store std::optional<::Node> node{std::in_place}; // take ownership of a row in node_data - REQUIRE(node_data.size() == 1); // quick sanity check + REQUIRE(node_data.size() == 1); // quick consistency check auto const frozen_token = node_data.issue_frozen_token(); // mark node_data frozen node.reset(); // Node destructor will trigger a call to std::terminate. }