Seal Phase4AE same-precision GPU numerical gate and audit limits

This commit is contained in:
Digital Drosophila Archive
2026-09-30 07:50:57 +08:00
parent 92241aea02
commit 1eb4c52cf7
648 changed files with 51363 additions and 22 deletions
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_20",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_20",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_20",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_20",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_20",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_20",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,162 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "zz_external_arrivals",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n g = _array_default_neurons_g.copy()\n lastspike = _array_default_neurons_lastspike\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n t = _array_defaultclock_t[0]\n not_refractory = _array_default_neurons_not_refractory.copy()\n dt = _array_defaultclock_dt[0]\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _the_period = _array_zz_external_sources__period_bins[0]\n _timebin = _array_defaultclock_timestep[0]\n _n_spikes = 0\n _lastindex_before = _array_zz_external_sources__lastindex[0]\n if _the_period > 0:\n _timebin %= _the_period\n # If there is a periodicity in the SpikeGenerator, we need to reset the\n # lastindex when the period has passed\n if _lastindex_before > 0 and _array_zz_external_sources__timebins[_lastindex_before - 1] >= _timebin:\n _lastindex_before = 0\n _n_spikes = _numpy.searchsorted(_array_zz_external_sources__timebins[_lastindex_before:],\n _timebin, side='right')\n _array_zz_external_sources__lastindex[0] = _lastindex_before + _n_spikes\n _indices = _array_zz_external_sources_neuron_index[_lastindex_before:_lastindex_before+_n_spikes]\n _array_zz_external_sources__spikespace[:_n_spikes] = _indices\n _array_zz_external_sources__spikespace[-1] = _n_spikes\n",
"name": "zz_external_sources_codeobject"
}
],
"name": "zz_external_sources",
"order": 0,
"type": "SpikeGeneratorGroup",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_t = _array_defaultclock_t[0]\n _source_i = _array_default_neurons_i[_idx]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "g_post += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "zz_external_arrivals_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g_post += w\n _postsynaptic_idx = _array_zz_external_arrivals__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_zz_external_arrivals_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "zz_external_arrivals_pre_codeobject"
}
],
"name": "zz_external_arrivals_pre",
"order": 0,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"abstract_code": "_to_record_v = _source_v\n_to_record_g = _source_g\n_to_record_lastspike = _source_lastspike\n_to_record_not_refractory = _source_not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # Resize dynamic arrays\n _new_len = len(_dynamic_array_oracle_end_state_t) + 1\n _owner.resize(_new_len)\n # Store values\n _dynamic_array_oracle_end_state_t[-1] = _array_defaultclock_t[0]\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = _array_oracle_end_state__indices\n _idx = _array_oracle_end_state__indices\n _source_g = _array_default_neurons_g[_idx]\n _source_not_refractory = _array_default_neurons_not_refractory[_idx]\n _source_v = _array_default_neurons_v[_idx]\n _source_lastspike = _array_default_neurons_lastspike[_idx]\n _to_record_v = _source_v\n _to_record_g = _source_g\n _to_record_lastspike = _source_lastspike\n _to_record_not_refractory = _source_not_refractory\n _dynamic_array_oracle_end_state_v[-1, :] = _to_record_v\n _dynamic_array_oracle_end_state_g[-1, :] = _to_record_g\n _dynamic_array_oracle_end_state_lastspike[-1, :] = _to_record_lastspike\n _dynamic_array_oracle_end_state_not_refractory[-1, :] = _to_record_not_refractory\n",
"name": "oracle_end_state_codeobject"
}
],
"name": "oracle_end_state",
"order": 0,
"type": "StateMonitor",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_oracle_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,5 @@
global_neuron_idx,local_index
-4,0
-3,1
-2,2
-1,3
1 global_neuron_idx local_index
2 -4 0
3 -3 1
4 -2 2
5 -1 3
@@ -0,0 +1,162 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "zz_external_arrivals",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n g = _array_default_neurons_g.copy()\n lastspike = _array_default_neurons_lastspike\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n t = _array_defaultclock_t[0]\n not_refractory = _array_default_neurons_not_refractory.copy()\n dt = _array_defaultclock_dt[0]\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\n",
"name": "default_neurons_stateupdater_codeobject_20"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject_20"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _the_period = _array_zz_external_sources__period_bins[0]\n _timebin = _array_defaultclock_timestep[0]\n _n_spikes = 0\n _lastindex_before = _array_zz_external_sources__lastindex[0]\n if _the_period > 0:\n _timebin %= _the_period\n # If there is a periodicity in the SpikeGenerator, we need to reset the\n # lastindex when the period has passed\n if _lastindex_before > 0 and _array_zz_external_sources__timebins[_lastindex_before - 1] >= _timebin:\n _lastindex_before = 0\n _n_spikes = _numpy.searchsorted(_array_zz_external_sources__timebins[_lastindex_before:],\n _timebin, side='right')\n _array_zz_external_sources__lastindex[0] = _lastindex_before + _n_spikes\n _indices = _array_zz_external_sources_neuron_index[_lastindex_before:_lastindex_before+_n_spikes]\n _array_zz_external_sources__spikespace[:_n_spikes] = _indices\n _array_zz_external_sources__spikespace[-1] = _n_spikes\n",
"name": "zz_external_sources_codeobject_1"
}
],
"name": "zz_external_sources",
"order": 0,
"type": "SpikeGeneratorGroup",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_t = _array_defaultclock_t[0]\n _source_i = _array_default_neurons_i[_idx]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject_20"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "g_post += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "zz_external_arrivals_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g_post += w\n _postsynaptic_idx = _array_zz_external_arrivals__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_zz_external_arrivals_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "zz_external_arrivals_pre_codeobject_1"
}
],
"name": "zz_external_arrivals_pre",
"order": 0,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\n",
"name": "default_neurons_spike_resetter_codeobject_20"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"abstract_code": "_to_record_v = _source_v\n_to_record_g = _source_g\n_to_record_lastspike = _source_lastspike\n_to_record_not_refractory = _source_not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # Resize dynamic arrays\n _new_len = len(_dynamic_array_oracle_end_state_t) + 1\n _owner.resize(_new_len)\n # Store values\n _dynamic_array_oracle_end_state_t[-1] = _array_defaultclock_t[0]\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = _array_oracle_end_state__indices\n _idx = _array_oracle_end_state__indices\n _source_g = _array_default_neurons_g[_idx]\n _source_not_refractory = _array_default_neurons_not_refractory[_idx]\n _source_v = _array_default_neurons_v[_idx]\n _source_lastspike = _array_default_neurons_lastspike[_idx]\n _to_record_v = _source_v\n _to_record_g = _source_g\n _to_record_lastspike = _source_lastspike\n _to_record_not_refractory = _source_not_refractory\n _dynamic_array_oracle_end_state_v[-1, :] = _to_record_v\n _dynamic_array_oracle_end_state_g[-1, :] = _to_record_g\n _dynamic_array_oracle_end_state_lastspike[-1, :] = _to_record_lastspike\n _dynamic_array_oracle_end_state_not_refractory[-1, :] = _to_record_not_refractory\n",
"name": "oracle_end_state_codeobject_1"
}
],
"name": "oracle_end_state",
"order": 0,
"type": "StateMonitor",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_oracle_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,48 @@
{
"all_neurons_keep_original_rfc": true,
"completeness_sha256": "c79ddcee44e7786a8805ed8bd4685d8107764e5dff4952b204e5163f8630ce80",
"connectivity_sha256": "7dbc19bebd51061ac3272c69fe12a7a0a0d179ab21ff6d35193070c64db310f4",
"dt_ms": 0.1,
"parameter_checks": {
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
},
"poisson_helper_used": false,
"precision": "float64",
"queue_trace_enabled": true,
"request_interface": "before_thresholds; v=v_th+1mV only if not_refractory",
"source_parameters_modified": false,
"source_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"state_units": "SI volts, original dtype",
"steps": 160
}
@@ -0,0 +1,14 @@
{
"accepted_due_events": 4,
"advance_calls": 160,
"all_due_events_preserved": true,
"due_events": 11,
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_20"
],
"ordering": "raw anatomical queue.peek local edge-index sequence; no sorting or filtering",
"peek_calls": 160,
"proxy_contract": "peek returns original object; advance and all other methods forward unchanged",
"trace_enabled": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n------------------------------------------------+-------------------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nzz_external_sources (SpikeGeneratorGroup) | zz_external_sources (SpikeGeneratorGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \nzz_external_arrivals_pre (SynapticPathway) | zz_external_arrivals (Synapses) | 100. us (every step) | synapses | 0 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_end_state (StateMonitor) | oracle_end_state (StateMonitor) | 100. us (every step) | end | 0 | yes \nzz_oracle_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}