brainx-skill 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +17 -1
  2. package/manifest.json +1 -1
  3. package/mcp-servers/codex/skills.json +1 -1
  4. package/package.json +1 -1
  5. package/skills/bio-neuro-lit/SKILL.md +4 -2
  6. package/skills/bio-neuro-lit/references/required-supplements.md +27 -0
  7. package/skills/brainx-acceleration/SKILL.md +30 -437
  8. package/skills/brainx-acceleration/references/audit-and-rewrite-patterns.md +326 -0
  9. package/skills/brainx-general-guard/SKILL.md +24 -8
  10. package/skills/brainx-install/SKILL.md +3 -3
  11. package/skills/brainx-install/references/compatibility-and-release-matching.md +28 -20
  12. package/skills/brainx-install/references/uninstall-and-cleanup.md +11 -4
  13. package/skills/brainx-modeling-loop/SKILL.md +117 -36
  14. package/skills/brainx-modeling-loop/agents/openai.yaml +2 -2
  15. package/skills/brainx-modeling-loop/references/mechanism-comparison.md +62 -0
  16. package/skills/brainx-modeling-loop/references/multiscale-coupling.md +16 -0
  17. package/skills/brainx-modeling-loop/references/paper-reproduction.md +42 -0
  18. package/skills/brainx-modeling-loop/references/parameter-fitting-workflow.md +14 -14
  19. package/skills/brainx-modeling-loop/references/run-experiment.md +1 -1
  20. package/skills/brainx-modeling-loop/references/training-workflow.md +10 -8
  21. package/skills/brainx-visualization/SKILL.md +6 -2
  22. package/skills/brainx-visualization/references/neural-data-visualization.md +1 -1
  23. package/skills/brainx-visualization/references/statistical-and-model-visualization.md +1 -1
  24. package/skills/package-skills/braincell/SKILL.md +23 -14
  25. package/skills/package-skills/braincell/references/braintools/input-current.md +1 -1
  26. package/skills/package-skills/braincell/references/braintools/metric.md +72 -46
  27. package/skills/package-skills/braincell/references/mixions-for-adaptation.md +1 -1
  28. package/skills/package-skills/braincell/references/multicompartment/braincell-manual-morphology-construction.md +1 -1
  29. package/skills/package-skills/braincell/references/multicompartment/cv-policy-reference.md +1 -1
  30. package/skills/package-skills/braincell/references/multicompartment/filter-function-library.md +3 -3
  31. package/skills/package-skills/braincell/references/multicompartment/morphology-io-loading-validation.md +1 -1
  32. package/skills/package-skills/braincell/references/multicompartment/multicompartment-cell-workflow.md +31 -43
  33. package/skills/package-skills/braincell/references/multicompartment/network-workflow.md +49 -0
  34. package/skills/package-skills/braincell/references/multicompartment/probe-reference.md +26 -114
  35. package/skills/package-skills/braincell/references/multicompartment/topology-building-and-visualization.md +40 -28
  36. package/skills/package-skills/braincell/references/scripts/cell_multicompartment_reference.py +13 -17
  37. package/skills/package-skills/brainevent/SKILL.md +0 -3
  38. package/skills/package-skills/brainevent/references/synaptic-plasticity.md +1 -1
  39. package/skills/package-skills/brainmass/SKILL.md +5 -3
  40. package/skills/package-skills/brainmass/references/brainstate/parameter-constraints-regularization.md +9 -7
  41. package/skills/package-skills/brainmass/references/brainstate/parameter-transforms-regularizers-catalog.md +4 -4
  42. package/skills/package-skills/brainmass/references/braintools/data-preprocessing.md +15 -7
  43. package/skills/package-skills/brainmass/references/braintools/metric.md +72 -46
  44. package/skills/package-skills/brainmass/references/coupling-network-api.md +3 -1
  45. package/skills/package-skills/brainmass/references/fitting-with-objectives-api.md +6 -6
  46. package/skills/package-skills/brainmass/references/horn-task-training.md +9 -9
  47. package/skills/package-skills/brainmass/references/modellibrary.md +12 -10
  48. package/skills/package-skills/brainmass/references/scripts/resting-state-meg-whole-brain-pipeline.py +5 -3
  49. package/skills/package-skills/brainmass/references/scripts/wilson-cowan-ei-dynamics.py +10 -6
  50. package/skills/package-skills/brainmass/references/simulator-input-monitor-api.md +3 -1
  51. package/skills/package-skills/brainmass/references/visualization-analysis-api.md +17 -9
  52. package/skills/package-skills/brainspike/SKILL.md +201 -0
  53. package/skills/package-skills/brainspike/references/braintools/connectivity.md +40 -0
  54. package/skills/package-skills/brainspike/references/braintools/data-preprocessing.md +39 -0
  55. package/skills/package-skills/brainspike/references/braintools/input-current.md +55 -0
  56. package/skills/package-skills/brainspike/references/braintools/metric.md +36 -0
  57. package/skills/package-skills/brainspike/references/braintools/optimizer.md +50 -0
  58. package/skills/package-skills/brainspike/references/braintools/parameter-initializer.md +43 -0
  59. package/skills/package-skills/brainspike/references/braintools/surrogate.md +40 -0
  60. package/skills/package-skills/brainspike/references/migration-boundary.md +38 -0
  61. package/skills/package-skills/brainspike/references/model-and-readout-selection.md +41 -0
  62. package/skills/package-skills/brainspike/references/multirate-coupling.md +31 -0
  63. package/skills/package-skills/brainspike/references/multiscale-composition.md +28 -0
  64. package/skills/package-skills/brainspike/references/native-composition.md +52 -0
  65. package/skills/package-skills/brainspike/references/native-delays.md +34 -0
  66. package/skills/package-skills/brainspike/references/native-projections.md +43 -0
  67. package/skills/package-skills/brainspike/references/native-training.md +36 -0
  68. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/devices.md +33 -33
  69. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/divergence-and-parity.md +15 -15
  70. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/integration-categories.md +1 -1
  71. package/skills/package-skills/brainspike/references/nest-compatible/model-library.md +200 -0
  72. package/skills/package-skills/brainspike/references/nest-compatible/network-building.md +276 -0
  73. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/brette_et_al_2007.py +23 -26
  74. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/brunel_alpha.py +18 -21
  75. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/brunel_delta.py +16 -19
  76. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/clopath_synapse_spike_pairing.py +11 -12
  77. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/evaluate_tsodyks2_synapse.py +10 -11
  78. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/spatial_gaussex.py +18 -18
  79. package/skills/package-skills/{brainpy-state → brainspike}/references/nest-compatible/scripts/synapsecollection.py +26 -29
  80. package/skills/package-skills/brainspike/references/nest-compatible/synapse-and-connectivity.md +166 -0
  81. package/skills/package-skills/brainspike/references/nest-delay-boundaries.md +31 -0
  82. package/skills/package-skills/brainspike/references/nonlinear-state-sharing.md +26 -0
  83. package/skills/package-skills/{brainpy-state → brainspike}/references/perturbation-experiment-validity.md +2 -2
  84. package/skills/package-skills/brainspike/references/simulator-training.md +61 -0
  85. package/skills/package-skills/brainspike/references/temporal-task-training.md +36 -0
  86. package/skills/package-skills/brainspike/scripts/advanced_native_patterns.py +76 -0
  87. package/skills/package-skills/brainspike/scripts/delay_workflow.py +44 -0
  88. package/skills/package-skills/brainspike/scripts/delayed_cue_training.py +78 -0
  89. package/skills/package-skills/brainspike/scripts/lif_smoke.py +31 -0
  90. package/skills/package-skills/brainspike/scripts/multiscale_workflow.py +35 -0
  91. package/skills/package-skills/brainspike/scripts/native_ei_network.py +47 -0
  92. package/skills/package-skills/brainspike/scripts/native_workflows.py +77 -0
  93. package/skills/package-skills/brainspike/scripts/nest_boundary_workflows.py +108 -0
  94. package/skills/package-skills/brainspike/scripts/train_native_snn.py +65 -0
  95. package/skills/package-skills/brainspike/scripts/train_nest_simulator.py +69 -0
  96. package/skills/package-skills/brainspike/scripts/train_nest_simulator_two_weights.py +220 -0
  97. package/skills/package-skills/brainstate/SKILL.md +16 -21
  98. package/skills/package-skills/brainstate/references/brainstate/brainstate-control-flow-patterns.md +1 -138
  99. package/skills/package-skills/brainstate/references/brainstate/brainstate-transformed-diagnostics.md +1 -1
  100. package/skills/package-skills/brainstate/references/brainstate/delay-buffers.md +45 -0
  101. package/skills/package-skills/brainstate/references/brainstate/parameter-constraints-regularization.md +9 -7
  102. package/skills/package-skills/brainstate/references/brainstate/parameter-transforms-regularizers-catalog.md +4 -4
  103. package/skills/package-skills/brainstate/references/brainstate/randomness-and-reproducibility.md +6 -4
  104. package/skills/package-skills/brainstate/references/brainstate/transformation-grad-expansion.md +4 -4
  105. package/skills/package-skills/brainstate/references/brainstate/transformation-vmap-expansion.md +1 -1
  106. package/skills/package-skills/brainstate/references/braintools-optimizer-reference.md +16 -0
  107. package/skills/package-skills/brainstate/references/libraries/prebuilt-layer-library.md +1 -1
  108. package/skills/package-skills/brainstate/references/simulation-environment.md +5 -5
  109. package/skills/package-skills/braintrace/SKILL.md +17 -38
  110. package/skills/package-skills/braintrace/references/Drtrl.md +9 -26
  111. package/skills/package-skills/braintrace/references/algorithm selection.md +7 -12
  112. package/skills/package-skills/braintrace/references/batching.md +15 -35
  113. package/skills/package-skills/braintrace/references/compiler_internal.md +1 -1
  114. package/skills/package-skills/braintrace/references/custom algorithms.md +1 -2
  115. package/skills/package-skills/braintrace/references/customizing_primitive_transforms.md +26 -15
  116. package/skills/package-skills/braintrace/references/pp_pprop workflow.md +5 -139
  117. package/skills/package-skills/brainunit/SKILL.md +7 -2
  118. package/skills/package-skills/brainunit/references/array-mechanics/functional-structural-api.md +1 -1
  119. package/skills/package-skills/brainunit/references/math-function-library.md +2 -2
  120. package/skills/package-skills/brainunit/references/typing-and-runtime-validation.md +5 -2
  121. package/skills/package-skills/brainevent/references/scripts/102_EI_net_1996.py +0 -107
  122. package/skills/package-skills/brainevent/references/scripts/204_joglekar_2018_propagation.py +0 -168
  123. package/skills/package-skills/brainevent/references/scripts/coba_ei_teaching.py +0 -356
  124. package/skills/package-skills/brainpy-state/SKILL.md +0 -247
  125. package/skills/package-skills/brainpy-state/references/array-creation.md +0 -158
  126. package/skills/package-skills/brainpy-state/references/brain-dynamics-delay-protocol.md +0 -147
  127. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/analysis.md +0 -150
  128. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/brainpy legacy workflow.md +0 -373
  129. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/built-in dynamic neuron model.md +0 -150
  130. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/connecting neurons.md +0 -175
  131. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/customize neuron and synpase.md +0 -286
  132. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/Input generation.md +0 -111
  133. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/More about simulation.md +0 -163
  134. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/Multi-device array sharding.md +0 -113
  135. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/Parallel experiment execution.md +0 -136
  136. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/array creation and mechanics.md +0 -222
  137. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/brainpy math environment setting.md +0 -123
  138. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/delays.md +0 -107
  139. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/infrastructure/object oriented transformations and control flows.md +0 -185
  140. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/integrators.md +0 -181
  141. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/route activity through connectivity.md +0 -102
  142. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/synaptic projections.md +0 -147
  143. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/synpase properties.md +0 -159
  144. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/loss library.md +0 -127
  145. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/optimizers.md +0 -167
  146. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/parameter initializers.md +0 -107
  147. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/prebuilt neural network layers.md +0 -186
  148. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/surrogate gradients.md +0 -104
  149. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/trainer library.md +0 -89
  150. package/skills/package-skills/brainpy-state/references/brainPy(legacy)/training/trainingworkflows.md +0 -253
  151. package/skills/package-skills/brainpy-state/references/braintools/brainstate-control-flow-patterns.md +0 -334
  152. package/skills/package-skills/brainpy-state/references/braintools/connectivity.md +0 -206
  153. package/skills/package-skills/brainpy-state/references/braintools/data-preprocessing.md +0 -79
  154. package/skills/package-skills/brainpy-state/references/braintools/input-current.md +0 -199
  155. package/skills/package-skills/brainpy-state/references/braintools/metric.md +0 -152
  156. package/skills/package-skills/brainpy-state/references/braintools/optimizer.md +0 -179
  157. package/skills/package-skills/brainpy-state/references/braintools/parameter-initializer.md +0 -183
  158. package/skills/package-skills/brainpy-state/references/braintools/surrogate.md +0 -147
  159. package/skills/package-skills/brainpy-state/references/component-selection.md +0 -288
  160. package/skills/package-skills/brainpy-state/references/nest-compatible/model-library.md +0 -200
  161. package/skills/package-skills/brainpy-state/references/nest-compatible/nest-workflow.md +0 -156
  162. package/skills/package-skills/brainpy-state/references/nest-compatible/network-building.md +0 -264
  163. package/skills/package-skills/brainpy-state/references/nest-compatible/synapse-and-connectivity.md +0 -153
  164. package/skills/package-skills/brainpy-state/references/projection-patterns.md +0 -127
  165. package/skills/package-skills/brainpy-state/references/scripts/103_COBA_2005.py +0 -86
  166. package/skills/package-skills/brainpy-state/references/scripts/106_COBA_HH_2007.py +0 -181
  167. package/skills/package-skills/brainpy-state/references/scripts/107_gamma_oscillation_1996.py +0 -156
  168. package/skills/package-skills/brainpy-state/references/scripts/109_fast_global_oscillation.py +0 -111
  169. package/skills/package-skills/brainpy-state/references/scripts/201_surrogate_grad_lif_fashion_mnist.py +0 -221
  170. package/skills/package-skills/brainpy-state/references/scripts/sound_localization.py +0 -240
  171. package/skills/package-skills/brainpy-state/references/scripts/training-snn.py +0 -119
@@ -0,0 +1,31 @@
1
+ # Exchange point and regional signals on two clocks
2
+
3
+ Use a declared integer clock ratio when point neurons require fine updates and a regional model receives windowed population input. The exchange rule is part of the model: a held signal and a window-averaged rate are not automatically equivalent to continuously coupled dynamics.
4
+
5
+ ## Preserve availability and counts
6
+
7
+ | API | Use |
8
+ |---|---|
9
+ | `MultirateCoupling` in `scripts/advanced_native_patterns.py` | Run five `0.1 ms` point-neuron updates inside one `0.5 ms` regional window in the canonical fixture. |
10
+ | `brainstate.transform.for_loop` | Advance the fixed number of fine steps with State tracking; snapshot the previous regional signal before the window. |
11
+ | `brainstate.environ.context(dt=..., t=...)` | Scope fine and coarse clocks explicitly around their owning model updates. |
12
+ | `brainmass.Simulator(wrapper, dt=coarse_dt).run(...)` | Let the standard runner own independent initialization and coarse-window execution. |
13
+
14
+ Run `python scripts/advanced_native_patterns.py` from this skill root. The wrapper holds the previous completed regional signal for all fine steps, sums their point spikes, divides by the full window duration, and converts the resulting physical rate into the regional model's declared dimensionless drive. The region advances only after that window has completed. Its new signal becomes available to point neurons in the following window.
15
+
16
+ The runner's `ts` labels window starts in this fixture. Use the explicitly monitored `end_time` when interpreting the newly completed regional State; do not assign its value to a time before the source window was available.
17
+
18
+ Docker checks verify exact spike-count/rate conservation, the one-window hold relation, no feedback from a future regional update, independent replay, and the zero-coupling limit against an independently driven point neuron. The fixture includes point and regional models; it does not add a separate slow-clock detailed-cell solver.
19
+
20
+ ## Separate correct exchange from numerical equivalence
21
+
22
+ Changing only the regional exchange interval from `0.5` to `0.2` to `0.1 ms` produced final regional values approximately `0.05951`, `0.05745`, and `0.05886`. They are finite but do not show monotonic refinement in this threshold-driven fixture. Do not claim timestep independence, convergence, or equivalence to an earlier continuously coupled model from the conservation/causality checks.
23
+
24
+ Non-integer clock ratios, asynchronous interpolation, arbitrary multirate cellular integration, and other exchange kernels require their own implementation and scientific validation. Re-run refinement and matched controls under the intended exchange rule before interpreting results.
25
+
26
+ Open `references/multiscale-composition.md` for the separately verified common-clock point/HH-cell/region graph. Open `brainx-modeling-loop` → `references/multiscale-coupling.md` for scientific units, observables, windows, and delay decisions.
27
+
28
+ ## Sources
29
+
30
+ - [BrainState control flow](https://brainx.chaobrain.com/brainstate/tutorials/transformations/05_control_flow.html)
31
+ - [BrainMass regional inputs](https://brainx.chaobrain.com/brainmass/reference/generated/brainmass.XY_Oscillator.html)
@@ -0,0 +1,28 @@
1
+ # Compose point, cellular, and regional dynamics
2
+
3
+ Use one native Module graph when BrainSpike point neurons, BrainCell cellular mechanisms, and BrainMass regional dynamics exchange observables during a run. Each package still owns its equations; the wrapper owns only the exchange contract.
4
+
5
+ Open `scripts/multiscale_workflow.py` for `CoupledScales`: a custom BrainSpike LIF, a BrainCell HH cell with sodium/potassium/leak currents, and a BrainMass Hopf region. The fixture uses the same `0.1 ms` clock and reads all source observables before updating targets.
6
+
7
+ | API | Use |
8
+ |---|---|
9
+ | `brainstate.nn.Module` | Own the component graph and read previous source values before any target advances. |
10
+ | `brainmass.Simulator(wrapper, dt=...).run(..., monitors=...)` | Run a compatible native wrapper and collect post-step State without rebuilding the time loop. |
11
+ | `point.get_spike() / dt` | Convert previous-step spike counts to an instantaneous rate with physical inverse-time units; choose an explicit rate scale before supplying a dimensionless regional drive. |
12
+ | `cell.update(current_density)` | Advance the cellular component with current density when its channel currents are densities; do not add bare total current without a defined area conversion. |
13
+ | `mass.update(x_inp=..., y_inp=...)` | Supply the Hopf component's declared input channels; do not overwrite its hidden State to inject a drive. |
14
+
15
+ For the bundled fixture, use `brainmass.Simulator(CoupledScales(gain=1), dt=0.1*u.ms).run(...)`. Observe `point.V`, `cell.V`, and `mass.x` through named callable monitors. The gains are explicit mechanics examples and require scientific calibration in a real study.
16
+
17
+ Set `gain=0` and compare against separately driven components under the same seed and initialization. Injected point spikes may influence the region only on the next step; verify the first allowed arrival. Use a declared window/filter for scientific population-rate estimates, and test finer clocks when discretization affects conclusions.
18
+
19
+ BrainCell `0.2.0` in the tested image imports BrainPy transitively. The application code uses public BrainCell/BrainSpike APIs, but this three-scale fixture does not establish a BrainPy-free runtime. Native point-neuron and training tests block BrainPy imports independently.
20
+
21
+ Open `brainx-modeling-loop` → `references/multiscale-coupling.md` for exchange-window, resampling, multiple-clock, and scientific-delay decisions. The common-clock fixture does not validate arbitrary multirate coupling or insertion of custom components into the NEST Simulator.
22
+
23
+ Open `references/multirate-coupling.md` for the separately verified integer-clock point/regional exchange, count conservation, availability timestamps, and lack of demonstrated monotonic refinement.
24
+
25
+ ## Official contracts
26
+
27
+ - [BrainSpike Neuron](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Neuron.html)
28
+ - [BrainMass XY oscillator input channels](https://brainx.chaobrain.com/brainmass/reference/generated/brainmass.XY_Oscillator.html)
@@ -0,0 +1,52 @@
1
+ # Compose native BrainSpike dynamics
2
+
3
+ Use native composition when custom equations, differentiable recurrent paths, explicit synaptic State placement, or cross-package clocks cannot be expressed through the NEST Simulator. A native graph is a BrainState Module graph containing public BrainSpike dynamics; it does not depend on the private unified kernel.
4
+
5
+ ## Implement the state lifecycle
6
+
7
+ A `Neuron` owns hidden membrane/spike State; `init_state` allocates it, `reset_state` restores an independent rollout, and `update` advances one declared timestep.
8
+
9
+ | API | Use |
10
+ |---|---|
11
+ | `brainspike.Neuron(size, spk_fun=...)` | Subclass for custom point-neuron equations; implement `get_spike`, initialization, reset, and update. |
12
+ | `brainspike.Synapse(size)` | Subclass for custom temporal filtering; put the filter State on the chosen neuron or edge dimension. |
13
+ | `brainspike.Dynamics.sum_current_inputs(current)` | Consume registered current inputs in an update; persistent callables remain registered and one-shot arrays are consumed. |
14
+ | `brainstate.HiddenState(value)` | Store rollout variables that must participate in State-aware transforms. |
15
+ | `brainstate.nn.init_all_states(model)` / `reset_all_states(model)` | Allocate once and reset independent episodes without replacing learned parameters. |
16
+ | `brainstate.transform.for_loop(step, inputs)` | Advance a native graph over time while tracking State effects. |
17
+
18
+ Open `scripts/native_workflows.py` for the complete `LIF`, `ExponentialConductance`, and `RecurrentSNN` implementations. The LIF uses Euler integration, a dimensionless surrogate argument, and an explicitly implemented soft reset. Its numeric parameters are a mechanics fixture, not a claim of equivalence to every legacy LIF model.
19
+
20
+ Open `references/braintools/input-current.md` for current sampling and unit normalization; open `references/braintools/connectivity.md` when topology requires more than an existing native rule.
21
+
22
+ ## Place synaptic State intentionally
23
+
24
+ Open `references/native-projections.md` when assembling chemical connections: it owns communication, temporal filtering, CUBA/COBA conversion, target update order, and the exact conditions for target/source State sharing. Run its complete E/I example before adapting a biological network.
25
+
26
+ Use the ETP-aware native training projection in `references/native-training.md` when temporal gradients are required; the fixed binary communication example does not establish the same training contract.
27
+
28
+ Open `references/native-delays.md` before inserting transmission history, and `references/model-and-readout-selection.md` when choosing dynamics or temporal decoding.
29
+
30
+ ## Couple native voltages electrically
31
+
32
+ For a symmetric gap junction, snapshot both old voltages and calculate one physical current before advancing either neuron. The opposite current must use that same snapshot:
33
+
34
+ ```python
35
+ current = conductance * (right.V.value - left.V.value)
36
+ left(current)
37
+ right(-current)
38
+ ```
39
+
40
+ Use this with compatible current-driven native neurons; the Docker check verifies the symmetric pair's mean voltage and contraction. This does not validate every NEST gap-junction model or a general multicompartment electrical solver.
41
+
42
+ ## Preserve causal ordering
43
+
44
+ Read all previous completed source values before updating any target in a recurrent step. Integrate each source once. Record whether new events affect the current or next step; never change that convention while porting a model.
45
+
46
+ Open `references/native-training.md` for BPTT and pp-prop. Open `references/multiscale-composition.md` for cellular and regional coupling, and `references/migration-boundary.md` for remaining unsupported generalizations.
47
+
48
+ ## Official contracts
49
+
50
+ - [Neuron and surrogate-gradient lifecycle](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Neuron.html)
51
+ - [Synapse base and State placement](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Synapse.html)
52
+ - [Dynamics input lifecycle](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Dynamics.html)
@@ -0,0 +1,34 @@
1
+ # Delay native point-neuron inputs
2
+
3
+ Delay the source signal before communication and synaptic filtering. Prove arrival at the actual conductance and target-voltage boundary; a buffer-only check or postsynaptic spike time alone does not establish the transmission delay.
4
+
5
+ ## Select the delay owner
6
+
7
+ | API | Use |
8
+ |---|---|
9
+ | `brainspike.Simulator.connect(..., delay=...)` | Use for a NEST graph; preserve its own device and transmission timestamp conventions. |
10
+ | `brainstate.nn.Delay` | Use for explicit native signal history; initialize it with the rest of the Module graph. |
11
+ | `DelayBank` in `scripts/delay_workflow.py` | Use the verified three-source named-tap example with delays `[0,2,3]*dt`. |
12
+ | `DelayedProjection` in `scripts/delay_workflow.py` | Follow the complete external-event → buffer → communication → conductance → target update path. |
13
+
14
+ Run the named-tap example from this skill root:
15
+
16
+ ```bash
17
+ python scripts/delay_workflow.py
18
+ ```
19
+
20
+ For `DelayedProjection`, initialize the graph and drive a boolean `(time,3)` input through `brainstate.transform.for_loop`. Its source event on channel 1 at input step zero first changes conductance and target voltage at step 2. An independent quiet rollout after whole-graph initialization has zero conductance. The target is subthreshold in the impulse check, so refractory/threshold effects do not obscure arrival.
21
+
22
+ Open `brainstate` → `references/brainstate/delay-buffers.md` for the authoritative write-before-read convention, named entries, fixed timestep, reset, and mapped-pointer constraints. Keep those buffer rules in BrainState; this reference owns their point-neuron integration.
23
+
24
+ The native fixture consumes an externally available event in its current update. In a recurrent network that first reads a previous completed source event, include that availability offset when interpreting latency. Record source emission, buffer input, conductance onset, and voltage response separately. Do not shift a tap to hide an unexplained one-step discrepancy.
25
+
26
+ Use integer grid taps for binary events. Off-grid interpolation, arbitrary per-edge delays, and mapped heterogeneous pointer State require separate verification. Separate delayed NEST connections are already checked, but that result does not validate this native buffer path or restore old delayed-prefetch/projection APIs.
27
+
28
+ Open `references/native-projections.md` for conductance and current order, and `references/nest-compatible/network-building.md` for NEST delay/lifecycle control.
29
+
30
+ Open `references/nest-delay-boundaries.md` for the separately tested NEST vector delay, matrix grouping, fractional current transmission, and explicit-spec failures.
31
+
32
+ ## Sources
33
+
34
+ - [BrainState delay protocol](https://brainx.chaobrain.com/brainstate/tutorials/brain_dynamics/02_synaptic_delays.html)
@@ -0,0 +1,43 @@
1
+ # Build a native conductance network
2
+
3
+ A chemical connection maps completed source events into a temporal synaptic state, converts that state into physical target current, and deposits the current before the target integrates. Preserve these four roles even when no projection wrapper class is available.
4
+
5
+ ## Compose the four roles
6
+
7
+ | API | Use |
8
+ |---|---|
9
+ | `brainevent.BinaryArray(events) @ weights` | Map fixed binary source events to target conductance increments; the example uses small dense wiring. |
10
+ | `ExponentialConductance` in `scripts/native_workflows.py` | Decay a target-aligned linear trace and add the current increment; allocate one state value per target. |
11
+ | `g * (E - V_post)` | Convert a nonnegative conductance into signed current using the old target voltage and channel reversal. |
12
+ | `LIF(current)` in `scripts/native_workflows.py` | Advance the target exactly once after all incoming currents are assembled. |
13
+
14
+ Run the complete canonical example from this skill root:
15
+
16
+ ```bash
17
+ python scripts/native_ei_network.py
18
+ ```
19
+
20
+ `EINetwork` registers separate excitatory/inhibitory point populations and two postsynaptic conductance filters. It snapshots both populations' previous events and voltages, communicates all source events, filters both receptor contributions, computes their currents, then advances both populations. The small dense Bernoulli wiring allows autapses; remove the corresponding diagonal entries explicitly when the scientific design forbids them. Filters own `N_exc+N_inh` values each rather than one value per edge. The returned monitors expose conductance, signed current, voltage, and binary events.
21
+
22
+ The fixture uses positive excitatory and inhibitory conductance magnitudes. Excitation has reversal `0 mV`; inhibition has reversal `-80 mV`. Inhibitory current is negative only while target voltage is above that reversal. Do not encode inhibition by making a conductance negative. For a current-based network, use a current-valued filter/weight contract; do not change only the unit of this conductance filter. The NEST COBA/CUBA alternative is `references/nest-compatible/scripts/brette_et_al_2007.py`.
23
+
24
+ ## Preserve the alignment conditions
25
+
26
+ Target-aligned reduction is exact for a linear exponential filter when all merged inputs to that filter share its time constant and output contract. Use separate filters for distinct reversal potentials or kinetics. Do not merge nonlinear receptors or heterogeneous edge histories merely to reduce memory.
27
+
28
+ Source-aligned sharing requires identical outgoing kinetics for each shared source trace. Connection-specific nonlinear dynamics may require per-edge State. Treat old AlignPre/AlignPost descriptors as retired APIs; derive State placement from the equations and verify equivalence before implementing an advanced composition.
29
+
30
+ Open `references/nonlinear-state-sharing.md` before reusing nonlinear source traces; it contains the homogeneous edge-reference comparison and explicit counterexamples to invalid aggregation.
31
+
32
+ ## Verify before scaling
33
+
34
+ The Docker checks inject known previous-step events and verify conductance increments, current signs, and target voltage on the same update, then check exponential decay and independent reset. The short E/I rollout checks finite traces and nonzero activity. It is a mechanics fixture using a custom Euler LIF without an absolute refractory period; it does not reproduce the old COBA benchmark or claim a calibrated network regime.
35
+
36
+ When porting an existing COBA model, replay the same edge, weight, initial voltage, and drive arrays in both implementations. Compare post-update conductance and voltage on the same clock step under separate subthreshold E and I impulses. Then drive an isolated neuron through consecutive spikes: a subthreshold match cannot check the reset phase or the refractory boundary. In the BrainPy 2.9.0 `LIFRef` soft-reset path, the spike is visible on the threshold-crossing step and reset appears on the next update; probe the exact refractory endpoint on the port's time grid. When matching exponential Euler, include the COBA conductance in the voltage slope if the baseline integrates its voltage dependence within the step. Recheck these behaviors in the pinned runtime before comparing recurrent population statistics.
37
+
38
+ Open `references/native-delays.md` before adding transmission history. Open `references/model-and-readout-selection.md` before choosing physiology or temporal readout. Open `brainevent` → `references/sparse-formats.md` when scaling beyond the small dense connectivity fixture.
39
+
40
+ ## Sources
41
+
42
+ - [BrainSpike neuron contract](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Neuron.html)
43
+ - [BrainSpike synapse contract](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Synapse.html)
@@ -0,0 +1,36 @@
1
+ # Train a native BrainSpike network
2
+
3
+ Use this path for a native graph built from public `brainspike.Neuron` and BrainState Modules. For direct NEST Simulator continuous-voltage fitting, open `references/simulator-training.md`. That path is separately verified and does not pass a Simulator graph to this learner.
4
+
5
+ Open `references/braintools/data-preprocessing.md` for encoded input axes and `references/braintools/parameter-initializer.md` for reproducible initial weights.
6
+
7
+ ## Choose the temporal gradient
8
+
9
+ | API | Use |
10
+ |---|---|
11
+ | `brainstate.transform.grad(loss, params, return_value=True)` | Use for BPTT through the complete native rollout; select only `ParamState` and reset hidden State inside the loss. |
12
+ | `braintrace.nn.Linear` | Use for trainable projections and readouts that must participate in eligibility-trace compilation. |
13
+ | `braintrace.compile(model, braintrace.pp_prop, example_step, batch_size=..., decay_or_rank=0.9)` | Use for factorized online traces; compile one representative step and inspect the report before training. |
14
+ | `learner.etrace_grad(..., step_fn=..., reduction="mean", return_value=True)` | Advance every sequence step and accumulate the declared gradient reduction; update parameters after the sequence. |
15
+ | `learner.reset_state(batch_size=...)` | Reset eligibility State alongside the native graph at every independent sequence boundary. |
16
+ | `braintools.optim.Adam(...).register_trainable_weights(params)` | Register the same parameter collection used for differentiation, then update it with matching gradients. |
17
+
18
+ Open `scripts/train_native_snn.py` and run `python scripts/train_native_snn.py --estimator bptt` or `--estimator pp-prop` from this skill root. Both modes use the same recurrent spike model and trained readout. BPTT compiles the reset-gradient-update step; pp-prop resets model and eligibility State, drives every step, and applies one update per sequence. Keep time-major inputs and preserve the batch axis in compiled learner resets.
19
+
20
+ A readout that never feeds hidden State can be trainable without receiving a temporal trace. The expected compiler warning for that path does not mean the recurrent projection failed; inspect `report.etrace_weights` and require zero report errors.
21
+
22
+ Open `references/temporal-task-training.md` for the complete batched report-window task, cue ablation, and ordinary/checkpointed BPTT parity. Open `references/model-and-readout-selection.md` when choosing an instantaneous or leaky readout.
23
+
24
+ ## Verify temporal learning
25
+
26
+ Require finite nonzero gradients for both the recurrent projection and readout, actual parameter changes, and decreasing fixed-fixture loss. Compare pp-prop with BPTT on a reduced matched model, but do not assume estimator equality. Surrogate gradients are deliberately not finite-difference derivatives of hard threshold spikes.
27
+
28
+ The Docker regression fixture separately checks the recurrent and readout updates, compiler participation, online gradients, and a matched BPTT gradient direction. Its small synthetic target validates mechanics; it does not demonstrate held-out cognitive performance or long-memory accuracy.
29
+
30
+ Open `braintrace` → `references/pp_pprop workflow.md` for estimator and memory constraints. Open `references/braintools/optimizer.md`, `references/braintools/metric.md`, or `references/braintools/surrogate.md` when choosing the corresponding infrastructure.
31
+
32
+ ## Official contracts
33
+
34
+ - [BrainSpike Neuron surrogate interface](https://brainx.chaobrain.com/brainspike/apis/generated/brainspike.Neuron.html)
35
+ - [BrainTrace pp-prop](https://brainx.chaobrain.com/braintrace/tutorials/pp_prop.html)
36
+ - [BrainTrace online SNN workflow](https://brainx.chaobrain.com/braintrace/tutorials/snn_online_learning.html)
@@ -22,11 +22,11 @@ Use these constructors when the device must inject a current rather than deliver
22
22
 
23
23
  | Constructor | Use when |
24
24
  |---|---|
25
- | `sim.create(bp.dc_generator, size=1, params=parameters)` | Use a constant current over a `start`/`stop` window. |
26
- | `sim.create(bp.ac_generator, size=1, params=parameters)` | Use a sinusoidal current. |
27
- | `sim.create(bp.noise_generator, size=1, params=parameters)` | Use Gaussian white-noise current with independent target realizations. |
28
- | `sim.create(bp.step_current_generator, size=1, params=parameters)` | Use a piecewise-constant current schedule. |
29
- | `sim.create(bp.step_rate_generator, size=1, params=parameters)` | Use a piecewise-constant rate schedule. |
25
+ | `sim.create(brainspike.dc_generator, size=1, params=parameters)` | Use a constant current over a `start`/`stop` window. |
26
+ | `sim.create(brainspike.ac_generator, size=1, params=parameters)` | Use a sinusoidal current. |
27
+ | `sim.create(brainspike.noise_generator, size=1, params=parameters)` | Use Gaussian white-noise current with independent target realizations. |
28
+ | `sim.create(brainspike.step_current_generator, size=1, params=parameters)` | Use a piecewise-constant current schedule. |
29
+ | `sim.create(brainspike.step_rate_generator, size=1, params=parameters)` | Use a piecewise-constant rate schedule. |
30
30
 
31
31
  Current generators inject through the target's current ring buffer. Do not treat them as weighted spike-event sources.
32
32
 
@@ -36,9 +36,9 @@ Use these constructors for explicit spike schedules, supplied trains, or spike d
36
36
 
37
37
  | Constructor | Use when |
38
38
  |---|---|
39
- | `sim.create(bp.spike_generator, size=1, params=parameters)` | Use explicit `spike_times`. |
40
- | `sim.create(bp.spike_train_injector, size=1, params=parameters)` | Use a supplied spike train as an event source. |
41
- | `sim.create(bp.spike_dilutor, size=1, params=parameters)` | Use NEST-compatible spike dilution. |
39
+ | `sim.create(brainspike.spike_generator, size=1, params=parameters)` | Use explicit `spike_times`. |
40
+ | `sim.create(brainspike.spike_train_injector, size=1, params=parameters)` | Use a supplied spike train as an event source. |
41
+ | `sim.create(brainspike.spike_dilutor, size=1, params=parameters)` | Use NEST-compatible spike dilution. |
42
42
 
43
43
  ## Poisson generators
44
44
 
@@ -46,10 +46,10 @@ Use these constructors when spike times follow a constant, precise, scheduled, o
46
46
 
47
47
  | Constructor | Use when |
48
48
  |---|---|
49
- | `sim.create(bp.poisson_generator, size=1, params=parameters)` | Use a constant-rate Poisson train over a configured window. |
50
- | `sim.create(bp.poisson_generator_ps, size=1, params=parameters)` | Use precise-time Poisson spikes with dead time. |
51
- | `sim.create(bp.inhomogeneous_poisson_generator, size=1, params=parameters)` | Use a time-varying Poisson schedule. |
52
- | `sim.create(bp.sinusoidal_poisson_generator, size=1, params=parameters)` | Use a sinusoidally modulated Poisson rate. |
49
+ | `sim.create(brainspike.poisson_generator, size=1, params=parameters)` | Use a constant-rate Poisson train over a configured window. |
50
+ | `sim.create(brainspike.poisson_generator_ps, size=1, params=parameters)` | Use precise-time Poisson spikes with dead time. |
51
+ | `sim.create(brainspike.inhomogeneous_poisson_generator, size=1, params=parameters)` | Use a time-varying Poisson schedule. |
52
+ | `sim.create(brainspike.sinusoidal_poisson_generator, size=1, params=parameters)` | Use a sinusoidally modulated Poisson rate. |
53
53
 
54
54
  ## Other generators
55
55
 
@@ -57,11 +57,11 @@ Use these constructors for gamma-process, correlated, dead-time, or pulse-packet
57
57
 
58
58
  | Constructor | Use when |
59
59
  |---|---|
60
- | `sim.create(bp.gamma_sup_generator, size=1, params=parameters)` | Use a superposition of independent gamma processes. |
61
- | `sim.create(bp.sinusoidal_gamma_generator, size=1, params=parameters)` | Use a sinusoidally modulated gamma source. |
62
- | `sim.create(bp.mip_generator, size=1, params=parameters)` | Use correlated trains from a multiple-interaction process. |
63
- | `sim.create(bp.ppd_sup_generator, size=1, params=parameters)` | Use a superposition of Poisson processes with dead time. |
64
- | `sim.create(bp.pulsepacket_generator, size=1, params=parameters)` | Use a Gaussian pulse packet. |
60
+ | `sim.create(brainspike.gamma_sup_generator, size=1, params=parameters)` | Use a superposition of independent gamma processes. |
61
+ | `sim.create(brainspike.sinusoidal_gamma_generator, size=1, params=parameters)` | Use a sinusoidally modulated gamma source. |
62
+ | `sim.create(brainspike.mip_generator, size=1, params=parameters)` | Use correlated trains from a multiple-interaction process. |
63
+ | `sim.create(brainspike.ppd_sup_generator, size=1, params=parameters)` | Use a superposition of Poisson processes with dead time. |
64
+ | `sim.create(brainspike.pulsepacket_generator, size=1, params=parameters)` | Use a Gaussian pulse packet. |
65
65
 
66
66
  A generator fans out to one independent train per target neuron. For a multi-channel generator, pass one signed connection weight per channel.
67
67
 
@@ -71,9 +71,9 @@ Use these constructors to capture spikes, named analog State, or per-edge plasti
71
71
 
72
72
  | Constructor | Use when |
73
73
  |---|---|
74
- | `sim.create(bp.spike_recorder, size=1)` | Use to record emitted spikes, event counts, or mean population rate. |
75
- | `sim.create(bp.multimeter, size=1, record_from=recordables, interval=interval)` | Use to sample named analog recordables such as `V_m`. |
76
- | `sim.create(bp.weight_recorder, size=1, params=parameters)` | Use the NEST-compatible weight-recorder device. |
74
+ | `sim.create(brainspike.spike_recorder, size=1)` | Use to record emitted spikes, event counts, or mean population rate. |
75
+ | `sim.create(brainspike.multimeter, size=1, record_from=recordables, interval=interval)` | Use to sample named analog recordables such as `V_m`. |
76
+ | `sim.create(brainspike.weight_recorder, size=1, params=parameters)` | Use the NEST-compatible weight-recorder device. |
77
77
 
78
78
  ## Recorder readback
79
79
 
@@ -95,10 +95,10 @@ Use these constructors to compute correlation or binary-State statistics from re
95
95
 
96
96
  | Constructor | Use when |
97
97
  |---|---|
98
- | `sim.create(bp.correlation_detector, size=1, params=parameters)` | Use pairwise correlation statistics. |
99
- | `sim.create(bp.correlomatrix_detector, size=1, params=parameters)` | Use a correlation matrix. |
100
- | `sim.create(bp.correlospinmatrix_detector, size=1, params=parameters)` | Use spin-based correlation matrices. |
101
- | `sim.create(bp.spin_detector, size=1, params=parameters)` | Use binary-State decoding from spikes. |
98
+ | `sim.create(brainspike.correlation_detector, size=1, params=parameters)` | Use pairwise correlation statistics. |
99
+ | `sim.create(brainspike.correlomatrix_detector, size=1, params=parameters)` | Use a correlation matrix. |
100
+ | `sim.create(brainspike.correlospinmatrix_detector, size=1, params=parameters)` | Use spin-based correlation matrices. |
101
+ | `sim.create(brainspike.spin_detector, size=1, params=parameters)` | Use binary-State decoding from spikes. |
102
102
 
103
103
  Obtain spike data before driving a detector that uses NumPy randomness or a Python host loop; do not force imperative detector logic into the compiled simulation loop.
104
104
 
@@ -108,7 +108,7 @@ Use this constructor when dopamine-modulated plasticity needs one shared broadca
108
108
 
109
109
  | Constructor | Use when |
110
110
  |---|---|
111
- | `sim.create(bp.volume_transmitter, size=1, params=parameters)` | Use to broadcast dopamine State to `stdp_dopamine_synapse`. |
111
+ | `sim.create(brainspike.volume_transmitter, size=1, params=parameters)` | Use to broadcast dopamine State to `stdp_dopamine_synapse`. |
112
112
 
113
113
  ## Device direction
114
114
 
@@ -123,13 +123,13 @@ Use device role to determine the `connect()` direction.
123
123
 
124
124
  ```python
125
125
  import brainunit as u
126
- from brainpy import state as bp
126
+ import brainspike
127
127
 
128
- sim = bp.Simulator(dt=0.1 * u.ms)
129
- neuron = sim.create(bp.iaf_psc_exp, 1)
130
- drive = sim.create(bp.poisson_generator, rate=8000.0 * u.Hz, rng_seed=0)
131
- spike_recorder = sim.create(bp.spike_recorder)
132
- meter = sim.create(bp.multimeter, record_from=["V_m"], interval=0.1 * u.ms)
128
+ sim = brainspike.Simulator(dt=0.1 * u.ms)
129
+ neuron = sim.create(brainspike.iaf_psc_exp, 1)
130
+ drive = sim.create(brainspike.poisson_generator, rate=8000.0 * u.Hz, rng_seed=0)
131
+ spike_recorder = sim.create(brainspike.spike_recorder)
132
+ meter = sim.create(brainspike.multimeter, record_from=["V_m"], interval=0.1 * u.ms)
133
133
 
134
134
  sim.connect(drive, neuron, weight=10.0 * u.pA, delay=1.0 * u.ms)
135
135
  sim.connect(neuron, spike_recorder)
@@ -153,5 +153,5 @@ voltage = result.trace(meter, "V_m")
153
153
 
154
154
  ## Official sources
155
155
 
156
- - https://brainx.chaobrain.com/brainpy-state/nest-style/devices.html
157
- - https://brainx.chaobrain.com/brainpy-state/apis/nest-devices.html
156
+ - https://brainx.chaobrain.com/brainspike/nest-style/devices.html
157
+ - https://brainx.chaobrain.com/brainspike/apis/nest-devices.html
@@ -6,7 +6,7 @@ Use this reference when porting NEST code, locating plasticity parameters, expla
6
6
 
7
7
  | Divergence | Porting decision | Failure prevented |
8
8
  |---|---|---|
9
- | Learning State location | Move NEST neuron-owned learning parameters to the BrainPy-State synapse spec or broadcast node where documented. | Setting a recognized name on the wrong object and silently changing the learning rule. |
9
+ | Learning State location | Move NEST neuron-owned learning parameters to the BrainSpike synapse spec or broadcast node where documented. | Setting a recognized name on the wrong object and silently changing the learning rule. |
10
10
  | Parameter-location maps | Check each STDP or Clopath parameter rather than assuming all parameters move together. | Moving voltage-filter State that must remain on the neuron. |
11
11
  | Online versus deferred updates | Compare at the documented event times and use the documented numerical band. | Reporting a known timing residual as an implementation failure. |
12
12
  | Device and recording conventions | Preserve analog observer direction, current-versus-spike source semantics, and in-memory readback. | Empty recordings, one-step misalignment, or unsupported file output. |
@@ -14,9 +14,9 @@ Use this reference when porting NEST code, locating plasticity parameters, expla
14
14
 
15
15
  ## STDP parameter placement
16
16
 
17
- BrainPy-State evaluates plasticity kernels every time step on an event-driven substrate. It keeps presynaptic and postsynaptic traces on the plasticity side so rules can run without a NEST archiving-capable postsynaptic neuron.
17
+ BrainSpike evaluates plasticity kernels every time step on an event-driven substrate. It keeps presynaptic and postsynaptic traces on the plasticity side so rules can run without a NEST archiving-capable postsynaptic neuron.
18
18
 
19
- | Parameter or State | NEST location | BrainPy-State location |
19
+ | Parameter or State | NEST location | BrainSpike location |
20
20
  |---|---|---|
21
21
  | `tau_minus` for trace-based STDP | Postsynaptic archiving neuron | Synapse spec |
22
22
  | `tau_minus_triplet` | Postsynaptic archiving neuron | `stdp_triplet_synapse` spec |
@@ -29,7 +29,7 @@ BrainPy-State evaluates plasticity kernels every time step on an event-driven su
29
29
 
30
30
  ```python
31
31
  # Port tau_minus from the NEST postsynaptic neuron to the synapse spec.
32
- plasticity = bp.stdp_synapse(
32
+ plasticity = brainspike.stdp_synapse(
33
33
  tau_plus=20.0 * u.ms,
34
34
  tau_minus=20.0 * u.ms,
35
35
  )
@@ -43,10 +43,10 @@ Use these constructors when the port requires a specific nearest-neighbour or ha
43
43
 
44
44
  | Constructor | Use when |
45
45
  |---|---|
46
- | `bp.stdp_nn_symm_synapse(*args, **kwargs)` | Use when each spike must pair only with the nearest preceding spike on the opposite side. |
47
- | `bp.stdp_nn_restr_synapse(*args, **kwargs)` | Use symmetric nearest-neighbour pairing with a one-pairing-per-spike availability restriction. |
48
- | `bp.stdp_nn_pre_centered_synapse(*args, **kwargs)` | Use when a postsynaptic spike must consume all presynaptic spikes accumulated since the preceding postsynaptic spike, while a presynaptic spike pairs with the nearest preceding postsynaptic spike. |
49
- | `bp.stdp_facetshw_synapse_hom(*args, **kwargs)` | Use when causal and acausal charge must accumulate before quantized LUT readout on the configured cycle. |
46
+ | `brainspike.stdp_nn_symm_synapse(*args, **kwargs)` | Use when each spike must pair only with the nearest preceding spike on the opposite side. |
47
+ | `brainspike.stdp_nn_restr_synapse(*args, **kwargs)` | Use symmetric nearest-neighbour pairing with a one-pairing-per-spike availability restriction. |
48
+ | `brainspike.stdp_nn_pre_centered_synapse(*args, **kwargs)` | Use when a postsynaptic spike must consume all presynaptic spikes accumulated since the preceding postsynaptic spike, while a presynaptic spike pairs with the nearest preceding postsynaptic spike. |
49
+ | `brainspike.stdp_facetshw_synapse_hom(*args, **kwargs)` | Use when causal and acausal charge must accumulate before quantized LUT readout on the configured cycle. |
50
50
 
51
51
  Do not replace one nearest-neighbour variant with another because their class names look similar; the pairing convention changes the weight trajectory.
52
52
 
@@ -56,9 +56,9 @@ The direction and ordering of each effect remain exact; only the documented magn
56
56
 
57
57
  | Rule or behavior | Cause | Accepted result |
58
58
  |---|---|---|
59
- | Clopath online LTP | BrainPy-State reads online with an intrinsic one-step lag; NEST reads a delayed analog ring buffer and defers the history sum. | Use `delay_u_bars=0.1 ms` for parity and accept the documented `<= 5%` band; the NEST `4.0 ms` default is not reproduced online. |
60
- | Dopamine-modulated STDP | BrainPy-State integrates every step; NEST integrates lazily at send/update time. | Accept the documented approximately `0.2%` band while requiring exact direction and ordering. |
61
- | Nearest-neighbour phantom pre at `t=0` | NEST initializes the first send time at zero; BrainPy-State represents that no real presynaptic spike has occurred. | Do not require the phantom facilitation for `stdp_nn_symm_synapse` or `stdp_nn_restr_synapse`. |
59
+ | Clopath online LTP | BrainSpike reads online with an intrinsic one-step lag; NEST reads a delayed analog ring buffer and defers the history sum. | Use `delay_u_bars=0.1 ms` for parity and accept the documented `<= 5%` band; the NEST `4.0 ms` default is not reproduced online. |
60
+ | Dopamine-modulated STDP | BrainSpike integrates every step; NEST integrates lazily at send/update time. | Accept the documented approximately `0.2%` band while requiring exact direction and ordering. |
61
+ | Nearest-neighbour phantom pre at `t=0` | NEST initializes the first send time at zero; BrainSpike represents that no real presynaptic spike has occurred. | Do not require the phantom facilitation for `stdp_nn_symm_synapse` or `stdp_nn_restr_synapse`. |
62
62
 
63
63
  For ordinary online-versus-deferred pair STDP, compare weights at presynaptic send times, where the operations coincide.
64
64
 
@@ -96,7 +96,7 @@ Validation categories describe how parity is asserted. They are related to, but
96
96
  Run the live-NEST harness when the package source and NEST are available:
97
97
 
98
98
  ```bash
99
- python -m pytest brainpy_state/_nest_validation/ -m requires_nest -q
99
+ python -m pytest brainspike/_nest_validation/ -m requires_nest -q
100
100
  ```
101
101
 
102
102
  Tests marked `requires_nest` skip when NEST cannot be imported; harness unit tests still run without NEST.
@@ -109,6 +109,6 @@ Tests marked `requires_nest` skip when NEST cannot be imported; harness unit tes
109
109
 
110
110
  ## Official sources
111
111
 
112
- - https://brainx.chaobrain.com/brainpy-state/nest-style/divergences/index.html
113
- - https://brainx.chaobrain.com/brainpy-state/nest-style/validation-status.html
114
- - https://brainx.chaobrain.com/brainpy-state/nest-style/divergences/stdp.html
112
+ - https://brainx.chaobrain.com/brainspike/nest-style/divergences/index.html
113
+ - https://brainx.chaobrain.com/brainspike/nest-style/validation-status.html
114
+ - https://brainx.chaobrain.com/brainspike/nest-style/divergences/stdp.html
@@ -38,4 +38,4 @@ Examples:
38
38
 
39
39
  ## Official source
40
40
 
41
- - https://brainx.chaobrain.com/brainpy-state/nest-style/integration-categories.html
41
+ - https://brainx.chaobrain.com/brainspike/nest-style/integration-categories.html