MesoNet: bipolar event names and update ordering

wait, check sPlus / sMinus against the predicates. old s → new s → event check, names alone are not helping here

archived model state: v, u, v0, threshold state s and previous threshold state s_pre. neuronUpdates() runs with @network_operation(dt=defaultclock.dt) and executes u += v0, v += u*dt, copies the previous threshold state, then sets s = (v >= v_thresh).

event predicates in the archive:

bipolarSpike = {
    'sPlus': '(not s) and (s != s_pre)',
    'sMinus': 's and (s != s_pre)'
}

Because s means “above threshold,” the names deserve checking: sPlus is written for the transition to false and sMinus for the transition to true. The connection maps those event names to positive/negative effects on v0_post. That is an implementation detail to test, not a reason to assume the intended polarity is correct.

other code-review points: v0_post = ... replaces the value rather than accumulating multiple events. The printed model declares refrac but does not visibly wire it into these NeuronGroup constructors. A comment explicitly leaves scheduling of plus/minus pathways before event checking to be added.

proposed minimal test: one source event at a time; record v, u, v0, both threshold states and event counts. Then test simultaneous and opposite-polarity arrivals before interpreting network-wide behavior.

Bipolar model code
Bipolar model code

Custom update code and response
Custom update code and response