← Projects

IEEG_Pipelines

Author and lead maintainer of the Cogan Lab's open-source iEEG/ECoG analysis toolkit — a PyPI package with CUDA kernels, Cython hot paths, and a parallel MATLAB API on its own CI.

  • Python
  • MATLAB
  • Cython
  • CUDA

The lab’s entire intracranial-EEG analysis stack, built and maintained from the ground up: BIDS-native loading, signal processing, statistics, decoding, and visualization, distributed on PyPI as pip install ieeg with a parallel MATLAB API kept alive on its own independent CI for the parts of the lab that hadn’t migrated yet. Full documentation lives at ieeg-pipelines.readthedocs.io.

Semi-transparent 3D render of a human brain with depth-electrode contacts shown as colored bead strings threading into the tissue and red surface-electrode spheres across the cortex.
3D electrode localization rendered with ieeg.viz — depth-electrode contacts (colored strings) and surface electrodes (red) plotted on a reconstructed cortical surface via the package's MNE-integrated plotting.

What’s in the package

The migration this replaced

The lab ran on MATLAB/Windows before this existed. Rather than a flag-day cutover, the package grew a parallel MATLAB API with its own CI so existing MATLAB-based analyses kept working while new work moved to Python/Linux — migrating the lab’s tooling without stopping the lab’s research in the process.

Built for the actual data volume

A standard iEEG array is 100–200 channels; the lab’s µECoG arrays run 1000+. That difference drove real engineering choices: memory-mapped arrays and sparse representations instead of loading everything into RAM, explicit precision/storage trade-offs, and a swappable array-API backend so the same code runs on CPU or GPU without a rewrite.

Engineering practices

Every push and pull request runs the real test suite before it merges: pytest across Windows/macOS/Ubuntu on Python 3.10–3.13 (parametrized fixtures, doctest-modules, pycodestyle), plus a separate MATLAB suite with JUnit test results and Cobertura coverage for the parts of the lab that hadn’t migrated yet — all tracked in Codecov, formatted with black. It ships through code review on pull requests, not direct pushes to main: 90+ merged PRs, with the co-maintainer I trained and other contributors’ changes reviewed the same way mine are. 1,243 of the repo’s 1,423 commits (across all branches, version-controlled in Git) are mine. Nine tagged PyPI releases since April 2024 (latest: 0.7.0) ship automatically off that same CI via GitHub’s trusted-publishing flow — a version tag is the whole release process, no manual upload. ReadTheDocs-built documentation (the docs theme this site’s palette is modeled on); MIT licensed and citable via citation.cff.