Skip to main content

PyTorch tools for voltage imaging movie processing and signal extraction.

Project description

torch-volpy

PyTorch tools for voltage imaging movie processing and signal extraction.

The package currently provides:

  • HDF5-backed movie I/O through Movie
  • Motion template building, translation estimation, and motion correction
  • Gaussian high-pass filtering
  • Summary image generation
  • Cellpose-based segmentation support
  • ALI and SpikePursuit signal extraction

Installation

pip install torch-volpy

Install the GUI extra for interactive movie viewing and ROI trace extraction:

pip install "torch-volpy[gui]"
torch-volpy-gui

For local development from this repository:

python -m pip install -e ".[gui,dev]"

Basic Imports

from torch_volpy.movie import Movie
from torch_volpy.motion import MotionCorrect, Template, Translation
from torch_volpy.filter import Filter
from torch_volpy.model import Summary
from torch_volpy.extraction import ALI, Spikepursuit
from torch_volpy.model import Cellpose

GUI

The PyQt GUI opens HDF5 movies (.h5/.hdf5, dataset defaults to movie) and TIFF stacks (.tif/.tiff). It provides frame playback, Cellpose ROI generation from a summary image, loading existing ROI masks (.tif, .npy, .npz, .h5/.hdf5), click-to-select ROI picking, and trace extraction with:

  • Spikepursuit as the default extraction method
  • ALI for cropped ROI activity localization
  • a simple mean-ROI trace for quick inspection

The Cellpose ROI button follows the test workflow in _test/test_cellpose.py: build Summary(movie), stack [mean, mean, corr], and pass that image to Cellpose.build(...). The resulting labeled mask is shown as an overlay; click an ROI in Select mode to choose which label is used for trace extraction.

When opening a TIFF stack, the GUI first converts it to a sibling HDF5 file, runs motion correction into corrected_<name>.h5, and then displays the corrected HDF5 movie. A progress bar in the Movie panel reports conversion and motion-correction phases.

App Screenshot

App Screenshot

How To Build

python -m build

The build artifacts are written to dist/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_volpy-0.1.0.tar.gz (122.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torch_volpy-0.1.0-py3-none-any.whl (126.8 kB view details)

Uploaded Python 3

File details

Details for the file torch_volpy-0.1.0.tar.gz.

File metadata

  • Download URL: torch_volpy-0.1.0.tar.gz
  • Upload date:
  • Size: 122.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for torch_volpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f110bd356a6b2b530301f4ffed634292e94d239960d919feed4e12fc9554739
MD5 90b662edea18a4abb5862490f9b1802f
BLAKE2b-256 85727c7176db93bc7699da792fcb98c85bc0e25ce8d0d83cbbe7690c9f44e602

See more details on using hashes here.

File details

Details for the file torch_volpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: torch_volpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 126.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for torch_volpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54eccb0a117929b94a4f2deb688842b8e83a3c955e0f6e457af06b61f166f425
MD5 9c3f554b581c5a43a33fd5f71e9a95f4
BLAKE2b-256 6b70d066a3801323df28b725cfb1a89e0bcacdbd3209fde218fe8b0fb8e5ab39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page