PYTHON

Installation

IDE

Virtual environments

1. Create a virtual environment for a project:

 $ cd my_project_folder
 $ virtualenv my_project
 
 

2. To begin using the virtual environment, it needs to be activated:

 
 $ source my_project/bin/activate

3. If you are done working in the virtual environment for the moment, you can deactivate it:

 $ deactivate

Packages

Neuroimaging vizualizers

Tutorials

Hands on

Useful examples

Matplotlib

Display 2d array

from matplotlib.pylab import *
matshow(my_array, fignum=1, cmap=cm.gray), show()

Interactive mode (can display several figures without freezing the process)

import matplotlib.pyplot as plt
plt.ion()
plt.plot([1.6, 2.7])
plt.draw()
# Turn interactive mode off
plt.ioff()