Merged
Conversation
…ndling and add new properties
…ndling and add new properties
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
There was a problem hiding this comment.
Sorry @932179209, your pull request is larger than the review limit of 150000 diff characters
Contributor
|
🎉 Congratulations on opening your first pull request in BrainPy! Thank you for your contribution! A maintainer will review your changes soon. Please make sure:
We appreciate your effort in making BrainPy better. If you have any questions, feel free to ask in the comments. Welcome to the BrainPy community! 🌟 |
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.
chaoming0625
approved these changes
Oct 13, 2025
…c counterparts for clarity
… brainpy for consistency
…brainpy.state for consistency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.