Some Computer Programs
for Research in the History of
Ancient and Medieval Astronomy

by Benno van Dalen
former research associate at the former Institut für Geschichte
der Naturwissenschaften, Frankfurt am Main (Germany).

Contents of this page: General, Sexagesimal Calculator, Calendar Conversion, Table-Analysis, Mean-Motion Tables, Parameter DatabaseMost recent changes to this page: In January 2015 I have started to compile and upload versions for 32bit Windows (which can therefore also be used on Windows 7 and Windows 8) of the DOS programs that I wrote during the 1990s. Furthermore I will add some programs that I also wrote a long time ago but never made ready for publication. These include:

1) the program KaK (Kennedy & Kennedy) which displays all coordinates found in the 1987 publication Geographical Coordinates of Localities from Islamic Sources but provides much more convenient and extensive searching and sorting possibilities;

2) the program Horoscopes which not only calculates actual horoscopes (with ascendant, midheaven and true positions of the sun, moon and five planets visible to the naked eye), but can also show the mean positions and equations that are found in the course of these calculations. The calculations are performed on the basis of sets of planetary parameters derived from approximately 12 important zîjes (although not directly on the actual tables from those works). Additional parameter sets can be added by following the pattern of the provided .PAR files.

3) If time permits: the program StarAnalysis that loads a base set of stars with modern data, which can be used to calculate the star positions for a specified set of stars for a specific epoch, as it may be found in an historical source.

General

In the 1990s I used Turbo Pascal versions 5.5 and 7 to write a number of computer programs for DOS-PC, which I hoped would also be useful for colleagues doing research on the history of ancient and medieval astronomy. Since the introduction of Windows 7, I received repeated inquiries whether my programs would be ported to Windows in the near future, because the old DOS programs could only be run on 8 and 16bit processors, which are not any more supported by Windows 7 and later. It was only when I was finally forced to give up my own Windows XP notebook in early December 2014 that I started looking more seriously into the possibility of creating 32bit versions of my DOS programs. I soon found that Free Pascal was a convenient tool to achieve this goal, which only required relatively small changes to the Turbo Pascal source code in the way text and graphics are displayed on the screen. I can therefore now present 32bit versions of most of my programs. In spite of their somewhat anachronistic outlook and lack of mouse control, I hope that these continue to be useful. A next step may be to also create versions for MacIntosh and Linux.

As a parallel development, Rafael Ziolkowski (Warsaw) has also continued to work on a Windows version that incorporates and even increases the functionality of my two programs for analysing Ptolemaic astronomical tables, TA and MM. A first version of the result, ZijManager, is expected to be made available later during the year 2015 after some final polishing.

As before, the sexagesimal calculator SCTR and the calendar conversion program CALH display on the screen at any time a complete overview of all available operations and include brief manuals. They can be used as auxiliary programs in a relatively small window along with, for example, Microsoft Word and results may be copied into other applications.

TA is a powerful command-line program for the input, analysis, and output of astronomical tables of Ptolemaic type. It has context-sensitive help (invoked by pressing F1) and a brief manual explaining its general principles. MM shares the manual and most of the available functions with TA, but operates especially on (pseudo-linear) mean motion tables. Since MM does not contain a context-sensitive help system, it might be recommendable to get acquainted with the quite similar TA first.

PARAMS, a database of astronomical parameters occurring in Islamic sources, developed with Delphi and CodeBase during my stay in Frankfurt am Main in 1997/1998, will in the end be available in versions for Windows 3.1 (16 bits) and Windows 95 and later (32 bits). Because of lack of time, the addition of a number of functions (such as more sophisticated queries) and the input of the remaining parameter data contained in Prof. Kennedy's handwritten file has not yet been carried out. The presently available PARAMS16 (see below) has to be considered as a test version. I hope that some future project will allow me to make the full database available, but it is still unclear when this will happen.

All programs are available as zipped files, which you can download onto your computer by clicking the appropriate links below. No special installation is required; simply copy all files in the ZIP archives into a single directory and run the file with extension .EXE.

SCTR (Sexagesimal Calculator)

This DOS-program implements a pocket-type calculator with the Reverse Polish system. It includes a sexagesimal calculator as well as a decimal one. Conversions between the two systems can be performed with a single keystroke and sexagesimal numbers can be shown in various forms (purely sexagesimal, in signs and degrees, with decimal integer part). Possible operations include the square root and a complete set of trigonometric functions, all performed to an accuracy of 16 sexagesimal places (19 in the decimal calculator).

CALH (Calendar conversion program)

This is a DOS program which converts conveniently between the Gregorian and Julian calendars, Julian Day Numbers, and around 10 calendars found in medieval Islamic astronomical sources. These include common ones such as the Hijra, Yazdigird, and Seleucid calendars as well as more exotic ones such as the Maliki and Chinese-Uighur. After a date has been specified in any of these calendars, the corresponding dates in all other calendars and the day of the week are displayed on a single screen. By pressing a single key one can then move a day, week, month, year, decade, or century backwards or forwards. With function keys one can jump to New Year of the present year or to the epoch of the present calendar. Up to 10 dates can be kept in memory for later usage and the number of days between any two dates can be conveniently counted.

A very similar program CALM includes a number of calendars used in more recent times. Besides the Gregorian and Julian calendars, these are the Muslim, Jewish, Coptic, French revolutionary, and Iranian Hijri-i Shamsî calendars. CALM does not come with a separate manual and does not have all the advanced possibilities that CALH offers.

TA (Table-Analysis)

In TA, astronomical tables of Ptolemaic type can be conveniently entered, analysed and printed. Little less than one hundred types of tables can be treated automatically, including tables for trigonometric functions, spherical astronomical functions (declination, right and oblique ascension, etc.), the equation of time, solar, lunar and planetary equations, planetary latitudes, eclipses, etc.

Tables of many of these types can be entered by giving certain tabular values and then correcting the predicted remaining values with presses of the + or - or numerical keys. Two versions of each tabular value can be kept, called "manuscript" and "corrected". The tables can be saved in files with extension .ZIJ and can be shown on the screen and written to text files in various formats, including LaTeX.

Among the available commands for analysing astronomical tables are: calculation of tabular differences; checking of symmetry; estimation of parameters with least squares, least number of errors criterion, Fourier estimation, or direct calculation from 1, 2 or 3 tabular values. Various functions have been implemented that can be used to check the statistical conditions for the application of the various estimators. Arbitrary types of tables can be calculated with the command TC (Table-Calculator) and various types of first- and second order interpolation in given tables can be simulated.

A new version 1.2 of TA was released in February 1999. It includes not only corrections of mistakes, but also various improvements in the way in which data are entered and new commands, such as SE for displaying the scribal errors in a table, LB for displaying the external zijes in a whole directory branch, and CV for copying a range of values from one table into another. Seven new types of functions (all related to planetary equations) were added and the context-sensitive help system was updated completely. A new manual is not yet available, but the file TACHANGE.TXT lists all changes in versions 1.1 and 1.2 of TA.

MM (Mean-Motion tables)

The program MM (in full: Very Useful Program for Analysing Mean Motion Tables) is very similar to TA but operates exclusively on mean motion tables. A convenient way of entering the various subtables of a mean motion table (collected, extended and single years, months, days, etc.) is provided, which even gives the possibility to change the specification of the table while the tabular values are entered. This is particularly useful for manuscripts with many scribal errors, from which the precise specifications may not be reliably extracted at once.
The entered mean motion tables may be saved in files with extension .MMT and can be recomputed, compared, and printed on the screen. The underlying mean motion parameters can be estimated in one of several ways, of which the Least Number of Errors criterion, which finds the parameter values for which a recomputation contains the least number of differences with the entered table, is usually the most accurate.
MM differs from TA in particular in the internal representation of the sexagesimal tabular values. Whereas TA uses a 10-byte decimal representation, MM actually saves all numbers sexagesimally and carries out all necessary calculations with an accuracy of up to 12 sexagesimal digits. The peculiar structure of mean motion tables, whose subtables may or may not be based on the same parameter value and whose tabular values are almost always given modulo 360 (i.e., complete rotations are left out) was the other mean reason to make TA and MM two separate programs.
A new version 1.2 of MM was released in February 1999. Besides some corrections of mistakes, it contains many improvements in the way in which data are entered and new commands, such as CA (Calculate Almanac) for calculating mean motion positions from a given table for a set of dates to be specified, SE for displaying the scribal errors in a table, and LB for displaying the external zijes in a whole directory branch. The Maliki (or Jalali) calendar, a true solar calendar based on the vernal equinox, was added to the set of calendars handled by MM and more general forms of the Julian and Byzantine calendars were implemented. A new manual is not available, but the file MMCHANGE.TXT lists all changes in versions 1.1 and 1.2 of MM.

PARAMS (Database of parameter values
occurring in Islamic astronomical sources)

This program for Windows 3.1 / 95 / 98 presents the around 2000 values of various astronomical parameters, such as the obliquity of the ecliptic, solar, lunar and planetary mean motions, eccentricities, and epicycle radii, latitude and eclipse parameters, that Prof. E.S. Kennedy encountered in both primary and secondary sources dealing with Islamic astronomy. For every value the astronomers with which the value can be associated and precise references (with page and sometimes line numbers) to places where the value was found are given. In an Extra-Info field, additional references to sources and cross-references to related parameter values may be listed. The parameter database can be sorted using the "Greek" representation of the sexagesimal values (e.g., 365;14,48 for Ptolemy's length of the solar year) or a purely sexagesimal one (6,5,14,48 for the same value). Various types of queries allow the user to select, for instance, all parameter values associated with a particular astronomer, or all values occurring in a given primary or secondary source.

The version of PARAMS that can be downloaded through the link below is a preliminary one which still requires a lot of work. In particular, only around 400 values from Kennedy's original cardbox have been entered until now (these include all obliquity values, the solar mean motion parameters, the year lengths and the excesses of revolution). Furthermore, more complicated queries (for example, to select all values of a certain parameter found in a particular primary source) still have to be implemented. I would be very grateful for any suggestions that can make PARAMS a really useful tool for scholars working on Islamic astronomy.

Last modification of this page: 24 January 2015.

zij
Planeten2
WebsiteLogo

Benno van Dalen

Islamic Astronomy

Family History