Skip to main content

https://www.mesoscopy.org


Build & Test PyPI - Version

Mesoscopy is an open-source package for the analysis of mesoscale calcium recordings. It handles the preprocessing of mesoscale recording files to extract ∆F responses, the anatomical registration of recordings to the Allen Brain atlas as well as analysis of recordings captured at rest or with behaviour.

Prerequisites

Mesoscopy works best with data acquired in the NWB format. Alternatively, recordings acquired as HDF5 files compatible with mesoscopy's raw data schema may be used.

Dual-channel recordings with an accompanying haemodynamic response channel (e.g. using both 470nm and 405nm excitation for GCaMP) will be automatically separated during preprocessing and yield a corrected ∆F signal.

An example acquisition script (designed for FLIR Grasshopper cameras) can be found here.

Installing mesoscopy

The recommended way to install mesoscopy is by using pipx (https://pypa.github.io/pipx/). pipx will create an isolated python environment from which mesoscopy will run, leaving the system python alone. This is the recommended way to install mesoscopy, as it will not interfere with any other python packages you may have installed on your system.

On Linux

  1. Install pipx.

    • On Ubuntu / Debian:

      sudo apt update
      sudo apt install pipx
      pipx ensurepath
      sudo pipx ensurepath
      
    • On Fedora:

      sudo dnf install pipx
      pipx ensurepath
      sudo pipx ensurepath
      
    • For other distributions, install pipx with pip:

      python3 -m pip install --user pipx
      python3 -m pipx ensurepath
      sudo pipx ensurepath
      
  2. Install mesoscopy.

    pipx install mesoscopy
    

On MacOS

  1. Install pipx with homebrew.

    brew install pipx
    pipx ensurepath
    sudo pipx ensurepath
    
  2. Install mesoscopy.

    pipx install mesoscopy
    

On Windows

With Windows, you have two choices. You can either use mesoscopy with the Windows Subsystem for Linux (WSL) and follow the instructions above for installing mesoscopy on Linux (recommended), or you can run mesoscopy directly on Windows via PowerShell. The choice is of course yours, but you should bear in mind that mesoscopy primarily targets Unix-like OSs (Linux & MacOS) at the moment, so while everything should work fine on Windows, your mileage may vary.

To install mesoscopy directly on Windows, first install pipx using Scoop:

scoop install pipx
pipx ensurepath

Then install mesoscopy via pipx:

pipx install mesoscopy

Usage

For detailed documentation on how to use mesoscopy, please refer to our documentation.

To see all available mesoscopy commands, run

mesoscopy --help

mesoscopy commands are self-documenting. Run mesoscopy <command> --help to get more information or see available sub-commands.

Upgrading

Use pipx to upgrade mesoscopy:

pipx upgrade mesoscopy

Contributing

Mesoscopy is currently closed to PRs, except bugfixes. Please open an issue if you wish to contribute.

Funders

logo

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mesoscopy-0.7.5.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

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

mesoscopy-0.7.5-py3-none-any.whl (72.5 kB view details)

Uploaded Python 3

File details

Details for the file mesoscopy-0.7.5.tar.gz.

File metadata

  • Download URL: mesoscopy-0.7.5.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mesoscopy-0.7.5.tar.gz
Algorithm Hash digest
SHA256 e9eca22b5694d77824e865ed99c249e7372a5d3e020432fc05079bcf0420d007
MD5 bc11fd3eda851b09e76e45ddb77b3736
BLAKE2b-256 5851a10ce6e67bf10830ec49f158cbdcea2b2bfc94a0f8270e7f98a1f331c1e2

See more details on using hashes here.

File details

Details for the file mesoscopy-0.7.5-py3-none-any.whl.

File metadata

  • Download URL: mesoscopy-0.7.5-py3-none-any.whl
  • Upload date:
  • Size: 72.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mesoscopy-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 59ac1fb0ff25335a33b93e15b62652df11a29c58ab3fb59fce2ab52a711fa80a
MD5 2b7a378110a5532dcc2239224ec979a6
BLAKE2b-256 2f02c9aa7091d2321422052b265f8169edc7e46b841e6fe016a24e010787ad5a

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 Sentry Error logging StatusPage Status page