This page covers the installation of the MotionClouds library.
This library depends on a number of dependencies, among which
numpy is the only that is mandatory.
There is a dedicated page describing instructions oriented toward psychophysicists
MotionClouds: installing and running the python scripts¶
MotionClouds are parameterized stimuli with controlled motion content and no spatial coherence. They are precisely tuned in the frequency space.
- A full description can be found in Paula S. Leon, Ivo Vanzetta, Guillaume S. Masson, Laurent U. Perrinet. Motion Clouds: Model-based stimulus synthesis of natural-like random textures for the study of motion perception, URL . Journal of Neurophysiology, 107(11):3217--3226, 2012, see http://www.ncbi.nlm.nih.gov/pubmed/22423003 or http://jn.physiology.org/content/107/11/3217 .
- to get the latest version, download the current state from the repository:
git clone https://github.com/NeuralEnsemble/MotionClouds.git
installing and running the python scripts¶
This package consists of:
MotionClouds.py: the API with all the math and display routines,
test_*.py: different types of stimuli are tested,
experiment_*py: different experiments.
fig_*py: different scripts used to generate wiki pages.
figures: resulting figures of tests and experiments (as set in the variable
Makefile: a GNUmake file to edit files
make edit, generate figures
make figuresor compile the documentation
MotionClouds consist of a one-file python script: Installation consists simply in downloading the
MotionClouds.pyfile which contains all routines to compute and use the MotionClouds textures. This script uses python (http://python.org) which comes (pre-installed / easy to download and install) on many operating systems.
MotionClouds may easily be installed using
pip install MotionClouds
Other solutions consist to simply grab this file at: https://raw.githubusercontent.com/NeuralEnsemble/MotionClouds/master/MotionClouds.py and to use it along with the examples.
Installation has some dependencies:
numpyis the core library used to compute textures,
vispyis used to visualize envelopes,
ffmpegis used to generate movies.
scipy(with PIL support) and
imagemagickare used to generate figures in the documentation.
progressbarfor displaying progress of encoding.
texlive-latex-recommended latexmk latexdiffto compile the documentation
pymovieto test MotionClouds within an ipython notebook (recommended)
These dependencies may be easily met using the dedicated scripts:
For MacOsX, first install command line tools by typing the
gitcommand in the terminal (a pop-up message should happen if these tools are not installed). Then I recommend using a python toolchain such as that described in https://github.com/laurentperrinet/config-scripts/blob/master/osx_brew_python.sh
For Debian-like systems, use the package manager to install missing dependencies (most likely, everything is already installed)
Again, these line of code may be copy-and-pasted in your terminal.
To test the basic functionality of Motion Clouds, try in the terminal:
python -c'import MotionClouds as mc; fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame); z = mc.envelope_gabor(fx, fy, ft)'
other sources exist to get a stable release, such as ModelDb (http://senselab.med.yale.edu/modeldb/ShowModel.asp?model=146953).
This was tested on several MacOsX/Mavericks 64bit machines and on ubuntu 14.04 LTS and Debian squeezy 64bit machines.
If that fails, we will be happy to help out, so send an e-mail to email@example.com.