Interactive phase plane widget for neural mass models, usable in Jupyter notebooks, VS Code, and static HTML exports.
📖 Full Documentation & Live Demos
- Interactive phase plane visualization with nullclines, vector field, fixed points, and trajectories
- Click-to-set initial conditions directly on the phase plane
- Real-time time series display alongside the phase plane
- Parameter sweeps with bifurcation diagram visualization
- Regime detection: automatically classifies dynamics as fixed point, limit cycle, or other
- Multiple neural mass models: Wilson-Cowan (E-I populations), FitzHugh-Nagumo (excitable neuron), MPR (QIF firing-rate)
# Using uv
uv venv
uv pip install -e .
# Or using pip
pip install -e .For development with Jupyter:
uv pip install -e ".[dev]"from phase_plane_widget import PhasePlaneWidget
widget = PhasePlaneWidget()
widget# Run a sweep over the external current I
widget.run_sweep("I", [-1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0])Works directly in VS Code's Jupyter extension — no extra configuration needed.
from ipywidgets.embed import embed_minimal_html
embed_minimal_html("export.html", views=[widget], title="Phase Plane Widget")| Model | Description | Parameters |
|---|---|---|
| Wilson-Cowan | Excitatory-inhibitory population dynamics | aee, aei, aie, aii, Pe, Pi, ke, ki, thetae, thetai |
| FitzHugh-Nagumo | Excitable neuron, simplified Hodgkin-Huxley | a, b, epsilon, I |
- Client-side computation: All ODE solving, fixed-point finding, and rendering runs in JavaScript — no server round-trips
- Dual-mode architecture: Works as a Jupyter widget and as a standalone self-contained HTML file
- anywidget: Jupyter/VS Code bridge;
to_standalone_html()for blogs, docs, and courses
See the full documentation site for:
- Live interactive demos (embedded standalone widgets)
- Deployment guide — Jupyter, VS Code, standalone HTML, mkdocs
- Model reference — equations, parameters, dynamics
- API reference — auto-generated from docstrings