Astrod2 aims to replicate the functional specification of Astrod, in a more general way. Currently, it focuses only on World Transits, but the functionality outlined below will be extended to Natal Transits, Retrograde Motion and Signs and Houses in due course.
Astrod2 can make use of both PyEphem and Pyswisseph. PyEphem is used as the default base, but is specified, the PyEphem date is converted to a Swisseph date, and the request made to that library instead. For recent history, there is no significant difference between the libraries. The only case in which Swisseph, which uses a newer version of the NASA JPL ephemeris, may be more appropriate is for alignments involving Pluto prior to 0AD, where there are significant differences in the predictions of the two libraries.
Astrod2 works by generating CSV files containing all alignments in a specified period and at a specified granularity (default 1 day). Moreover, these consist of all alignments involving up to n bodies, where n is also specified (all combinations of planets up to n planets are generated). Special cases like Grand Trine, T Square, Grand Cross, or even all planet conjunction, can be specified, and these are then searched, in addition to simple two body alignments, consisting of Conjunction, Opposition, Square, Trine and Sextile. The orb is specified as a further condition.
Two CSV files are generated. One is a list of all the separations of all pairs of planets in the time period. The other is a list of all periods in which any alignment occurs, together with the actors in that alignment. This output allows a high degree of flexibility, as the CSV files can be processed in any way with additional Python code, or supplied to other applications such as Excel, R and Matlab.
Astrod2 has been tested and confirmed to produce the same data as Astrod, and significantly has been tested and verified against Solar Fire, against which it provides the same data, within the granularity of the search. It is recommended that generated data that is to be relied upon is checked against Solar Fire, as part of the ongoing testing of the library. Code exists to process the results of the electional search in Solar Fire into CSV format.
The following areas are currently under consideration, as we further develop the library:
- An algorithm to deduce the total period of alignment, from first entering to last leaving orb (as used in Cosmos and Psyche), from the periods of exact alignment.
- The boolean combination of alignment data sets. Turning a series of periods into a list of true and false readily allows this, and it is hope to produce such output by default, although boolean combinations could easily be performed with a small amount of extra processing.
- The metric of n-body alignments. While the orb condition readily provides the metric for two body alignments, there are a range of methods for n-body alignments where n>2. Currently, the meaning of the orb in this case is the sum of the alignments, and for a given set of actors at a particular time, the configuration with the minimum sum is returned.
- Intelligent search for complex alignments. Locating particular alignments like all planet conjunctions currently involves either a time consuming blanket search, or manually narrowing down searches. We may develop an intelligent search to automate this.
At present, we are running Astrod in the excellent Anaconda framework. This provides Python and Jupyter out of the box, with support for PyEphem and R through its package manager, and installation of Swisseph also straightforward. The Jupyter notebooks provide an excellent means to process and plot the CSV files, using the excellent Pandas data framework and Matplotlib.pyplot respectively. Full instructions for obtaining this setup will be provided when Astrod2 is sufficiently stable to made available as an open source library.