Skip to main content

Light Beads Microscopy 2P Calcium Imaging Pipeline.

Project description

LBM-CaImAn-Python

Installation | Notebooks

Python implementation of the Light Beads Microscopy (LBM) computational pipeline.

For the MATLAB implementation, see here

Installation

Installation requires an active conda installation.

Note: Sometimes conda or mamba will get stuck at a step, such as creating an environment or installing a package. Pressing Enter on your keyboard can sometimes help it continue when it pauses.

  1. Install mamba into your base environment:
  • :exclamation: This step may take 10 minutes and display several messages like "Solving environment: failed with..." but it should eventually install mamba.
conda activate base 
conda install -c conda-forge mamba
  1. Create a new environment and install mesmerize-core
  • Here, we use the -n flag to name the environment lbm , but you can name it whatever you'd like.
  • This step will install Python, mesmerize-core, CaImAn, and all required dependencies for those packages.
conda create -n lbm -c conda-forge mesmerize-core

If you already have CaImAn installed:

conda install -n name-of-env-with-caiman mesmerize-core

Activate the environment and install caimanmanager:

  • if you used a name other than lbm, be sure to match the name you use here.
conda activate lbm
caimanmanager install
  1. pip install lbm_caiman_python

Install the minimal lbm_caiman_python:

pip install lbm_caiman_python

# or, to get fastplotlib + jupyter lab
pip install "lbm_caiman_python[all]"

The example notebooks include visualizations using fastplotlib, install with:

For Developers

To get the newest version of this package:

git clone https://github.com/MillerBrainObservatory/LBM-CaImAn-Python.git

cd LBM-CaImAn-Python

pip install ".[all]"

Troubleshooting

Conda Issues

if conda is behaving slow, clean the conda installation and update conda-forge:

conda clean -a

conda update -c conda-forge --all

Recommended Conda Distribution

The recommended conda installer is miniforge.

This is a community-driven conda/mamba installer with pre-configured packages specific to conda-forge.

This helps avoid conda-channel conflicts and avoids any issues with the Anaconda TOS.

You can install the installer from a unix command line:

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

bash Miniforge3-$(uname)-$(uname -m).sh

Or download the installer for your operating system here.

Graphics Driver Issues

If you opted into installing fastplotlib and receive errors about graphics drivers, see the fastplotlib driver documentation.

Pipeline Steps:

  1. Motion Correction
    • Template creation
    • Rigid registration
    • Piecewise-rigid registration
  2. Segmentation
    • Iterative CNMF segmentation
    • Deconvolution
    • Refinement
  3. Collation
    • Lateral offset correction (between z-planes)
    • Collate images and metadata into a single volume

Requirements

  • caiman
  • mesmerize-core
  • numpy
  • scipy

Optional:

  • fastplotlib
  • mesmerize-viz

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

lbm_caiman_python-1.0.0.tar.gz (14.3 MB view details)

Uploaded Source

Built Distribution

lbm_caiman_python-1.0.0-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file lbm_caiman_python-1.0.0.tar.gz.

File metadata

  • Download URL: lbm_caiman_python-1.0.0.tar.gz
  • Upload date:
  • Size: 14.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for lbm_caiman_python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 20f5918ab7ca8c01fec4c3cc46de60e5ee01eca40df92c66524ab051a4cf4c59
MD5 997b515bc3c8877bc496a94a243308b6
BLAKE2b-256 aa87c2d8f052e2ad0ea8d186e2cc5b2e34da159ae83339d0ef4d975ddd1d21d4

See more details on using hashes here.

File details

Details for the file lbm_caiman_python-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lbm_caiman_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90cc646d128147bc7b49bed04d2792aa0e25902f558f004ffa85c4f3403b2923
MD5 7bd0ec3d2e9780bdf3bef918569c088a
BLAKE2b-256 b26173c2dc709ea6e180dc5862b95e9c1c55fd516aca1fe552dec8a2dfa62374

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page