Skip to main content

Derotate multiphoton calcium imaging movies

Project description

Python Version PyPI Version License CI codecov Code style: Ruff pre-commit

Derotation

The derotation package offers a robust solution for reconstructing multiphoton movies of rotating samples acquired with a line scanning microscope.

On the left, the mean image of a 3-photon movie in which the sample was rotating. In the center, the mean image after derotation, and on the left the mean image of the derotated movie after suite2p registration. As you can see, already after derotation the cells are visible and have well defined shapes.

Quick Install

Install the latest stable release in a conda environment:

conda create -n derotation-env python=3.12
conda activate derotation-env
pip install derotation

[!Note] Read the documentation for more information, including examples and API reference.

Overview

To address certain neuroscience questions, it might be necessary to image the brain while the head of the animal rotates. In such a case, and even more when the frame rate is low, the acquired movies are distorted by the rotation. These distortions have a peculiar pattern due to the line scanning nature of the microscope, which can be corrected by the derotation package.

With derotation you can:

  • Recover calcium imaging movies by line-by-line derotation that can be fed into standard analysis pipelines such as suite2p
  • Estimate the center of rotation using Bayesian optimization
  • Validate improvements to the derotation algorithm and pipelines using synthetic data
  • Verify the quality of the derotation using debugging plotting tools
  • Batch-process multiple datasets with consistent configuration files

Data Source & Funding

Sample data used for examples and figures can be found on Gin.

All microscopy data has been acquired with a 3-photon microscope by Simon Weiler in the Margrie Lab as described by Cloves and Margrie.

This project was sponsored by the Margrie Lab in the Sainsbury Wellcome Centre for Neural Circuits and Behaviour at University College London.

References

Previous work on derotation of calcium imaging movies:

This package was inspired by previous MATLAB script on derotation.

Join the Development

Contributions to derotation are encouraged, whether to fix a bug, develop a new feature, or improve documentation. Get in touch through our Zulip chat.

Open an issue to report a bug or request a new feature.

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

derotation-0.1.6.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

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

derotation-0.1.6-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: derotation-0.1.6.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for derotation-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f0e6401d8c6665277091eefa9b7289796274a36a2180a52c9a7037b866c33bd7
MD5 abda7c3dfbfa21b02482b6c121d629d9
BLAKE2b-256 ccc27863b5be3455ca18f608b20b87633bc0cb7d6d1e83b9d5b6a71240ba2ae4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: derotation-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 45.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for derotation-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a6969361f34a6d0f8c23c27890f3c0682e4687f999943d944d5eda7ba8f5d30a
MD5 b7b15b2297934a8c26a8eaf548400ac2
BLAKE2b-256 ebcb0ec5f79d53c4c275cd11c702a095422895518ed6f6fa3790b3365127a9d7

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