Derotation#

A Python package for reconstructing movies of rotating samples acquired with a line scanning microscope.

_images/mean_images_with_incremental.png

On the left, the mean image of a 3-photon movie in which the head of the animal 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.#

๐Ÿ“˜ User guide

Installation, configuration, supported formats, and key concepts.

User Guide
๐Ÿงช Examples

A gallery of real and synthetic examples using derotation.

Examples

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.