analemma, a Python code which evaluates the equation of time.

The code computes and plots the equation of time, the declination, and an analemma curve for various orbital parameters. The analemma is the curve traced by the position of the sun, measured at clock noon, over a year.


analemma ( ecc, lon, obliq )
where the optional input parameters are:

The code with no options uses the following default values:


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


analemma is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and codes:


  1. Brian Tung,
    Figure Eight in the Sky, a new perspective on an old fascination,
    Astronomical Games, August 2002,

Source Code:

Last revised on 30 June 2017.