Skip to content

Conversation

@shixnya
Copy link
Collaborator

@shixnya shixnya commented Jun 18, 2025

A new PopNet option based on Stabilized Supralinear Network.

Simulating 4 population will be 0.2ms per simulated second.
A network simulation example as well as parameter optimization tutorial notebook is provided.

@shixnya shixnya requested review from Copilot and kaeldai June 18, 2025 19:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for a Stabilized Supralinear Network (SSN) option in PopNet by introducing new simulation modules, integrating SSN into the PopNet API, and updating related utilities.

  • Introduce SimulatorMod base class and SSN modules (RatesRecorderMod, InitStatesMod, ExternalRatesMod) for recording rates, initializing states, and applying external inputs.
  • Register default SSN activation functions and expose them via the package.
  • Integrate SSN target into PopNetwork/PopSimulator, extend DIPDE compatibility, update core SONATA reader and node sets, and enhance the plot_rates analyzer to handle CSV/HDF5.

Reviewed Changes

Copilot reviewed 15 out of 74 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
bmtk/simulator/popnet/ssn/modules/sim_module.py Adds SimulatorMod base class for lifecycle hooks in SSN simulations
bmtk/simulator/popnet/ssn/modules/rates_recorder.py Implements RatesRecorderMod for exporting firing rates to CSV or HDF5
bmtk/simulator/popnet/ssn/modules/initial_states.py Implements InitStatesMod with multiple initialization backends (CSV, function)
bmtk/simulator/popnet/ssn/modules/external_inputs.py Implements ExternalRatesMod for loading external input streams
bmtk/simulator/popnet/ssn/default_setters/activation_functions.py Registers a default ReLU (relu2) activation function via add_activation_function
bmtk/simulator/popnet/ssn/init.py Exports SSN entry points (PopNetwork, PopSimulator, function caches)
bmtk/simulator/popnet/dipde/popsimulator.py Adds from_json helper and imports SimulationConfig for DIPDE simulator
bmtk/simulator/popnet/dipde/popnetwork.py Adds target_simulator property and fixes import paths for DIPDE
bmtk/simulator/core/sonata_reader/node_adaptor.py Extends model_type handling to include 'rate_population'
bmtk/simulator/core/node_sets.py Implements __len__ for NodeSet
bmtk/analyzer/firing_rates.py Adds a new plot_rates function supporting CSV and HDF5 rate files
Comments suppressed due to low confidence (2)

bmtk/simulator/popnet/ssn/modules/initial_states.py:103

  • [nitpick] The exception message 'AAAA' is not descriptive. Provide a clear message explaining the unsupported distribution type.
                raise Exception("AAAA")

bmtk/simulator/popnet/ssn/modules/initial_states.py:29

  • self.__name__ is undefined on instances; use self.__class__.__name__ (or similar) to reference the class name in the error message.
            raise ValueError(f'{self.__name__}: Error in {self._name} input module, no valid module [options: csv, constant, random, function]')

shixnya and others added 4 commits June 23, 2025 16:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kaeldai kaeldai merged commit 22f53ee into develop Jul 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants