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.5.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.5-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: derotation-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 5f4aae63e342a2aae18863de10b86ac04db1a85897f12925fb713c83c5cd04d8
MD5 36415c4823aa90b5ee276c376c139de6
BLAKE2b-256 093b6a4d00a8168d38e219561042c4ffd7c9f4c65e8bd8d185265891ecb05d72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: derotation-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a7cb8451a4636009c3bf9fd1bfa1843818e129ad0b6915faea60add8d2a2ccc5
MD5 28f97d4487d45767f017e51ea7421cd8
BLAKE2b-256 f0ded7e5aa775dbdd6cd85c2db08319ea89abc9d0d16f65d00b92cc68a867c9b

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