Content Skeleton

This Page

Previous topic

Chroma Refs

Next topic

Chroma Geant4 Integration

Chroma Prerequisites

Difficult hardware and software requirements, lots of pre-requisites.

  • Are they all really, really needed ?
  • what are they for ?



  1. Python 2.6 or later
  2. CUDA 4.1 Toolkit and NVIDIA driver.
  3. Boost::Python
  4. Numpy 1.6 or later
  5. Pygame
  6. Matplotlib
  7. uncertainties
  8. PyCUDA 2011.2 or later
  9. PyUblas
  10. ZeroMQ
  11. GEANT4.9.5 or later
  12. Patched version of g4py (DID I INSTALL THE PATCHED ONE ? STILL NEEDED ?)
  13. ROOT 5.32 or later


Derivative based error propagation.

simon:chroma blyth$ find . -name '*.*' -exec grep -l uncertainties {} \;


PyUblas provides a seamless glue layer between Numpy and Boost.Ublas for use with Boost.Python

BLAS : Basic Linear Algebra Subprograms

simon:chroma blyth$ find . -name '*.*' -exec grep -l pyublas {} \;
./chroma/generator/    # imported but unused here ?


118 #include <boost/python.hpp>
119 #include <pyublas/numpy.hpp>
121 using namespace boost::python;
123 pyublas::numpy_vector<double> PTA_GetX(const PhotonTrackingAction *pta)
124 {
125   pyublas::numpy_vector<double> r(pta->GetNumPhotons());
126   pta->GetX(&r[0]);
127   return r;
128 }


Python layer ontop of SDL, used for GUI and “game” control.

Pygame is implemented as a mixture of Python, C and Assembler code, wrapping 3rd party libraries with CPython API interfaces.

simon:chroma blyth$ pwd
simon:chroma blyth$ find . -name '*.py' -exec grep -l pygame {} \;
./chroma/    # does not insist on pygame available
./chroma/      # used for GUI, keyboard event handling
./doc/source/    # brittle yum/apt/pip/cmake based installer for most everything


The spnav module provides a Python interface to the libspnav C library, which allows you to read events from a Space Navigator 3D mouse on Linux systems. These input devices simultaneously report linear force and rotational torque applied by the user to the device, along with button events. See:


Underlying ZeroMQ is now auto-built by the python installation, no longer need pyzmq-static.