SunSketcher (Part 1): Using Smartphones to Reveal the Shape of the Sun

Guest post by Gordon Emslie (Western Kentucky University) and Hugh Hudson (University of Glasgow)

During the 2024 North American solar eclipse, a pioneering project aimed to use citizen-science smartphone data to help more accurately determine the shape of the sun. How did it turn out? This is part one of a two-part post. Read Part 2 here.

Solar eclipses provide infrequent opportunities to study the faint atmosphere of the Sun while evading the glare of its body. In these brief moments, one can really enjoy a direct view of the glorious solar corona. One can also deploy specialized astronomical instrumentation to record and analyze images and spectra. And now, solar research can take advantage of the amazing technological advances available in everybody’s smartphones: GPS timing and geolocation, and cameras with many pixels. In 2017, the Eclipse Megamovie project, led by Laura Peticolas of UC Berkeley, captured and blended many images of the solar corona into a uniquely seamless movie of coronal variations over the 1.5 hours of totality, along the full length of the eclipse track. For 2024, we wanted to expand on this success by using precise timing information of eclipse features to determine the precise shape of the Sun — all with ordinary smartphones! Thus was born the project that came to be known as SunSketcher.

Why does the Sun’s shape matter?

The Sun’s exact shape is determined by the flows of gas within its interior; precisely observing that shape gives us a better sense of what is happening underneath. Accurately measuring the Sun’s oblateness (its deviation from a perfect sphere) will also allow very precise calculations of the effects of solar gravity on the motions of planets like Mercury, which can help us test out different gravitational theories.

The physics behind the shape of the Sun

The exact timing of events during an eclipse — the beginning or end of totality, for example — depends upon how big the Sun actually is. Many (including the eclipse legend Xavier Jubier) have commented on the possible use of detailed timing of eclipse features to revise our knowledge of the size and shape of the solar disk. The Sun is a fluffy ball of hot gas, and there are several different ways you could define its edge, or limb, and thus its size.

So instead we ask: What is the shape of the Sun? That is a question one actually can get a meaningful answer to, by selecting any reasonable definition for determining the edge of the Sun, and then seeing how this varies around its circumference (the limb). Intuitively, the rotation of the Sun will make it oblate rather than a proper sphere, and we observe this shape distortion to be about 1/100,000th of the radius. But other internal flows and forces can cause distortions to the shape of the solar disk, and these have never been measured previously. Solar magnetism is one such factor: the Sun has a magnetic field which is generated by, and moves with, the ionized gases within its interior. This magnetic field, and the associated flows cause time-dependent shape variations such as coronal mass ejections and the 11-year sunspot cycle.

The edge of the Moon and Baily’s Beads

There are four “contact times” during a total solar eclipse — when the edges of the sun and moon appear, from our perspective, to meet. The first contact is when the Moon begins to pass in front of the Sun, and the fourth contact occurs a couple of hours later when the Moon, traveling at over 2,000 mph, finally exits the path between the Sun and the observer. The times of second and third contact1 are when the solar and lunar limbs just match (the leading edge at second contact and the trailing edge at third contact). At these times, so-called Baily’s Beads (see the image above) briefly appear, bright spots formed as the sunlight passes through the lunar valleys but is blocked by the several-kilometer high lunar mountains on either side. This gives us a marvelous opportunity to get very precise measurements of the solar limb, using trigonometry. The shape of the occulting lunar limb has now been mapped out in great detail by the Lunar Reconnaissance Orbiter and Selene satellites, with uncertainties as small as 5 meters. The eclipse lets us transfer this mapping to the Sun; since the Sun is about 400 times further from the Earth than the Moon is, a 5 m lunar roughness translates to a distance of only 2 km on the Sun, a tiny fraction of the 700,000 km mean solar radius. Multiple measurements of the precise timing of Baily’s Beads can therefore map out the shape of the solar limb with unprecedented precision, and this information can in turn be used to constrain the flows within the solar interior.

1 Note that for an annular eclipse (see below) the times of second and third contacts are reversed from their counterparts during a total eclipse. During an annular eclipse (see Figure 1), second contact corresponds to the trailing edge of the Moon being coincident with the solar limb, while third contact occurs when the leading edge subsequently arrives at the opposite edge of the solar disk.

A student-built smartphone app: SunSketcher 2024

The SunSketcher smartphone app was designed, developed, and implemented by a team of faculty and students at WKU (with majors ranging from computer science to art and design) to carry out the precise timing observations of Baily’s Beads necessary to map (“sketch”) solar oblateness. Its basic functionality is surprisingly simple: starting with the GPS location of the phone (known to a distance accuracy of a few meters, comparable to that of the lunar limb from the Lunar Orbiter Laser Altimeter [LOLA] database), the app uses2 the Besselian elements of the eclipse to calculate the precise times of second and third contact at the observer’s location.3

The app then commands the phone’s camera to take a series of 100 images (50 around the time of second contact and another 50 around the time of third contact). Because of some uncertainty about what exact feature (the first penetration of the solar crescent by a lunar mountain? the last ray of sunlight from the lowest valley at the limb?) corresponds to the published times of second and third contact, we deliberately chose to take images over a time interval spanning about 20 seconds either side of the published contact times. (Preliminary results from the 2024 April 8 eclipse show that this was overly conservative, and we will reduce the observing interval accordingly for future eclipses.)

Although the images are rather unspectacular, consisting of a few bright dots of light (Baily’s Beads) surrounding the lunar limb, it is the timing of the appearance and disappearance of these bright dots of light that provide the essential scientific information, and an ordinary phone is capable of timing each frame to an accuracy of a millisecond. With an eclipse shadow speed of about 2,000 mph (3,200 kilometers per hour, or about 1 kilometer per second), a timing accuracy of 1 ms represents a distance of about a meter, corresponding to about 400 m at the Sun. This is a superb level of accuracy.

2 Much of the coding for this first step was already present in a code written by Ideum, Inc., for the 2017 solar eclipse, and we are grateful to Jim Spadaccini of Ideum for sharing this code with us.
3 Besselian elements (named after the mathematician Friedrich Bessel) are a set of numbers that use the position of the Moon and the Sun to describe the circumstances of an eclipse as viewed by a hypothetical observer at the center of the Earth; with these numbers established, it is a relatively straightforward exercise in geometry to translate these to the circumstances for an observer at a given latitude, longitude, and altitude.

Testing the concept

Our research found a great deal of conflicting information about whether exposure to direct sunlight could damage a cell phone’s camera, so extensive beta-testing was carried out with various makes and models of phone, culminating in a beta-test during the 2023 October 14 annular eclipse at the University of Texas Permian Basin4 in Odessa, TX. These tests revealed that while exposure to direct sunlight could easily cause overexposure of images (and possible overheating of the phone), it did absolutely no damage to the phone’s camera.

A view of the third contact during the 2023 October 14 annular eclipse, taken at the Stonehenge replica on the UTPB campus in Odessa, TX, with a DSLR camera at 1/8000 second exposure time. Note the Baily’s Bead at 7 o’clock on the solar disk. Subsequent analysis allowed us to associate this bead with a prominent deep valley on the Moon’s limb, strongly validating the SunSketcher concept. Credit: Clinton Lewis/WKU. (Image was also used as the lead image in this NASA website article.)

Photographer Clinton Lewis accompanied the team on our trip to Odessa, and not only produced many images of the team at work, but also of the eclipse itself. Notable among these images was one taken at the time of third contact (Figure 1), showing a distinct Baily’s Bead lying approximately midway between the “horns” of the bright solar crescent at the other (uneclipsed) side of the Sun. This image was immediately termed the “Clinton Bead,” and formed the basis for a subsequent analysis in which we were able to identify the precise lunar valley (“Clinton Valley”) corresponding to it. More than any other evidence, the image of the Clinton Bead showed that the proposed methodology of SunSketcher was indeed very feasible.

The exposure time chosen for each image was 1/8000 second, which we determined to be sufficiently short to permit useful (unsaturated) images to be obtained without the use of a solar filter. Another image, with a significantly longer exposure time, is taken at mid-totality, when the circular ring at the base of the solar corona is visible. This central image is used to locate the Sun in the field of view of the camera, and a bounding box, large enough to accommodate the degree or so of diurnal drift during the 4 minutes or so of totality, is placed around this location. This bounding box is then used to crop each of the 101 images obtained, thus concentrating on the 5 kilobytes or so of scientifically valuable data. This reduced the amount of data that had to be transmitted from about a hundred megabytes per phone to less than a megabyte.

At the end of the observation period, the app shows the user all 101 photos taken and requests permission to upload them to a central server. Because of the substantial reduction in data content facilitated by the cropping of the images, the upload time is only about one second for all of the images taken from a single phone.

Many eclipse observers congregate in groups, and it was important that a phone did not simply duplicate the data from other phones in close proximity to it. To accomplish this, the app added or subtracted a random time, up to a quarter of a second, to the times of the images taken; with an eclipse shadow speed of about a kilometer per second, this added “jitter” corresponds to about plus or minus 200 m in phone location.

4 We thank the administration, faculty, and staff of UTPB for their hospitality during this beta testing, not to mention allowing us use of the Stonehenge monument replica on campus as a viewing location. Now there’s a place to see an eclipse!

The user interface

With the basic functionality of the code written, and successfully tested at the 2023 annular eclipse, the attention of the team turned to the more practical, legal, and aesthetic issues associated with its use by observers with no prior training. We added a short tutorial, covering matters such as how to point the phone camera and how to ensure an uninterrupted observing sequence. We employed focus groups to ensure the app was attractive and intuitively straightforward to use. Because the project involves the collection of data from phones belonging to a large number of members of the public, we also had to ensure compliance with legal issues such as user privacy. To avoid potential issues with different privacy laws in different countries, the app was made available only to phones belonging to a U.S. network.

Overall, the SunSketcher project involved tireless effort and commitment from a team of faculty and students representing disciplines ranging from computer science to art and design and even psychological sciences. There were countless highs and lows throughout the months of work. As we approached the day of the eclipse, everyone (and we mean everyone!) on the team knew that the astronomically imposed deadline was more absolute than any other project that they had before worked on, or would ever work on in the future.

Read Part 2 here to learn what happened on eclipse day! You can learn more about SunSketcher at http://sunsketcher.org/.

Featured image: Baily’s Beads in 2019 from La Silla, Chile (courtesy P. Horálek/ESO).