Building a solar eclipse simulator for April 8 2024
“ Will you be adding solar eclipses to TPE? ” I was asked in March 2023. A good question. With two eclipses passing over North America within a year (more or less) it was high time to grasp the nettle and get to work.
“ Will you be adding solar eclipses to TPE? ” I was asked in March 2023. A good question. With two eclipses passing over North America within a year (more or less) it was high time to grasp the nettle and get to work.
In April I started building a solar eclipse simulator. TPE and its sister products have always tried to supplement accurate numerical data with visualizations that make the data easy to interpret. And why should solar eclipses should be an exception?
Why does a photographer need this?
Fair question. If you’ve not photographed a solar eclipse before, you may not be familiar with just how an intense experience it can be. Just as wildlife and sports photography need quick reactions, so do solar eclipses.
You’ll need to be ready to remove and replace solar filters, adjust your camera’s exposure settings, ensure you’ve reframed the shot as the Sun and Moon move, adjust your zoom level to capture the full extent of the corona, and ensure you’ve bracketed everything appropriately to capture the full range of phenomena that can be observed.
It’s a lot.
Yes, you can automate your camera, for example using a tracking mount to follow the Sun, or using automation hardware or software to fire your camera’s shutter, but that’s an additional level of cost, technical complexity and risk that may be a step too far for many.
In any event, the best thing to do is to prepare, and rehearse mentally, becoming familiar with the sequence and timing of events well in advance of eclipse day. That’s where the simulator comes in.
Location, location, location
Beyond familiarity with timings and sequence, as a photographer, you’ll want to think carefully about your location.
Your position within (or without) the path determines what you’ll see and how long totality will last. Pick a central location and you’ll maximize your time in totality, but reduce your opportunity to see Baily’s beads and the chromosphere. Go to one of the edges, and you’ll have a shorter totality, but more opportunity to capture Baily’s beads.
But which limit? And where? What’s the trade-off between totality duration and beads? Using the Photo Ephemeris eclipse simulator, you’ll be able to check all this in advance. If you’re planning to shoot the eclipse, we recommend that you do!
The approach
I quickly decided that I wanted the simulator to focus on what you would see in a clear sky as an observer on Earth.
Some simulations tackle the issue from the viewpoint of someone orbiting the planet, or located in space somewhere between the Sun and Moon. That’s a perfectly legitimate approach. It works very well to reveal the celestial mechanics in play and can make it much easier to understand the sometimes strange looking paths of eclipses that you see on maps.
However, it’s not really solving any problems for the eclipse photographer: namely, “ what will I see and when will I see it? ”. That’s what you need in order to plan your eclipse photography, particularly if it’s the first one you’re observing. The simulator should show the major phenomena that might be observed during an eclipse, and show them at the appropriate times in the correct positions, clearly annotated with the critical data.
It didn’t seem as important that the simulator should place the Sun/Moon in the landscape - we already have that covered in TPE with the 3D maps. Yes: the Sun is going to appear a lot different during the eclipse, but you can easily assimilate the position in the sky from the 3D page with the visual appearance from the dedicated eclipse simulator.
Close, but not quite
My initial naive approach to writing the simulator was to try to use the existing Sun and Moon position calculations that I’d first implemented years ago, using the algorithms given in Jean Meeus’s wonderful book “ Astronomical Algorithms ”.
Using custom graphics shaders and 3D software library, I got to work trying to draw two simple circles, one for the Sun, one for the Moon. Of course, the goal is that they should being to overlap at the start of the eclipse, the Moon should obscure the Sun at totality, and they should no longer overlap at the end of the partial phase.
Unfortunately, it was not to be. At the expected start of totality, my simplified Moon outline was not quite covering the Sun. A month of correspondence with Jeff Conrad, author of the excellent Large Format Photography Sun/Moon Calculator, ensued. We chased down a large number of minor corrections, clarifications and refinements to the existing calculations, but nothing solved the issue.
Silly me. It transpires that the degree of accuracy required for solar eclipses is far greater than for any other photographic application I’d encountered to date. Using the standard Meeus algorithms, even the “ high accuracy ” truncated VSOP87 algorithm, gets you close, but not close enough. You need positions accurate to thousandths of a degree, far greater accuracy than for virtually any other terrestrial application.
Besselian elements
I’d already implemented what are known as ‘local circumstances’ calculations. The timing of a solar eclipse, its magnitude, and other properties depend on the observer’s location on Earth: these are the local circumstances.
They can be derived from what are known as the “ Besselian elements ”, which are like your chosen numbers on the eclipse lottery ticket: a set of 16 or so values from which (almost) all eclipse information can be derived. This includes things such as the local timing of second contact, when totality begins, and third contact when it ends. NASA’s published Besselian elements are a distillation of the output of state of the art high precision ephemerides (yes, that’s the plural of ephemeris).
Most of the sources on how to implement these calculations are many decades old. Some go back more than a century, such as William Chauvenet’s “ A manual of spherical and practical astronomy ” of 1863, which was the first publication to make the work of Friedrich Bessel, originally published in German in the 1820s, available in English. Chauvenet also simplified Bessel’s methods, making them more practical. His efforts were followed by others key figures down the years, including Comrie and Meeus himself.
Many eclipse sites give you the circumstances of the eclipse only at the key contact times (C1, C2, Max eclipse, C3, C4). But for a continuous simulation, you need to know the positions and sizes of the Sun and Moon at any given instant. The trick is to use the Besselian elements to derive those instantaneous circumstances.
With that done, the simulation of Sun and Moon came together - literally.
Visualizing an eclipse
Here are some of the phenomena that need handling to provide a simulation of a solar eclipse:
- Unobscured and partially eclipsed Sun
- Sky brightness
- Position relative to the horizon
- The “ diamond ring ”
- Baily’s beads
- The chromosphere
- The solar corona
- Solar prominences
- Atmospheric refraction
Disregarding the potential for nuisance clouds (there seems little point in simulating a disappointing clouded-out eclipse!), all but two of the items in the above list can be predicted or modeled with high accuracy.
The two items which are not easily predictable are the solar corona and prominences. However, these - and the corona in particular - are one of the critical visual elements of a total eclipse. It’s the appearance of the corona that causes astonishment in many first time eclipse observers. Once you’ve absorbed that, the next question is often “ what are those pink flares? ”.
What to do, given that the appearance of the corona and prominences can’t really be predicted? I elected to make use of our photographs of the 2017 total eclipse. By carefully selecting two images from our 2017 trip, one of the corona with a nicely prominent prominence, and a masked image of the diamond ring, I was able to blend these together in the simulator, adjusting the size and rotation (independently) to match the local circumstances of other eclipses.
Yes, the shape of the corona will not be repeated, the position, shape, and number of prominences will not be the same, and the appearance of the diamond ring may be affected differently by the rough profile of the lunar limb, but the overall picture more than fits the bill.
Corona, diamond ring, chromosphere and prominence - and Baily’s beads too (more on those below) - Aug 12 2026 total eclipse, Spain
I added some logic to darken the sky appropriately (although this could be refined further), added a virtual horizon for eclipses which begin or end at sunrise or sunset, added in the pink chromosphere (a thin, pink layer drawn outside the photosphere). As a finishing touch to v1, an image of the Sun, showing the sunspots as seen on Aug 21 2017 was included for the partial phases, with the image rotating according the parallactic angle.
And with that, we can simulate any eclipse past, present or future, including the upcoming total solar eclipse of April 8 2024, as viewed from near Torréon, Mexico:
Photo-realistic simulation of the April 8 2024 eclipse for a location near Torréon, Mexico
What’s missing?
Looking back at the list above, there are two I’ve not yet mentioned further: Baily’s beads and atmospheric refraction.
Baily’s beads
Baily’s beads are caused by the bright body of the Sun, the photosphere, shining through the valleys of the rough lunar surface. Experienced eclipse chasers often make special efforts to see and capture them. Doing so requires particular attention be paid to the observing location. Wouldn’t it be nice if we could simulate the beads too?
If you know the shape of the lunar outline (formally, the lunar limb profile) at the time and place of the eclipse, that essentially determines where Baily’s beads will appear, but not exactly how they will appear. The physical positioning of the beads over time, their appearance and disappearance, is governed by the limb profile and the celestial mechanics encoded in the Besselian elements plus the libration of the Moon.
Libration describes the apparent ‘wobble’ in the orientation of the Moon with respect to an observer on Earth. At different times and places, we see a slightly different aspect of the Moon’s face, such that over the full lunar cycle we can see around 59% of the lunar surface. And of course, as libration changes, so does the lunar limb profile that is presented to the observer.
Their visual appearance is a function of how the eclipse is observed and the ‘seeing’ conditions on the day. I imagine the vast majority of us first see Baily’s beads in photographs. Their appearance depends on the exposure used to capture the image. Place a solar filter on the camera - usually equivalent to around 16.6 stops of exposure reduction - and you’ll see flat pixels of light where the beads coincide with a lunar valley. Remove the filter and the beads appear as brightly flared points of light strung around the limb of the Sun. In German, this is called Perlschnurphänomen: the “ string of pearls phenomenon ”.
And that’s how it also appears to the naked eye: the beads are bright - you’re looking at the Sun. You shouldn’t be! Use eye protection.
Getting the basic geometry of Baily’s beads into the simulator was relatively straightforward. Some additional data requests to get the correct lunar limb profile, a few additional calculations, put it together and it more or less draws itself.
Simulating the unfiltered visual appearance was a taller order. With much experimentation and optimization, I was able to have the simulator draw beads with appropriate visual flare. The size of the flare is (non-linearly) proportional to the distance of the Sun’s limb from the Moon’s limb at each point along the lunar profile.
One of the performance optimizations was only to apply the visual ‘flare’ at points where beads were possible. This is ideal for most total eclipses, where the are of potential beading is limited. We show the arcs of potential beads in yellow in the ‘outline’ mode of the simulator, along with an exaggerated lunar limb profile. It makes understanding the cause and progression of Baily’s beads much easier. Beads arise where the Sun shines through the lunar valleys - you can see it here:
Baily’s beads just after C3, from near the southern limit in Mexico
For annular eclipses, limb of the Sun is mostly exposed (by definition), and typically such eclipses are photographed with a solar filter (no flaring):
Annular solar eclipse of Oct 14 2023 at C3, Bisti Badlands, New Mexico: photograph (left), simulation (right)
For those rare hybrid eclipses, where the magnitude hovers very close 1.000, Baily’s beads can appear anywhere around the Solar limb. We can simulate that too!
Hybrid Solar Eclipse, 14 Nov 2031, Pacific Ocean
Baily’s beads simulation is included in Photo Ephemeris Web for all historical eclipses for all users (free or paid) and is available to PRO users for future eclipses.
Atmospheric refraction
Incorporating the effects of atmospheric refraction will complete our list of eclipse phenomena. That’s something for the future. The ends of the 2024 total eclipse lie far our over the oceans, and so there will be only the tiniest percentage of observers located there.
In the meantime, the altitude of the Sun shown in TPE already accounts for the effects of refraction, which has the effect of pushing the Sun higher in the sky when near the horizon.
State of play
The current version of the simulator provides accurate visualizations of solar eclipses. We’ve verified it against images from multiple past eclipses, covering multiple locations and several eclipse types. Check it out here.
Historical eclipses since 1600 are free to view. The April 8 2024 eclipse is free (without the lunar limb profile, i.e no Baily’s beads). For PRO subscribers, all future eclipses through to the year 2500, including TSE2024, are available with lunar limb profile and Baily’s beads simulation.
One of the most powerful aspects of the eclipse simulator is just how easy it is to check different locations. Drag and drop the map pin and the simulator updates in an instant. Use it to explore potential locations and find your ideal spot for April 8 2024.
For more information:
We hope you enjoy using it!
— Stephen