Skip to main content

Two-photon imaging analysis tool with a napari interface.

Project description

twopy

Two-photon imaging analysis tool for the Clark Lab output format.

twopy napari interface

Getting Started

twopy lets you open two-photon recordings, draw ROIs, plot responses in real time, process and analyze them, and save them.

When you first load a recording, twopy converts it to a standardized HDF5 format. The converted format includes the aligned movie, mean image, stimulus tables, photodiode signals, and recording metadata. Analysis and the GUI both work from the converted files, so the original source files remain separate from twopy's outputs.

Install

Examples use micromamba, but any conda-compatible environment manager should work.

micromamba create -n twopy -c conda-forge python=3.13 pip -y
micromamba run -n twopy python -m pip install twopy

Verify the install:

micromamba run -n twopy python -c 'import twopy; print(twopy.__name__)'

For a source checkout, copy config.example.yml to config.yml and edit the paths for your computer. config.yml stays local and is not tracked by git.

Start

micromamba activate twopy
twopy

Open a source recording or converted recording directly:

twopy /path/to/source/recording
twopy /path/to/recording_data.h5

Basic GUI flow:

  1. Choose a recording.
  2. Draw or edit ROIs in the rois Labels layer.
  3. Update response plots from the current ROIs.
  4. Click Save ROIs + analysis when the plots look right.

When a source recording has not been converted yet, twopy converts it first. Converted data includes the aligned movie, mean image, stimulus tables, photodiode signals, and recording metadata.

Docs

Check

micromamba run -n twopy pre-commit run --all-files

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

twopy-0.1.6.tar.gz (265.0 kB view details)

Uploaded Source

Built Distribution

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

twopy-0.1.6-py3-none-any.whl (244.2 kB view details)

Uploaded Python 3

File details

Details for the file twopy-0.1.6.tar.gz.

File metadata

  • Download URL: twopy-0.1.6.tar.gz
  • Upload date:
  • Size: 265.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for twopy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ecfe5e9efcc16a5f33c5df36c1818d7a7da9944031ebe5f77c6f3388ef73ad2d
MD5 349ecfdd947d92efb309bbf0365ef62e
BLAKE2b-256 1f3096aec2bfa2d7f7c006f64d8d178067eabfb22ea640587ad005321564752a

See more details on using hashes here.

Provenance

The following attestation bundles were made for twopy-0.1.6.tar.gz:

Publisher: publish-to-pypi.yml on gumadeiras/twopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file twopy-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: twopy-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 244.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for twopy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4c420e2eaa2ae2eb93dccc7eb7aeb9af238bc05a92da5e520cc41e0ceae2d1cb
MD5 6ffe7ab4adc5ae112fbe7296833588c3
BLAKE2b-256 174fc23b771689e462fa81ecc7eebb712629769fbcc020f7837653c95c11b071

See more details on using hashes here.

Provenance

The following attestation bundles were made for twopy-0.1.6-py3-none-any.whl:

Publisher: publish-to-pypi.yml on gumadeiras/twopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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