Skip to main content

Mesmerize visualization package using fastplotlib

Project description

mesmerize-viz

This is currently in beta and documentation is a WIP. Motion Correction and CNMF visualizations should just work. CNMFE will work without "rcb" and "residuals" image_data_options.

:exclamation: Harware requirements The large CNMF visualizations with contours etc. usually require either a dedicated GPU or integrated GPU with access to at least 1GB of VRAM.

https://www.youtube.com/watch?v=GWvaEeqA1hw

Installation

Assuming you have mesmerize-core installed:

git clone https://github.com/kushalkolar/mesmerize-viz.git
cd mesmerize-viz
pip install -e .

If you want to use %gui qt you will need pyqt6:

pip install PyQt6

Usage

Explore parameter variants

Click on different rows to view the results of different runs of motion correction, CNMF or CNMFE.

https://github.com/kushalkolar/mesmerize-viz/assets/9403332/41175c80-7bdf-4210-96d4-4913ae46568e

Explore components

Explore components using the heatmap selector, or the component index slider. Auto-zoom into components if desired using the checkbox, set the zoom scale using the slider.

https://github.com/kushalkolar/mesmerize-viz/assets/9403332/c6d8cb7d-f99c-4771-8562-b890c9a18ae2

Visualize component evaluation metrics

View the evaluation metrics by setting the contour colors based on the metrics. Select to show "all", or only "accepted" or only "rejected" components based on the current evaluation criteria. You can also choose to make the accepted or rejected components semi-transparent instead of entirely opague or invisible using the alpha slider.

Colormaps used:

accepted/rejected: Set1, accepted - blue, rejected - red

snr, r_values, and cnn_preds: spring: low value: pink, high value: yellow

https://github.com/kushalkolar/mesmerize-viz/assets/9403332/b2780212-c941-4306-b7de-45bfa49ab9cd

Interactive component evaluation using metrics and manully accept or reject components

Interactively change the metric thresholds for the sliders. See the caiman docs for info on the evaluation params: https://caiman.readthedocs.io/en/latest/Getting_Started.html#component-evaluation

After setting the metric thresholds, you can manually accept or reject components by clicking on them and pressing "a" (accept) or "r" (reject) keys on your keyboard.

When you are happy with component evaluation, click "Save eval to disk". This overwrites the existing hdf5 file with the state of the hdf5 file as shown in the visualization, i.e. estimates.idx_components and estimates.edx_components_bad gets set with respect to the visualization.

https://github.com/kushalkolar/mesmerize-viz/assets/9403332/0e7b0b41-9360-456c-9c91-6bd74fedb11d

Voila app

WIP

Explore components**

Install voila:

pip install voila

Use as a voila app (as shown in the demo video).

cd mesmerize-viz
voila examples/app.ipynb --enable_nbextensions=True

Note that the voila app is a WIP prototype

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

mesmerize_viz-0.1.0.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

mesmerize_viz-0.1.0-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file mesmerize_viz-0.1.0.tar.gz.

File metadata

  • Download URL: mesmerize_viz-0.1.0.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for mesmerize_viz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2ed2fe13ab2f24793e9641e8276b1e43179bb67574a46a648efdaab37ce551c
MD5 3152944fba2577d8652340028b7b4f32
BLAKE2b-256 36c48d915541afc141a54a7b558bc5ba22a83eec8574ba6314e3136bac323ee7

See more details on using hashes here.

File details

Details for the file mesmerize_viz-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mesmerize_viz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bd389fa8391e5384590c86acb6865b09482d6b16300b6dde4e69c05047fe5fe
MD5 35eef82a032a7350519bf5f0e9630e49
BLAKE2b-256 803e16e9a722ee6bc0f9cf05ec024dfe59d17450d3d596c8fc391f0dad67a157

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