技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
recording【数据与研究】Record Brian2 2.9.0 spikes, state variables, custom events, rates, subsets, and monitor data with explicit timing, memory, and export choices.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route after the model and its inputs/events exist. It owns monitor selection, recording semantics, timing of observations, monitor data access, subsets, rates, and export. It does not own model equations or the run lifecycle.
EventClock, endpoint
sampling, and rate methods.record=True, recording many variables, or keeping a long trace.python scripts/monitor_smoke.py --help, then
python scripts/monitor_smoke.py in an installed Brian2 2.9.0 environment.SpikeMonitor(source, variables=None, record=True, when=None, order=None)
records spike indices/times and per-source-neuron counts. Set record=False
when only counts are needed.EventMonitor(source, event, variables=None, record=True, when=None, order=None) records a named event declared by the source. It is the route
for custom events; SpikeMonitor is the spike-event specialization.StateMonitor(source, variables, record, dt=None, clock=None, when="start") records selected state variables as time-by-index arrays.
record=True means every source index and may consume substantial memory.PopulationRateMonitor(source) records the instantaneous population rate at
the source clock resolution. Use binned_rate or smooth_rate after the
run for derived rates.Network when monitors are created, activated, or removed between
runs; a monitor cannot recover events or state values from before it was
attached.StateMonitor, record=[...] and a slower dt
are usually safer than record=True at the source clock.when, order, and dt deliberately when a value can change from
integration, thresholding, reset, event handlers, or same-step code. The
default StateMonitor slot is start; spike/event monitors follow the
emitted event; PopulationRateMonitor records at end. For a final
post-run state, initialize the monitor with a run and then use
record_single_timestep() rather than shifting the time array.get_states(...) (copies) rather than
internal storage. Preserve units and the recording metadata; use
units=False only when the consumer explicitly requires unitless arrays.run, clocks, schedules, active, store/restore,
devices, and execution lifecycle route to simulation-and-recording.A recording is usable only when the monitor was attached to the intended
source, the first and last times are understood, the array shape matches the
selected indices, and units or the unitless conversion are explicit. Treat
record=False, an empty record selection, incomplete final bins, a monitor
attached mid-run, and standalone result deletion as intentional choices that
must be documented in the handoff or experiment output.