This page gives information about the external packages that are
required or useful for Topographica; installation of these packages
is described on the main Downloads page.
Required IOAM Packages
Some of the modules developed for Topographica are maintained and
released separately, so that they can be used in other projects, but
are also required for Topographica:
- Param and ParamTk
- General-purpose support for full-featured Parameters, extending
Python attributes to have documentation, bounds, types, etc. The
Tk interface ParamTk is optional, and only used for
Topographica’s optional tkgui interface.
- ImaGen
- General-purpose support for generating 0D (scalar), 1D (vector),
and 2D (image) patterns, starting from mathematical functions,
geometric shapes, random distributions, images, etc. Useful for
any program that uses such patterns, e.g. any sensory modelling
software, not just Topographica.
Again, installation of these packages is described on the main
Downloads page.
Optional External Packages
A number of other packages are also useful with Topographica, but
are not necessarily required. Packages listed below are therefore
not part of the default Topographica installation, but many are in
use by Topographica users and/or developers.
In most cases, these packages are included in Python distributions
such as EPD/Python(x,y), or are available via package managers
such as apt-get/MacPorts. Alternatively, the packages are available
for easy_install/pip install/standard Python installation via
PyPI. Many of these packages can also be installed using the
external directory of Topographica; see the github installation
instructions. Note that, however you choose to install any of
these packages, if your system has more than one copy of Python you
must install the package using the same copy of Python that you are
using for Topographica.
If you encounter problems using these packages, feel free to ask
the Topographica community for help.
- SciPy
- SciPy includes many, many functions useful in scientific
research, such as statistics, linear algebra, integration and
differential equation solvers, etc.
- mlabwrap
mlabwrap is a high-level Python-to-Matlab bridge, allowing
Matlab to look like a normal Python library:
from mlabwrap import mlab # start a Matlab session
mlab.plot([1,2,3],'-o')
mlabwrap is transitioning to SciKits (see below), but
installation can be tricky so we describe it further here.
First, check you can run matlab -nodesktop -nosplash
successfully, then build from source (e.g. from Topographica’s
fat distribution with make -C external mlabwrap, or download
and build the source yourself). If the matlab libraries are not
in your LD_LIBRARY_PATH, there will be a note during the
build telling you to add the libraries to your path. For
example:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/matlab-7.5/bin/glnx86
You can either add that permanently to your path, or add it each
time before using mlabwrap.
- pyaudiolab
- pyaudiolab provides an easy way to read from and write to sound
files (it wraps libsndfile). In the fat distribtion, building
should be simple: make -C external pyaudiolab.
- scikits-image
- A collection of algorithms for image processing.
- Player/Stage/Gazebo
- The Player/Stage/Gazebo project provides interfaces for a large
variety of external hardware and simulation software, such as
cameras, digitizers, and robots. The Gazebo and Stage simulators
that support the Player interface can also be used, as described
on the Player site. Note that a connection to Player is provided
in topo/misc/robotics.py (last tested with player-2.0.4.tar.bz2
from playerstage.sf.net).
- Processing
- Because of the “global interpreter lock” it is not possible to
do true multiprocessing in Python using the language’s built-in
threads. The processing module provides support for
multiprocessing using an API similar to that of Python’s
threading module. (Although, unlike threads, processes don’t
share memory.) The module also provides a number of other useful
features including process-safe queues, worker pools, and
factories (“managers”) that allow the creation of python objects
in other processes that communicate through proxies.
- Cython
- Cython is a language that is very similar to Python, but
supports calling C functions and declaring C types, and will
produce and compile C code. Therefore, the performance benefit
of C is available from a much simpler language. Because Cython
can compile almost any Python code to C, one can start with a
component written entirely in Python and then optimize it step
by step (by adding types, for example). See the Cython
documentation for more information.
- Quantities
- Quantities allows you to use real-world units in your .ty
scripts, such as mm or degrees of visual field, converting them
to Topographica’s units.
- SciKits
- SciKits provide many useful extensions to SciPy, e.g. for
machine learning and numerical optimization.
- RPy
- The language R (a free implementation of the S statistical
language) has a nice interface to Python that allows any R
function to be called from Python. Nearly any statistical
function you might ever need is in R.
Topographica runs on an unmodified version of the Python language,
and so it can be used with any other Python package that you install
yourself. A good list of potentially useful software is located at
SciPy.org.
As above, note that if your system has more than one copy of Python,
you must install the package using the same copy of Python that you
are using for Topographica.