Python for SCNI members - nimh-nif/SCNI_Toolbar GitHub Wiki

1.0. Installation:

  • Download and install Anaconda from Continuum Analytics. This is an open source package and environment manager that will make installing various Python libraries much easier. When Anaconda is installed, open a terminal window and run an update by typing:
conda update conda
  • Install IPython using conda. IPython provides extensions to the Python programming language that make working interactively convenient and efficient.
conda update ipython
  • Install/ update some other libraries that we will use:
conda update numpy		# basic numerical functions
conda update scipy		# scientific functions
conda update pandas		# improved numerical
conda update matplotlib 	# Matlab-style plotting
conda update spyder 		# Matlab-esque IDE
conda update seaborn		# Pretty plotting defaults
  • Install some packages not available through conda, using pip:
pip install mayavi		# 3D graphics
pip install bokeh		# animated graphics
pip install pymatlab 		# Call Matlab from Python

2.0. Getting started

  • Open our current IDE β€˜Spyder’ from the terminal window
  • In the terminal, type:

ipython notebook

Ipython will open a browser tab showing the current directory. Navigate to the example iPython notebook file: β€˜.py’ and click it to open.

 

3.0. Specialist python packages

Neurophysiology:

  • Neo – reads data formats from TDT, Plexon, NeuroExplorer, Spike2, Axon, BlackRock, etc.
  • OpenElectrophy – built on top of Neo and adds GUI and other functionality such as spike sorting
  • NeuroTools
  • SpikeSort – spike sorter
  • SpikePy -
  • Klusta – spike sorting tools from Carandini & Harris labs at UCL
  • Spyke - spike sorting tools from Swindale lab at UBC.

Neuroimaging:

  • PiBabel – read/ write neuroimaging data of every format (except Paravision, obviously).
  • NiPy -

Open-source software that can be scripted in Python:

  • Blender - 3D modeling, animation and video editing
  • Slicer 3D - neuroimaging processing
  • FreeCAD - computer aided design