Dear Calendar People:
I have today posted my Excel spreadsheet with Visual Basic macro for automatically finding solar calendar seasons.
It is publicly accessible, but not yet linked into any web page at my web site. The URL is:
File size = 660 KB.
Be sure to enable execution of macros when you launch it.
(Macros are not supported by Excel 2008 for Macintosh. If you want to see this run on a Mac, either run the Windows version of Excel if you have the facility to do that on your Mac, or use Excel 2004 for Macintosh, which can execute the macro, albeit rather slowly.)
The "Setup" page lets you enter the leap days per cycle, years per cycle, step size (in years between plotted curves), and the middle year number (the one that is subtracted from all the rest).
The user can monkey with the Delta T multiplier if desired, or just leave that = 1.
The bottom half of the "Setup" page offers a continuous fraction calculator to help find useful leap cycles.
After entering the desired cycle info, click on the "Update Chart" button and in a few seconds the report will be ready on the "Chart" page.
The chart shows 10 calendar drift curves and a horizontal baseline for the middle year.
The secondary logarithmic y-axis on the right side shows the standard deviation of the plotted curves at each elapsed day count, and the two minima of that curve are marked as the solar calendar seasons, and labelled at the bottom left of the chart legend.
There are also color-coded vertical lines on the chart that indicate the positions of the equinoxes, solstices, perihelion, and aphelion in the middle year.
The user can click on the "Shift to Past" or "Shift to Future" buttons to cause a recalculation and update.
A really neat feature that I just implemented today is the "Shift to Selected Curve" button: just click on any one of the plotted drift curves to select it (little square handles will appear along the curve) and then click on this button to cause it to recalculate with that year as the middle year. This provides a very quick way of getting to any desired era.
The "Cycles" page shows a few cycles that I have been experimenting with, and the "Pattern" page shows a plot of their calendar season solar longitude (as ±180°) vs. calendar fractional mean year, with both linear and 4th-order polynomial regressions shown. Longer or shorter mean years don't yield stable calendar seasons for the present era, meaning that there is no point in the solar cycle that has a longer or shorter mean year.
The baseline middle year is thick black. Curves that cross it are medium thickness, in color. Curves that miss it (don't cross it) are plotted as thin lines.
Karl would probably prefer that only lines that cross the middle year AND reverse their respective ranks should be medium thickness, but so far I haven't figured out how to do that, nor am I convinced it is necessary.
Karl is still objecting to my SD method for finding the calendar seasons so I have also implemented a "Cross" sheet which contains a list of every curve crossover point, whether it was a crossing of the middle year (Drift=0) or a crossing at some non-zero drift value. Crossovers are detected by the difference in drift estimates changing sign. This list is sorted by elapsed day counts. I used simple linear interpolation to find the crossover moments:
x-coordinate = elapsed day count
y-coordinate = hours of drift
Let (Ax, Ay) be the point prior to the crossover of a lower year.
Let (Bx, By) be the point on that curve after the crossover.
Between them is line AB, whose slope and intercept are calculated.
Let (Cx, Cy) be the point prior to the crossover of a higher year.
Let (Dx, Dy) be the point on that curve after the crossover.
Between them is line CD, whose slope and intercept are calculated.
The intersection of AB with CD is calculated, its coordinates are the fractional elapsed day count and drift of the crossover point.
The fractional elapsed day is also expressed as the month day time.
The solar longitude of the lower year at that point is also calculated and expressed normally (0-<360°) and also as ±180°.
This solar longitude should be the same in the higher year, that is why their curves crossed at that point.
The crossovers list also shows the lower and higher year numbers whose curves crossed.
The information in the crossovers list could be used to calculate the advance of the calendar season as years pass, but that is not yet done.
The user can auto-filter the crossovers list as desired.
Another way to detect crossovers would be to rank the drift of each curve, and look for adjacent curves switching ranks, and also look for pattern reversals.
The Excel RANK() worksheet function could be used, or a loop could inspect all drift values in each row and determine ranks by counting.
This latter approach lends itself better to making a rank string, for example where "A" is the first rank, "B" is the second, etc.
Crossovers could then easily be detected when the string changes, and reversals when the string contains the reverse of what it contained earlier -- presumably each reversal pair would need to be detected and reported.
I invite everybody to try using this spreadsheet and hope you find it useful and enjoyable. Suggestions and comments will be most appreciated!
-- Irv Bromberg, Toronto, Canada