SkillAgentSearch skills...

Somata

State-space Oscillator Modeling And Time-series Analysis (SOMATA) is a Python library for state-space neural signal processing algorithms developed in the Purdon Lab.

Install / Use

npx skills add mh105/somata

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

somata

Github: https://github.com/mh105/somata

State-space Oscillator Modeling And Time-series Analysis (SOMATA) is a Python library for state-space neural signal processing algorithms developed in the Purdon Lab. Basic state-space models are introduced as class objects for flexible manipulations. Classical exact and approximate inference algorithms are implemented and interfaced as class methods. Advanced neural oscillator modeling techniques are brought together to work synergistically.

Release install tests Version Last-Update License: BSD 3-Clause Clear DOI


Table of Contents


Requirements

somata is built on numpy arrays for computations. joblib is used for multithreading. Additional dependencies include scipy, matplotlib, cmdstanpy, and spectrum. The source localization module also requires pytorch and MNE-python.

Install

$ pip install somata

or

$ conda install somata -c pytorch -c conda-forge

conda-forge channel (recommended)

While pip install usually works, an alternative way to install somata is through the conda-forge channel, which utilizes continuous integration (CI) across OS platforms. This means that conda-forge packages are more compatible with each other compared to PyPI packages installed via pip by default. If pip install somata fails to resolve some dependencies, the conda-forge somata feedstock can be used to install somata. If you have not installed CmdStan on your OS before, it is easier to install from the conda-forge channel if you need to use the Phase Amplitude Coupling Estimation module. On Windows, it is also easier to use conda install due to a need to build spectrum during pip install that requires Microsoft Visual C++ 14.0 or greater.

torch requirement

If the torch dependency is not resolved correctly for your OS (such as installed the cpu-only version when GPU processing is needed), first install pytorch manually in a conda environment that you want to install somata in, and then rerun either of the above two lines to install somata. Please be aware of a common mixup that PyTorch is distributed as torch on PyPI but as pytorch on conda-forge. If using conda to install, Windows OS needs to download pytorch from the pytorch channel, as win-64 is not built on the conda-forge channel.

(For development only)

Some notes on package dependency requirements

When somata is installed into an existing conda environment, unmet dependencies are automatically searched, downloaded, and installed from the same repository of packages requested to provide the somata build distribution and its dependencies (from PyPI with pip install somata or from pytorch and conda-forge channels with conda install somata -c pytorch -c conda-forge).

The need for specifying dependencies arises in multiple ways for Python. There are non-negligible complexities due to the existence of different build backends as well as different Python dependency management and packaging tools such as pdm, poetry, pip, conda, etc. One modern standard is to use a declarative config pyproject.toml file for package

Related Skills

View on GitHub
GitHub Stars32
CategoryDevelopment
Updated1y ago
Forks17

Languages

Python

Security Score

60/100

Audited on Jul 29, 2025

No findings