SimulationResult#
- class brainpy.state.network.SimulationResult(recordings, duration, dt, *, traces=None, times=None, weights=None)#
Recorded spikes and analog traces from a
Simulator.simulate()run.Spike recorders are read with
spikes()/n_events()/rate(). Analog recorders (voltmeter/multimeter, connected in NEST’s reversed direction) are read withtrace(), and the common time axis withtimes.- property times#
The common time axis
(n_steps,)of the run (brainunit Quantity).
- trace(recorder, recordable='V_m')[source]#
Analog trace
(n_steps, n_recorded)for an analog recorder.- Parameters:
recorder (
NodeView) – Thevoltmeter/multimeterhandle returned bySimulator.create()and connected viaconnect(recorder, pop).recordable (
str, optional) – Recordable name (NEST vocabulary, e.g.'V_m','g_ex'). Default is'V_m'.
- Returns:
(n_steps, n_recorded)trace in the model state’s natural unit.- Return type:
brainunit.Quantity- Raises:
KeyError – If
recordablewas not recorded by this recorder.
- weight_trace(proj)[source]#
Per-step weight trajectory
(n_steps, n_edges)for a recorded proj.- Parameters:
proj (
EventPlasticProj) – The plastic-projection handle returned byconnect(..., synapse=spec)and registered viaSimulator.record_weight()before the run.- Returns:
(n_steps, n_edges)weights in the synapse weight unit (pA), in CSR (sorted-by-pre) edge order — the same order the rule kernel sees.- Return type:
brainunit.Quantity- Raises:
KeyError – If this projection’s weight was not recorded (no
Simulator.record_weight()beforeSimulator.simulate()).