canns 0.15.1__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {canns-0.15.1 → canns-1.0.1}/.gitignore +1 -0
- {canns-0.15.1 → canns-1.0.1}/CHANGELOG.md +55 -2
- canns-1.0.1/CITATION.cff +139 -0
- canns-1.0.1/PKG-INFO +283 -0
- canns-1.0.1/README.md +232 -0
- canns-1.0.1/README_zh.md +231 -0
- {canns-0.15.1 → canns-1.0.1}/pyproject.toml +23 -4
- {canns-0.15.1 → canns-1.0.1}/src/canns/__init__.py +25 -6
- canns-1.0.1/src/canns/__main__.py +69 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/cohospace_scatter.py +0 -1
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/visualization/btn_plots.py +0 -2
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/theta_sweep_plots.py +1 -3
- canns-0.15.1/CITATION.cff +0 -43
- canns-0.15.1/PKG-INFO +0 -245
- canns-0.15.1/README.md +0 -194
- canns-0.15.1/README_zh.md +0 -193
- {canns-0.15.1 → canns-1.0.1}/LICENSE +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/_version.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/coho.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/cohomap.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/cohomap_vectors.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/cohospace.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/cohospace_phase_centers.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/config.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/decode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/embedding.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/fly_roi.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/fr.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/path.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/plotting.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/tda.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/asa/utils.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/core/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/core/btn.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/core/grid_cells.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/core/grid_modules_leiden.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/core/head_direction.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/core/spatial_analysis.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/io/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/io/matlab_loader.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/utils/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/utils/circular_stats.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/utils/correlation.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/utils/geometry.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/utils/image_processing.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/visualization/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/visualization/grid_plots.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/data/cell_classification/visualization/hd_plots.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/metrics/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/metrics/spatial_metrics.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/metrics/systematic_ratemap.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/metrics/utils.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/model_specific/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/model_specific/hopfield.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/slow_points/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/slow_points/checkpoint.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/slow_points/finder.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/slow_points/fixed_points.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/slow_points/visualization.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/animation.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/backend.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/config.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/jupyter_utils.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/rendering.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/core/writers.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/energy_plots.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/spatial_plots.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/spike_plots.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/analyzer/visualization/tuning_plots.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/data/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/data/datasets.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/data/loaders.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/basic/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/basic/_base.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/basic/cann.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/basic/grid_cell.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/basic/hierarchical_model.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/basic/theta_sweep_model.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/brain_inspired/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/brain_inspired/_base.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/brain_inspired/hopfield.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/brain_inspired/linear.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/brain_inspired/spiking.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/models/hybrid/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/__main__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/__main__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/app.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/runner.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/screens.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/state.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/styles.tcss +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa/widgets.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/__main__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/base.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/batch_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/cohomap_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/cohospace_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/decode_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/fr_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/frm_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/gridscore_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/pathcompare_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/analysis_modes/tda_mode.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/app.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/controllers/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/controllers/analysis_controller.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/controllers/preprocess_controller.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/core/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/core/cache.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/core/runner.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/core/state.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/core/worker.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/main_window.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/models/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/models/config.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/models/job.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/models/presets.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/resources/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/resources/dark.qss +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/resources/light.qss +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/resources/logo.ico +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/resources/logo.svg +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/resources/styles.qss +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/utils/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/utils/formatters.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/utils/io_adapters.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/utils/validators.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/help_content.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/pages/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/pages/analysis_page.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/pages/preprocess_page.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/panels/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/artifacts_tab.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/drop_zone.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/file_list.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/gridscore_tab.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/help_dialog.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/image_tab.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/image_viewer.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/log_box.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/pathcompare_tab.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/asa_gui/views/widgets/popup_combo.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/gallery/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/gallery/__main__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/gallery/app.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/gallery/runner.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/gallery/state.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/gallery/styles.tcss +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/pipeline/launcher.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/py.typed +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/task/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/task/_base.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/task/closed_loop_navigation.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/task/navigation_base.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/task/open_loop_navigation.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/task/tracking.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/_base.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/bcm.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/hebbian.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/oja.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/sanger.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/stdp.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/trainer/utils.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/typing/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/utils/__init__.py +0 -0
- {canns-0.15.1 → canns-1.0.1}/src/canns/utils/benchmark.py +0 -0
|
@@ -5,6 +5,56 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.1] - 2026-02-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- CLI module (`src/canns/__main__.py`) for command-line interface support
|
|
12
|
+
- Comprehensive test coverage for CLI, lazy imports, data loaders, and utilities
|
|
13
|
+
- Integration tests for pipeline launcher
|
|
14
|
+
- Unit tests for task base classes and benchmarking utilities
|
|
15
|
+
- 1D CANN smooth-tracking example in documentation
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Restructured test suite into `unit/` and `integration/` directories (PR #96)
|
|
19
|
+
- Optimized CI pipeline for faster test execution (PR #96)
|
|
20
|
+
- Relocated documentation images from `images/` to `docs/_static/`
|
|
21
|
+
- Updated status badge to "stable" and maintenance year to 2026
|
|
22
|
+
- Enhanced installation instructions with accelerator options (cuda12, cuda13, tpu, gui)
|
|
23
|
+
- Expanded architecture diagram caption with five-layer hierarchy description
|
|
24
|
+
- Normalized pip install examples by removing unnecessary quotes
|
|
25
|
+
- Updated documentation URL to https://routhleck.com/canns
|
|
26
|
+
- Added Zenodo DOI badge for v1.0.0 release
|
|
27
|
+
- Updated citation information with expanded author list and affiliations
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- Improved test organization and maintainability
|
|
31
|
+
- Updated all documentation image references to new paths
|
|
32
|
+
|
|
33
|
+
## [1.0.0] - 2026-02-02
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- Architecture diagram (`docs/_static/architecture.png`) explaining modular design principles
|
|
37
|
+
- Comprehensive analyzer visualization showcase (`docs/_static/analyzer-display.png`, 4.7MB)
|
|
38
|
+
- ASA GUI preview animation (`docs/_static/asa-gui.gif`, 898KB)
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- **Production Ready Milestone**: v1.0.0 marks API stability and production readiness
|
|
42
|
+
- Complete README restructure (both English and Chinese) with improved project overview
|
|
43
|
+
- Enhanced Quick Start example with better comments and complete workflow demonstration
|
|
44
|
+
- Updated status badge from "beta" to "stable" in README.md and README_zh.md
|
|
45
|
+
- Improved visual gallery presentation with richer analyzer capability showcase
|
|
46
|
+
- Reorganized README sections: Overview, Architecture, Core Features, Analyzer Visuals, Quick Start
|
|
47
|
+
|
|
48
|
+
## [0.15.1] - 2026-02-01
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
- Refactored ASA module: removed legacy aliases and consolidated utilities (PR #95)
|
|
52
|
+
- Replaced custom Gaussian filter with scipy public API
|
|
53
|
+
- Added comprehensive docstrings to key private functions
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Reduced PyPI package size by excluding unnecessary files
|
|
57
|
+
|
|
8
58
|
## [0.15.0] - 2026-01-31
|
|
9
59
|
|
|
10
60
|
### Added
|
|
@@ -210,7 +260,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
210
260
|
- Comprehensive plotting functions for ASA analysis types
|
|
211
261
|
- New example scripts: cohomap.py, cohospace.py, firing_field_map.py, path_compare.py, tda_vis.py
|
|
212
262
|
- Research paper draft (paper.md) with comprehensive bibliography (paper.bib)
|
|
213
|
-
- Architecture diagram (
|
|
263
|
+
- Architecture diagram (docs/_static/architecture.png)
|
|
214
264
|
- GitHub Actions workflow for draft PDF generation
|
|
215
265
|
- CLI entry point for ASA TUI: `python -m canns.pipeline.asa`
|
|
216
266
|
- Image preview and external viewer support in TUI
|
|
@@ -577,6 +627,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
577
627
|
- Basic structure template
|
|
578
628
|
- Core application structure
|
|
579
629
|
|
|
630
|
+
[1.0.1]: https://github.com/routhleck/canns/compare/v1.0.0...v1.0.1
|
|
631
|
+
[1.0.0]: https://github.com/routhleck/canns/compare/v0.15.1...v1.0.0
|
|
632
|
+
[0.15.1]: https://github.com/routhleck/canns/compare/v0.15.0...v0.15.1
|
|
580
633
|
[0.15.0]: https://github.com/routhleck/canns/compare/v0.14.3...v0.15.0
|
|
581
634
|
[0.14.3]: https://github.com/routhleck/canns/compare/v0.14.2...v0.14.3
|
|
582
635
|
[0.14.2]: https://github.com/routhleck/canns/compare/v0.14.1...v0.14.2
|
|
@@ -615,4 +668,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
615
668
|
[0.4.0]: https://github.com/routhleck/canns/compare/v0.3.0...v0.4.0
|
|
616
669
|
[0.3.0]: https://github.com/routhleck/canns/compare/v0.2.0...v0.3.0
|
|
617
670
|
[0.2.0]: https://github.com/routhleck/canns/compare/v0.1.0...v0.2.0
|
|
618
|
-
[0.1.0]: https://github.com/routhleck/canns/releases/tag/v0.1.0
|
|
671
|
+
[0.1.0]: https://github.com/routhleck/canns/releases/tag/v0.1.0
|
canns-1.0.1/CITATION.cff
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "CANNs: Continuous Attractor Neural Networks Toolkit"
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: "He"
|
|
7
|
+
given-names: "Sichao"
|
|
8
|
+
email: "sichaohe@outlook.com"
|
|
9
|
+
affiliation:
|
|
10
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
11
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
12
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
13
|
+
- "Center of Quantitative Biology, Peking University"
|
|
14
|
+
orcid: "https://orcid.org/0009-0009-4564-1753"
|
|
15
|
+
- family-names: "Tuerhong"
|
|
16
|
+
given-names: "Aiersi"
|
|
17
|
+
affiliation: "College of Mathematics and Statistics, Chongqing University"
|
|
18
|
+
orcid: "https://orcid.org/0009-0006-4603-4734"
|
|
19
|
+
- family-names: "She"
|
|
20
|
+
given-names: "Shangjun"
|
|
21
|
+
affiliation:
|
|
22
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
23
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
24
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
25
|
+
- "Center of Quantitative Biology, Peking University"
|
|
26
|
+
orcid: "https://orcid.org/0009-0008-4490-7612"
|
|
27
|
+
- family-names: "Chu"
|
|
28
|
+
given-names: "Tianhao"
|
|
29
|
+
affiliation:
|
|
30
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
31
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
32
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
33
|
+
- "Center of Quantitative Biology, Peking University"
|
|
34
|
+
orcid: "https://orcid.org/0000-0001-9910-9361"
|
|
35
|
+
- family-names: "Wu"
|
|
36
|
+
given-names: "Yuling"
|
|
37
|
+
affiliation:
|
|
38
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
39
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
40
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
41
|
+
- "Center of Quantitative Biology, Peking University"
|
|
42
|
+
orcid: "https://orcid.org/0009-0001-5303-5413"
|
|
43
|
+
- family-names: "Zuo"
|
|
44
|
+
given-names: "Junfeng"
|
|
45
|
+
affiliation:
|
|
46
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
47
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
48
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
49
|
+
- "Center of Quantitative Biology, Peking University"
|
|
50
|
+
- family-names: "Wu"
|
|
51
|
+
given-names: "Si"
|
|
52
|
+
affiliation:
|
|
53
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
54
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
55
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
56
|
+
- "Center of Quantitative Biology, Peking University"
|
|
57
|
+
orcid: "https://orcid.org/0000-0001-9650-6935"
|
|
58
|
+
repository-code: "https://github.com/Routhleck/canns"
|
|
59
|
+
url: "https://routhleck.com/canns"
|
|
60
|
+
abstract: "A research toolkit built on BrainPy and JAX that bundles model collections, task generators, analyzers, and the ASA pipeline (GUI/TUI) so researchers can run simulations and analyze results in a consistent workflow."
|
|
61
|
+
keywords:
|
|
62
|
+
- continuous attractor neural networks
|
|
63
|
+
- CANNs
|
|
64
|
+
- computational neuroscience
|
|
65
|
+
- spatial cognition
|
|
66
|
+
- neural dynamics
|
|
67
|
+
- JAX
|
|
68
|
+
- brain-inspired computing
|
|
69
|
+
license: Apache-2.0
|
|
70
|
+
version: "v1.0.0"
|
|
71
|
+
date-released: "2026-02-02"
|
|
72
|
+
identifiers:
|
|
73
|
+
- type: doi
|
|
74
|
+
value: "10.5281/zenodo.18453893"
|
|
75
|
+
description: "The versioned DOI for version v1.0.0"
|
|
76
|
+
- type: doi
|
|
77
|
+
value: "10.5281/zenodo.17412545"
|
|
78
|
+
description: "The concept DOI (always resolves to latest version)"
|
|
79
|
+
preferred-citation:
|
|
80
|
+
type: software
|
|
81
|
+
title: "CANNs: Continuous Attractor Neural Networks Toolkit"
|
|
82
|
+
authors:
|
|
83
|
+
- family-names: "He"
|
|
84
|
+
given-names: "Sichao"
|
|
85
|
+
email: "sichaohe@outlook.com"
|
|
86
|
+
affiliation:
|
|
87
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
88
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
89
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
90
|
+
- "Center of Quantitative Biology, Peking University"
|
|
91
|
+
orcid: "https://orcid.org/0009-0009-4564-1753"
|
|
92
|
+
- family-names: "Tuerhong"
|
|
93
|
+
given-names: "Aiersi"
|
|
94
|
+
affiliation: "College of Mathematics and Statistics, Chongqing University"
|
|
95
|
+
orcid: "https://orcid.org/0009-0006-4603-4734"
|
|
96
|
+
- family-names: "She"
|
|
97
|
+
given-names: "Shangjun"
|
|
98
|
+
affiliation:
|
|
99
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
100
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
101
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
102
|
+
- "Center of Quantitative Biology, Peking University"
|
|
103
|
+
orcid: "https://orcid.org/0009-0008-4490-7612"
|
|
104
|
+
- family-names: "Chu"
|
|
105
|
+
given-names: "Tianhao"
|
|
106
|
+
affiliation:
|
|
107
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
108
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
109
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
110
|
+
- "Center of Quantitative Biology, Peking University"
|
|
111
|
+
orcid: "https://orcid.org/0000-0001-9910-9361"
|
|
112
|
+
- family-names: "Wu"
|
|
113
|
+
given-names: "Yuling"
|
|
114
|
+
affiliation:
|
|
115
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
116
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
117
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
118
|
+
- "Center of Quantitative Biology, Peking University"
|
|
119
|
+
orcid: "https://orcid.org/0009-0001-5303-5413"
|
|
120
|
+
- family-names: "Zuo"
|
|
121
|
+
given-names: "Junfeng"
|
|
122
|
+
affiliation:
|
|
123
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
124
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
125
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
126
|
+
- "Center of Quantitative Biology, Peking University"
|
|
127
|
+
- family-names: "Wu"
|
|
128
|
+
given-names: "Si"
|
|
129
|
+
affiliation:
|
|
130
|
+
- "School of Psychological and Cognitive Sciences, Peking University"
|
|
131
|
+
- "Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University"
|
|
132
|
+
- "PKU-IDG/McGovern Institute for Brain Research, Peking University"
|
|
133
|
+
- "Center of Quantitative Biology, Peking University"
|
|
134
|
+
orcid: "https://orcid.org/0000-0001-9650-6935"
|
|
135
|
+
doi: "10.5281/zenodo.18453893"
|
|
136
|
+
url: "https://github.com/Routhleck/canns"
|
|
137
|
+
version: "v1.0.0"
|
|
138
|
+
year: 2026
|
|
139
|
+
month: 2
|
canns-1.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: canns
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: A Python Library for Continuous Attractor Neural Networks
|
|
5
|
+
Project-URL: Repository, https://github.com/routhleck/canns
|
|
6
|
+
Author-email: Sichao He <sichaohe@outlook.com>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Python: <4.0,>=3.11
|
|
19
|
+
Requires-Dist: brainpy[cpu]
|
|
20
|
+
Requires-Dist: canns-lib>=0.6.2
|
|
21
|
+
Requires-Dist: climage>=0.2.2
|
|
22
|
+
Requires-Dist: furo>=2025.7.19
|
|
23
|
+
Requires-Dist: h5py>=3.7
|
|
24
|
+
Requires-Dist: igraph>=1.0.0
|
|
25
|
+
Requires-Dist: imageio[ffmpeg]>=2.37.0
|
|
26
|
+
Requires-Dist: leidenalg>=0.11.0
|
|
27
|
+
Requires-Dist: matplotlib>=3.5
|
|
28
|
+
Requires-Dist: notebook>=7.4.4
|
|
29
|
+
Requires-Dist: numba>=0.56.0
|
|
30
|
+
Requires-Dist: numpy<2.3,>=1.24
|
|
31
|
+
Requires-Dist: scikit-image>=0.19
|
|
32
|
+
Requires-Dist: scipy>=1.9.0
|
|
33
|
+
Requires-Dist: seaborn>=0.13.2
|
|
34
|
+
Requires-Dist: textual>=7.3.0
|
|
35
|
+
Requires-Dist: tqdm
|
|
36
|
+
Provides-Extra: cpu
|
|
37
|
+
Requires-Dist: brainpy[cpu]; extra == 'cpu'
|
|
38
|
+
Provides-Extra: cuda12
|
|
39
|
+
Requires-Dist: brainpy[cuda12]; (platform_system == 'Linux') and extra == 'cuda12'
|
|
40
|
+
Provides-Extra: cuda13
|
|
41
|
+
Requires-Dist: brainpy[cuda13]; (platform_system == 'Linux') and extra == 'cuda13'
|
|
42
|
+
Provides-Extra: gui
|
|
43
|
+
Requires-Dist: imageio; extra == 'gui'
|
|
44
|
+
Requires-Dist: pillow; extra == 'gui'
|
|
45
|
+
Requires-Dist: pyside6>=6.6.0; extra == 'gui'
|
|
46
|
+
Requires-Dist: qtawesome; extra == 'gui'
|
|
47
|
+
Requires-Dist: requests>=2.31.0; extra == 'gui'
|
|
48
|
+
Provides-Extra: tpu
|
|
49
|
+
Requires-Dist: brainpy[tpu]; (platform_system == 'Linux') and extra == 'tpu'
|
|
50
|
+
Description-Content-Type: text/markdown
|
|
51
|
+
|
|
52
|
+
# CANNs: Continuous Attractor Neural Networks Toolkit
|
|
53
|
+
|
|
54
|
+
<div align="center">
|
|
55
|
+
<img src="images/logo.svg" alt="CANNs Logo" width="350">
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
[<img src="https://badges.ws/badge/status-stable-green" />](https://github.com/routhleck/canns)
|
|
59
|
+

|
|
60
|
+
[<img src="https://badges.ws/maintenance/yes/2026" />](https://github.com/routhleck/canns)
|
|
61
|
+
<picture><img src="https://badges.ws/github/release/routhleck/canns" /></picture>
|
|
62
|
+
<picture><img src="https://badges.ws/github/license/routhleck/canns" /></picture>
|
|
63
|
+
[](https://doi.org/10.5281/zenodo.18453893)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<picture><img src="https://badges.ws/github/stars/routhleck/canns?logo=github" /></picture>
|
|
67
|
+
[](https://pepy.tech/projects/canns)
|
|
68
|
+
[](https://deepwiki.com/Routhleck/canns)
|
|
69
|
+
[<img src="https://badges.ws/badge/Buy_Me_a_Coffee-ff813f?icon=buymeacoffee" />](https://buymeacoffee.com/forrestcai6)
|
|
70
|
+
|
|
71
|
+
> 中文说明请见 [README_zh.md](README_zh.md)
|
|
72
|
+
|
|
73
|
+
## Overview
|
|
74
|
+
|
|
75
|
+
CANNs (Continuous Attractor Neural Networks toolkit) is a research toolkit built on [BrainPy](https://github.com/brainpy/BrainPy) and [JAX](https://github.com/jax-ml/jax), with optional Rust-accelerated [`canns-lib`](https://github.com/Routhleck/canns-lib) for selected performance-critical routines (e.g., TDA/Ripser and task generation). It bundles model collections, task generators, analyzers, and the ASA pipeline (GUI/TUI) so researchers can run simulations and analyze results in a consistent workflow. The API separates models, tasks, analyzers, and trainers to keep experiments modular and extensible.
|
|
76
|
+
|
|
77
|
+
## Architecture
|
|
78
|
+
|
|
79
|
+
<p align="center">
|
|
80
|
+
<img src="docs/_static/architecture.png" alt="CANNs Architecture" width="900">
|
|
81
|
+
<br>
|
|
82
|
+
<span style="color: grey; font-size: 14px;">Layer hierarchy of the CANNs library showing five levels: Application (Pipeline orchestration), Functional (Task, Trainer, Analyzer, Utils modules), Core Models (CANN implementations), Foundation (BrainPy/JAX and Rust FFI backends), and Hardware (CPU/GPU/TPU support)</span>
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
The CANNs library follows a modular architecture guided by two core principles: **separation of concerns** and **extensibility through
|
|
86
|
+
base classes**. The design separates functional responsibilities into five independent modules:
|
|
87
|
+
1. **Models** (`canns.models`) define neural network dynamics;
|
|
88
|
+
2. **Tasks** (`canns.task`) generate experimental paradigms and input data;
|
|
89
|
+
3. **Analyzers** (`canns.analyzer`) provide visualization and analysis tools;
|
|
90
|
+
4. **Trainers** (`canns.trainer`) implement learning rules for brain-inspired models;
|
|
91
|
+
5. **Pipeline** (`canns.pipeline`) orchestrates complete workflows.
|
|
92
|
+
|
|
93
|
+
Each module focuses on a single responsibility—models don't generate input data, tasks don't analyze results, and analyzers don't modify
|
|
94
|
+
parameters. This separation ensures maintainability, testability, and extensibility. All major components inherit from abstract base classes
|
|
95
|
+
(`BasicModel`, `BrainInspiredModel`, `Trainer`) that define standard interfaces, enabling users to create custom implementations that
|
|
96
|
+
seamlessly integrate with the built-in ecosystem.
|
|
97
|
+
|
|
98
|
+
## Core Features
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
- **Model collections**: basic CANNs (1D/2D, SFA), hierarchical path integration, theta-sweep models, brain-inspired models (e.g., Amari-Hopfield, linear/spiking layers)
|
|
103
|
+
- **Task generators**: smooth tracking, population coding, template matching, open/closed-loop navigation
|
|
104
|
+
- **Analyzer suite**: energy landscapes, tuning curves, raster/firing-rate plots, TDA and decoding utilities, cell classification
|
|
105
|
+
- **ASA pipeline & GUI/TUI**: end-to-end workflow for preprocessing, TDA, decoding, and result visualization (e.g., CohoMap/CohoSpace/PathCompare/FR/FRM/GridScore)
|
|
106
|
+
- **Training & extensibility**: HebbianTrainer plus base classes for consistent extension
|
|
107
|
+
- **Optional acceleration**: `canns-lib` for selected performance-critical routines
|
|
108
|
+
|
|
109
|
+
## Analyzer Visuals
|
|
110
|
+
|
|
111
|
+
<p align="center">
|
|
112
|
+
<img src="docs/_static/figure2_full.png" alt="Model Analysis Overview" width="900">
|
|
113
|
+
<br>
|
|
114
|
+
<span style="color: grey; font-size: 14px;">Overview of Neural Dynamics Models. Comparison of three basic models: (A) 1D CANN, (B) 2D CANN, and (C) Grid Cell Network</span>
|
|
115
|
+
</p>
|
|
116
|
+
|
|
117
|
+
<p align="center">
|
|
118
|
+
<img src="docs/_static/analyzer-display.png" alt="Analyzer Display" width="900">
|
|
119
|
+
<br>
|
|
120
|
+
<span style="color: grey; font-size: 14px;">Rich Analyzer Visualization Results</span>
|
|
121
|
+
</p>
|
|
122
|
+
<p align="center">
|
|
123
|
+
<img src="docs/_static/asa-gui.gif" alt="ASA GUI Preview" width="720">
|
|
124
|
+
<br>
|
|
125
|
+
<span style="color: grey; font-size: 14px;">ASA GUI preview</span>
|
|
126
|
+
</p>
|
|
127
|
+
<p align="center">
|
|
128
|
+
<a href="https://youtu.be/OoEo5Qa9f7M">
|
|
129
|
+
<img src="https://img.youtube.com/vi/OoEo5Qa9f7M/hqdefault.jpg" alt="ASA GUI Demo (YouTube)" width="720">
|
|
130
|
+
</a>
|
|
131
|
+
<br>
|
|
132
|
+
<span style="color: grey; font-size: 14px;">ASA GUI demo video</span>
|
|
133
|
+
</p>
|
|
134
|
+
|
|
135
|
+
<div align="center">
|
|
136
|
+
<table>
|
|
137
|
+
<tr>
|
|
138
|
+
<td align="center" width="50%" valign="top">
|
|
139
|
+
<h4>Smooth Tracking 1D</h4>
|
|
140
|
+
<img src="docs/_static/smooth_tracking_1d.gif" alt="Smooth Tracking 1D" width="320">
|
|
141
|
+
<br><em>Activity bump following a moving stimulus</em>
|
|
142
|
+
</td>
|
|
143
|
+
<td align="center" width="50%" valign="top">
|
|
144
|
+
<h4>CANN2D Encoding</h4>
|
|
145
|
+
<img src="docs/_static/CANN2D_encoding.gif" alt="CANN2D Encoding" width="320">
|
|
146
|
+
<br><em>2D population encoding patterns over time</em>
|
|
147
|
+
</td>
|
|
148
|
+
</tr>
|
|
149
|
+
<tr>
|
|
150
|
+
<td colspan="2" align="center">
|
|
151
|
+
<h4>Theta Sweep Animation</h4>
|
|
152
|
+
<img src="docs/_static/theta_sweep_animation.gif" alt="Theta Sweep Animation" width="600">
|
|
153
|
+
<br><em>Theta-modulated sweep dynamics</em>
|
|
154
|
+
</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td align="center" width="50%" valign="top">
|
|
158
|
+
<h4>Bump Analysis</h4>
|
|
159
|
+
<img src="docs/_static/bump_analysis_demo.gif" alt="Bump Analysis Demo" width="320">
|
|
160
|
+
<br><em>Bump fitting and stability diagnostics</em>
|
|
161
|
+
</td>
|
|
162
|
+
<td align="center" width="50%" valign="top">
|
|
163
|
+
<h4>Torus Bump</h4>
|
|
164
|
+
<img src="docs/_static/torus_bump.gif" alt="Torus Bump" width="320">
|
|
165
|
+
<br><em>Bump dynamics projected onto a torus manifold</em>
|
|
166
|
+
</td>
|
|
167
|
+
</tr>
|
|
168
|
+
</table>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
## Quick Start
|
|
172
|
+
|
|
173
|
+
1D CANN smooth tracking (imports → simulation → visualization)
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
import brainpy.math as bm
|
|
177
|
+
from canns.analyzer.visualization import PlotConfigs, energy_landscape_1d_animation
|
|
178
|
+
from canns.models.basic import CANN1D
|
|
179
|
+
from canns.task.tracking import SmoothTracking1D
|
|
180
|
+
|
|
181
|
+
# simulation time step
|
|
182
|
+
bm.set_dt(0.1)
|
|
183
|
+
|
|
184
|
+
# build model
|
|
185
|
+
cann = CANN1D(num=512)
|
|
186
|
+
|
|
187
|
+
# build tracking task (Iext length = duration length + 1)
|
|
188
|
+
task = SmoothTracking1D(
|
|
189
|
+
cann_instance=cann,
|
|
190
|
+
Iext=(0.0, 0.5, 1.0, 1.5),
|
|
191
|
+
duration=(5.0, 5.0, 5.0),
|
|
192
|
+
time_step=bm.get_dt(),
|
|
193
|
+
)
|
|
194
|
+
task.get_data()
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
# one-step simulation callback
|
|
198
|
+
def step(t, stimulus):
|
|
199
|
+
cann(stimulus)
|
|
200
|
+
return cann.u.value, cann.inp.value
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
# run simulation loop
|
|
204
|
+
us, inputs = bm.for_loop(
|
|
205
|
+
step,
|
|
206
|
+
operands=(task.run_steps, task.data),
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# visualize with energy landscape animation
|
|
210
|
+
config = PlotConfigs.energy_landscape_1d_animation(
|
|
211
|
+
time_steps_per_second=int(1 / bm.get_dt()),
|
|
212
|
+
fps=20,
|
|
213
|
+
title="Smooth Tracking 1D",
|
|
214
|
+
xlabel="State",
|
|
215
|
+
ylabel="Activity",
|
|
216
|
+
show=True,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
energy_landscape_1d_animation(
|
|
220
|
+
data_sets={"u": (cann.x, us), "Iext": (cann.x, inputs)},
|
|
221
|
+
config=config,
|
|
222
|
+
)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Installation
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# CPU-only
|
|
229
|
+
pip install canns
|
|
230
|
+
|
|
231
|
+
# Optional accelerators (Linux)
|
|
232
|
+
pip install canns[cuda12]
|
|
233
|
+
pip install canns[cuda13]
|
|
234
|
+
pip install canns[tpu]
|
|
235
|
+
|
|
236
|
+
# GUI (ASA Pipeline)
|
|
237
|
+
pip install canns[gui]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Optional (uv):
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
uv pip install canns
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Docs & Examples
|
|
247
|
+
|
|
248
|
+
- Documentation and tutorials: <https://routhleck.com/canns/>
|
|
249
|
+
- Local scripts: `examples/`
|
|
250
|
+
- Sphinx docs and notebooks: `docs/`
|
|
251
|
+
- ASA GUI entry: `canns-gui`
|
|
252
|
+
|
|
253
|
+
## Citation
|
|
254
|
+
|
|
255
|
+
If you use CANNs in your research, please cite:
|
|
256
|
+
|
|
257
|
+
```bibtex
|
|
258
|
+
@software{he_2026_canns,
|
|
259
|
+
author = {He, Sichao and
|
|
260
|
+
Tuerhong, Aiersi and
|
|
261
|
+
She, Shangjun and
|
|
262
|
+
Chu, Tianhao and
|
|
263
|
+
Wu, Yuling and
|
|
264
|
+
Zuo, Junfeng and
|
|
265
|
+
Wu, Si},
|
|
266
|
+
title = {CANNs: Continuous Attractor Neural Networks Toolkit},
|
|
267
|
+
month = feb,
|
|
268
|
+
year = 2026,
|
|
269
|
+
publisher = {Zenodo},
|
|
270
|
+
version = {v1.0.0},
|
|
271
|
+
doi = {10.5281/zenodo.18453893},
|
|
272
|
+
url = {https://doi.org/10.5281/zenodo.18453893}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Plain text:**
|
|
277
|
+
> He, S., Tuerhong, A., She, S., Chu, T., Wu, Y., Zuo, J., & Wu, S. (2026). CANNs: Continuous Attractor Neural Networks Toolkit (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.18453893
|
|
278
|
+
|
|
279
|
+
## Contributing & License
|
|
280
|
+
|
|
281
|
+
Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
|
|
282
|
+
|
|
283
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|