Skip to content

v0.3.0

Choose a tag to compare

@shimoura shimoura released this 26 Oct 21:58
· 121 commits to main since this release
a52c34f

microcircuit-lab v0.3.0

The network files now hold every number the simulator gets, a second simulator (Brian2) runs the same configs, and runs are read back with one function.

New

  • Brian2 backend: backend: {name: brian2, options: {...}} in the simulation file, or --backend brian2. Runtime (Cython or numpy) and cpp_standalone. Same statistics as NEST on the example networks; full-scale pd14 is within 2% of the reference rates on both.
  • Project definitions for Brian2 in extensions/brian2/: neuron and synapse models (on_post, pathways, per-pathway delays), connection rules and weight/delay distributions by name with parameters. Receptor ports by name.
  • Connection rules one_to_one and all_to_all.
  • Record any neuron variable: recording.variables: {V_m: {interval: 1.0, sample_size: 5}, I_syn_ex: {...}}.
  • read_run(run_dir): spikes, recordings, node IDs, network and settings of a finished run, without the simulator. Plots use it too.
  • Scaling as an explicit step: scale_network + write_network write a scaled network folder; scaling.yaml records how. Builders take --n-scaling / --k-scaling. New example: pd14_downscaled, with its own analysis settings.
  • Background as its mean current: replace_background_by_mean_current (pd14: --background mean_current).
  • init --with-core copies only the installed simulators' backends (--backends to choose or add one).

Changed

  • Raster plot: defaults 6 in wide, dots 1.5, no legend; a label is joined to its band by a short line only when it had to move.
  • The package README is grouped by simulator (NEST, Brian2), with one section on the run folder; changing the core is in CONTRIBUTING.md.

Fixed

  • A network passed to Simulation straight from read_network or scale_network ran with K times too little background input. The backends now create each generator at rate × indegree.
  • overwrite: true empties recordings/, so the previous run's recordings are no longer read as the new run's.
  • Analyses refuse an end past t_sim; the power spectrum uses whole bins only.
  • Plots are skipped, with a message, when spikes were not recorded; --validate-reference no longer hides errors; --run-dir refuses the simulation flags.
  • Errors in network.yaml, scaling.yaml and other YAML files name the folder and the file.
  • Brian2 refuses fixed delays below half the time step, as NEST does.
  • Scaling warns about connections it drops by rounding.

Breaking changes

Old files fail with a message showing the new form.

Before Now
Python 3.11 Python 3.12 or newer
weight.unit: PSP / PSC / native, psp_conversion_aliases unit: pA / nS / mV; builders convert PSPs (builder_tools.psp_to_psc_iaf_psc_exp)
scaling.yaml with factors, scaled at run time scale_network writes a scaled folder; scaling.yaml is a record
background_mode: mean_current replace_background_by_mean_current in a builder
background_inputs.yaml, background_indegree in populations.yaml poisson_background.yaml, indegree in each entry
voltage_recording, voltage_interval, voltage_sample_size recording.variables
recording.variables.<var>.populations: [] refused: list at least one, or leave it out for all
--extension-modules, backend option extension_modules --nest-modules / nest_modules (NESTML modules), --extensions (Python definitions)
prepare_network, load_network read_network
Simulation.from_run_dir; plot functions take simulation read_run; plot functions take run
metadata.json first_gid first_node_id, last_node_id
humam: scaling compensates the background input only the recurrent input too, from the full-scale rates in reference.yaml; its I_e changed
toy_two_areas --clusters / --advanced with scaling refused

Run folders made with v0.2 can't be read by read_run; simulate them again.

Known issues

  • Brian2 compiles each connection without multapses on its own the first time it runs, so a network with many of them starts slowly (toy_two_areas_advanced: about 18 minutes the first time, then 26 s).