Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Install Guide

Kushal Kolar edited this page Apr 12, 2018 · 1 revision

At the moment the best way to use Mesmerize is to download the source and run the application within an Anaconda environment. There are plans to release a binary distributable in the future. A modified form of pyqtgraph is included as a sub-package of Mesmerize. It will not work with the standard pyqtgraph available on github or via pip. Mesmerize provides a front-end GUI for performing motion correction using the CaImAn toolbox. If you would like to use the Mesmerize front-end for motion correction we recommend using our fork of the toolbox (basically a snapshot of the toolbox from January 2018) since Mesmerize has been tested to work with it. https://github.com/kushalkolar/CaImAn

Mesmerize merely spawns a process which performs the motion-correction part of the pipeline provided by CaImAn. You may modify the motion correction module as you wish under /MesmerizeCore/caimanMotionCorrect.py. This module is basically just from their demo pipeline. Refer to their documentation & official repository for more details. https://github.com/flatironinstitute/CaImAn

Installation instructions

  1. Download Anaconda from here https://www.anaconda.com/download

  2. Follow the official instructions to install Anaconda in a location where you have sufficient disk space (at least 15 gb of free space). The installation might take a long while depending on how fast or slow your computer is.

  3. Download & install gitahead. This makes it easy to receive software updates and stay up to date with the latest version of Mesmerize. http://gitahead.scitools.com/

  4. Create a github account and watch the repository to receive email updates on any issues or updates to the repository.

  5. Create a github account, just pick a username, email, & password https://github.com/

  6. Go to the Mesmerize repository page and click "Watch" at the top to receive email notifications on updates & issues https://github.com/ChatzigeorgiouGroup/MESmerize

  7. Open gitahead.

  8. Click on the " + " and then select "Clone Repository"

  9. Copy & paste this into the URL: git://github.com/ChatzigeorgiouGroup/MESmerize.git

  10. Click "Next"

  11. Under "Directory" choose a location to store the MESmerize repository. And then click "Clone"

  12. After a short while you should get a window like this. First click on the button I've circled in red. This will download Mesmerize and may take a few minutes. After that click the button I've circled in green. In order to update Mesmerize in the future just click on the red circle button to download the updates & click green to apply them.

  13. Do the same procedure as above for the CaImAn repository (this is a calcium imaging library that Mesmerize uses for motion correction and will use for ROI detection). The URL for the repository is git://github.com/kushalkolar/CaImAn . Put it in a different folder. You can follow this procedure of using gitahead to keep up to date with any repository by entering the repository URL. In Windows you need to replace HTTP with "git" in the URL (I don't know why).

Create an environment for Mesmerize to run in.

  1. If you are using Linux or a Mac open the terminal and navigate to the MESmerize folder on your drive, and then enter this (you may need to open a new terminal if you've used this one to install Anaconda):

    conda env create -f mesmerize_env.yml -n mesmerize

    If you're on Windows open "Anaconda Navigator" from the start menu and on the left click on the "Environments" button. At the bottom click "Import" and choose the "mesmerize_env.yml" file in the MESmerize folder. You can name the environment as "mesmerize" (doesn't really matter what the name is).

    It might take a long time to create an environment if your computer is slow.

  2. If you're on Windows click on the "triangular play symbol" besides the mesmerize environment on the list to activate the environment. If you're on Linux or a Mac type the following in the terminal to activate the environment (you may need to open a new terminal). Your environment name is probably "mesmerize".

    source activate environment_name_here

  3. If you're using Windows open Spyder from within Anaconda navigator (click on the "Home" button on the left). If you're on Linux or a Mac just type "spyder" from the terminal to run spyder.

  4. In Spyder click on "Tools" on the top and select PYTHONPATH manager.

  5. In the PYTHONPATH Manager, click "Add Path" and select the "CaImAn" folder. Make sure that the checkbox on the left is checked (there may or may not be a checkbox depending on your OS). Click "Close", and now close the current iPython console that is open. In spyder open __main__.py from the MESmerize folder and run it to use Mesmerize!