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

[!Warning] 🏗️ The package is currently in early development and it requires rotation information coming from a step motor.

Data Source & Funding

All microscopy data presented here as an example has been acquired with a 3-photon microscope by Simon Weiler in the Margrie Lab.

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.3.tar.gz (42.4 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.3-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for derotation-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7cfe046f57d71a5a00d2e0d359adb1397d4656967c5eafee89810f5ef0582e9b
MD5 0fca4a92dc9d77229df59de8370b23a9
BLAKE2b-256 61ea4c4e6a5bdfc0e197ff368df316c21a54ab3b44de4758328c91962c5d64e5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for derotation-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5de05ecb6d830f5f2770ae76e9e322d56efcb6ba0abc6e16a9d90c47299bdd40
MD5 1460431c80ce326bf7bf684109f9dfe9
BLAKE2b-256 08521f15263b4cbc338ad94ca9c0c8f992dd1eb988d859f0d2005ebdd1b45b4c

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