seudo
Python port (in progress) of SEUDO, a toolbox for removing false transients from calcium imaging source extraction. Original MATLAB implementation and paper: Gauthier & Charles, eLife 2021.
This package is being ported incrementally from the MATLAB codebase
(../code in the source repository). Currently implemented:
- The core SEUDO solver (
estimate_time_courses_with_seudo) — sparse regression separating each source's true activity from unmodeled ("blob") contamination, for a single frame at a time. - Transient detection and per-transient spatial profile computation
(
identify_transients,compute_transient_info). - Automatic true/false transient classification by profile correlation
(
auto_classify_transients). - A PyQt5 GUI (
seudo.gui.ClassifyTransientsWindow) for manually reviewing and classifying transients.
Not yet ported: the rwl1df/bpdndf dynamic SEUDO modes, the 'lbq'
auto-classification method, parameter search / Bayesian optimization, and
several of the original MATLAB GUIs (parameter review, transient detail
viewer).
Install
pip install seudo
This includes the PyQt5 classification GUI and h5py (for loading real
MATLAB v7.3 .mat files) as standard dependencies, since the GUI is a
core part of the workflow, not an add-on.
For local development, from this directory:
pip install -e .[dev]
pytest
Quick start
from seudo import Seudo
# movie: (Y, X, F) array; profiles: (Y, X, nCells) array
se = Seudo(movie, profiles, time_courses=time_courses)
se.compute_transient_info('default')
result = se.estimate_time_courses_with_seudo(sigma2=0.002, lambda_blob=10, blob_radius=3)
To open the manual classification GUI:
from PyQt5 import QtWidgets
from seudo.gui import ClassifyTransientsWindow
app = QtWidgets.QApplication([])
win = ClassifyTransientsWindow(se, 'default')
win.show()
app.exec_()
License
MIT, see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file seudo-0.0.1.tar.gz.
File metadata
- Download URL: seudo-0.0.1.tar.gz
- Upload date:
- Size: 104.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
584b8855e58b8c203a2363814337185e4a049825a60f7614e8627dc814c13e89
|
|
| MD5 |
f29c9915d12955eaaa680b4c2cc651a6
|
|
| BLAKE2b-256 |
545c832ebd3a52238a08cc299afbe8d00d982661abe67010c56ec0989208cb55
|