Planetary Transit Routines

The following is a link to the original compressed tar file with IDL and FORTRAN routines to compute the transit of an opaque spherically-symmetric planet in front of a limb-darkened circular star, based upon Mandel & Agol (2002). There are several typos in this paper that do not affect the routines (except in the case of planets larger than the star), which are described here. If you use these routines in your research, please cite this paper. If you find any bugs in this routine, please let me know and I will make my best effort to correct them. This routine was created with support from NASA.

Dec. 2, 2011: Nuno Santos found a bug in which affects u-band limb darkening. The correction is that lines 44 and 45 should read:
(i.e. replace the 4s by 5s).

Other versions of the code:

  1. There are faster versions of the IDL routines which you can obtain by emailing Eric Agol.
  2. Here is a Python version of the quadratic limb-darkening routine written by Jason Eastman. Please acknowledge Jason Eastman and cite Mandel & Agol (2002) if you make use of this code.
  3. BATMAN is a Python version which uses the Mandel & Agol (2002) quadratic limb-darkening solution, plus a faster Bulirsch elliptic integral evaluation as implemented in EXOFAST, and it can also handle arbitrary limb-darkening using numerical integration. The code is written and maintained by Laura Kreidberg.
  4. The code is incorporated in the Transit Analysis Package (TAP) written by Zack Gazak: TAP
  5. Here is a link to a MATLAB version of the quadratic limb-darkening routine, courtesy of Gil Nachmani: MATLAB quadratic.
If you make use of this routine and would like to be informed of updates or bugs, please email me:
Eric Agol (agol AT