Skip to content

Commit 15e2bdd

Browse files
authored
feat: modular sync architecture with accorr numba/torch optimizations (#250)
feat: modular sync architecture with accorr numba/torch optimizations
2 parents fdb771d + 5d28cb9 commit 15e2bdd

31 files changed

Lines changed: 2896 additions & 3764 deletions

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@
33
## [Unreleased]
44

55
### Added
6-
- New connectivity metric: Adjusted Circular Correlation (`accorr`) in `analyses.py`
7-
- Hybrid implementation with vectorized numerator and exact denominator computation
8-
- Progress bar support via `tqdm` for monitoring computation progress
9-
- Available through `pair_connectivity()` and `compute_sync()` functions with `mode='accorr'`
6+
- **New `hypyp.sync` module**: Modular architecture for connectivity metrics
7+
- Extracted 9 connectivity metrics into separate classes: `PLV`, `CCorr`, `ACorr`, `Coh`, `ImCoh`, `PLI`, `WPLI`, `EnvCorr`, `PowCorr`
8+
- `BaseMetric` abstract class for uniform interface across all metrics
9+
- `get_metric(mode, backend)` function for easy metric instantiation
10+
- Backend support infrastructure (numpy default, with future support for numba/torch)
11+
- Helper functions: `multiply_conjugate`, `multiply_conjugate_time`, `multiply_product`
12+
13+
### Changed
14+
- **BREAKING**: `accorr` metric now returns raw connectivity values with shape `(n_epoch, n_freq, 2*n_ch, 2*n_ch)` like all other metrics. The `swapaxes` and `epochs_average` operations are now handled by `compute_sync()` instead of being applied inside the metric.
15+
- Refactored `compute_sync()` to use the new `hypyp.sync` module internally
16+
17+
### Deprecated
18+
- `_multiply_conjugate()` in analyses.py - use `hypyp.sync.multiply_conjugate` instead (will be removed in 1.0.0)
19+
- `_multiply_conjugate_time()` in analyses.py - use `hypyp.sync.multiply_conjugate_time` instead (will be removed in 1.0.0)
20+
- `_multiply_product()` in analyses.py - use `hypyp.sync.multiply_product` instead (will be removed in 1.0.0)
21+
- `_accorr_hybrid()` in analyses.py - use `hypyp.sync.ACorr` instead (will be removed in 1.0.0)
1022

1123
## [0.5.0b13] - 2025-09-18
1224

CONTRIBUTORS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributors
2+
3+
HyPyP is built by a community of researchers and engineers. Thank you to everyone
4+
who has contributed code, ideas, feedback, and bug reports.
5+
6+
## Original Authors
7+
8+
- Florence BRUN
9+
- Anaël AYROLLES
10+
- Phoebe CHEN
11+
- Amir DJALOVSKI
12+
- Yann BEAUXIS
13+
- Suzanne DIKKER
14+
- Guillaume DUMAS
15+
16+
## Contributors
17+
18+
- Ryssa MOFFAT
19+
- Marine Gautier MARTINS
20+
- Rémy RAMADOUR
21+
- Patrice FORTIN
22+
- Ghazaleh RANJBARAN
23+
- Quentin MOREAU
24+
- Caitriona DOUGLAS
25+
- Franck PORTEOUS
26+
- Jonas MAGO
27+
- Juan C. AVENDANO
28+
- Julie BONNAIRE
29+
- Martín A. MIGUEL ([@m2march](https://github.com/m2march)) —
30+
Implemented ACCorr hardware acceleration (numba JIT and PyTorch GPU/MPS backends)
31+
and benchmarking infrastructure as part of BrainHack Montréal 2026 (PR #246, #250).
32+
33+
## How to Contribute
34+
35+
We welcome contributions of all kinds — bug fixes, new features, documentation
36+
improvements, and tutorials. See our
37+
[GitHub Issues](https://github.com/ppsp-team/HyPyP/issues) to get started.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The **Hy**perscanning **Py**thon **P**ipeline
1414

1515
## Contributors
1616

17-
Original authors: Florence BRUN, Anaël AYROLLES, Phoebe CHEN, Amir DJALOVSKI, Yann BEAUXIS, Suzanne DIKKER, Guillaume DUMAS
18-
New contributors: Ryssa MOFFAT, Marine Gautier MARTINS, Rémy RAMADOUR, Patrice FORTIN, Ghazaleh RANJBARAN, Quentin MOREAU, Caitriona DOUGLAS, Franck PORTEOUS, Jonas MAGO, Juan C. AVENDANO, Julie BONNAIRE
17+
Original authors: Florence BRUN, Anaël AYROLLES, Phoebe CHEN, Amir DJALOVSKI, Yann BEAUXIS, Suzanne DIKKER, Guillaume DUMAS
18+
New contributors: Ryssa MOFFAT, Marine Gautier MARTINS, Rémy RAMADOUR, Patrice FORTIN, Ghazaleh RANJBARAN, Quentin MOREAU, Caitriona DOUGLAS, Franck PORTEOUS, Jonas MAGO, Juan C. AVENDANO, Julie BONNAIRE, Martín A. MIGUEL, [@m2march](https://github.com/m2march) (ACCorr GPU/numba optimizations, BrainHack Montréal 2026)
1919

2020
## Installation
2121

0 commit comments

Comments
 (0)