The Tractor: measuring astronomical sources via probabilistic inference
Python C Other
Clone or download

the Tractor

Probabilistic astronomical source detection & measurement

Build Status Docs Coverage

authors & license

Copyright 2011-2016 Dustin Lang (University of Toronto) & David W. Hogg (NYU)

Licensed under GPLv2; see LICENSE.


To check out and build the code in a tractor directory:

wget -O - | bash
cd tractor

Or if you prefer:

# Grab and install the code (
# and then...
git clone
cd tractor

It is possible to run directly out of the checked-out tractor directory. But if you want to install it:

python install # --prefix=/some/place    or maybe --home=/your/place

There is a test script that renders SDSS images:

python example/


  • scipy (> 0.7; 0.9 works)
  • numpy (>= 1.4)
  • (often svn trunk is required)

Other packages used in various places include:


Horribly incomplete, but online at and


We are trying to move from a "Research code that only we use" phase to "Research code that other people can use". We are happy to hear your feedback; please feel free to file Issues. And naturally we will be pleased to see pull requests!