You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update version to 2.7.1 and refactor Dynamics class: enhance input handling and add new properties
* Update version to 2.7.1 and refactor Dynamics class: enhance input handling and add new properties
* Add state version implementations for neuron and synapse models
This commit implements state versions of several neuron and synapse models
using the brainstate framework, following BrainPy v2.7+ architecture.
Neuron Models Added:
- LIF (Leaky Integrate-and-Fire) neurons with multiple variants:
* LIF: Basic LIF neuron with exponential synaptic input
* LifRef: LIF with refractory period
* ExpIF: Exponential Integrate-and-Fire
* ExpIFRef: ExpIF with refractory period
* AdExIF: Adaptive Exponential Integrate-and-Fire
* AdExIFRef: AdExIF with refractory period
* QuaIF: Quadratic Integrate-and-Fire
* QuaIFRef: QuaIF with refractory period
* AdQuaIF: Adaptive Quadratic Integrate-and-Fire
* AdQuaIFRef: AdQuaIF with refractory period
* GifRef: Generalized Integrate-and-Fire with refractory
- Izhikevich neuron model with variants:
* Izhikevich: Basic Izhikevich neuron
* IzhikevichRef: With refractory period
- Hodgkin-Huxley (HH) neuron model:
* HH: Classic Hodgkin-Huxley model with Na+ and K+ channels
Synapse Models Added:
- BioNMDA: Biological NMDA receptor with second-order kinetics
* Implements two-state cascade dynamics (x and g variables)
* Slower rise time compared to AMPA (biologically realistic)
* Comprehensive documentation with mathematical formulation
Testing:
- Comprehensive test suites added for all models
- AMPA and GABAa synapse tests added
- All tests passing with proper unit handling
Key Features:
- Uses brainstate ecosystem (HiddenState, ShortTermState, LongTermState)
- Proper unit support with brainunit
- Exponential Euler integration for numerical stability
- Batch processing support
- Consistent API design across all models
Files Modified:
- brainpy/state/_lif.py: Added LIF variants
- brainpy/state/_izhikevich.py: Added Izhikevich variants (new file)
- brainpy/state/_hh.py: Added HH model (new file)
- brainpy/state/_synapse.py: Added BioNMDA model
- brainpy/state/_synapse_test.py: Added comprehensive tests
- brainpy/state/_lif_test.py: Added LIF tests
- brainpy/state/__init__.py: Updated exports
- brainpy/dyn/neurons/lif.py: Minor documentation updates
* Add Examples sections to neuron classes in _lif.py
Added comprehensive Examples sections to 5 neuron classes that were
missing them:
- QuaIF: Quadratic Integrate-and-Fire neuron
- AdQuaIF: Adaptive Quadratic Integrate-and-Fire neuron
- AdQuaIFRef: AdQuaIF with refractory period
- Gif: Generalized Integrate-and-Fire neuron
- GifRef: Gif with refractory period
Each Examples section includes:
- Import statements for required modules
- Basic usage with parameter specifications
- State initialization examples
- Update and spike generation examples
- Network integration with brainstate.nn.Sequential
- Additional Notes highlighting key features
All 13 neuron classes in _lif.py now have complete documentation
with Examples sections following consistent format and style.
* Refactor module assignments to 'brainpy.state' for consistency across files
* Update import paths in _base.py: change references from brainstate to brainpy for consistency
* fix tests
* Update import paths in _inputs.py: change references from brainpy to brainpy.state for consistency
---------
Co-authored-by: Chaoming Wang <[email protected]>
Co-authored-by: Chaoming Wang <[email protected]>
0 commit comments