Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Watching our own star
Satellites stare at the Sun continuously, taking pictures in many colours, each showing gas at a different temperature, from the visible surface to the million-degree corona. Dark sunspots mark strong magnetic fields; above them, loops of hot gas can snap and release flares and eruptions. Images of the Sun are not uniform: the disc is darker towards its edge (limb darkening), and features near the edge look squashed because we see them at an angle. Spot-finding software has to correct for both. The demo shows how a simple brightness threshold mistakes the darkened edge for spots.
Flares and coronal mass ejections disturb GNSS accuracy, HF radio, satellite drag and power grids; the May 2024 geomagnetic storm was the strongest in two decades. Forecasting them from solar images is an active machine-learning problem.
- 1. Limb darkening means the Sun's disc is…
- 2. Sunspots are dark because…
- 3. Features near the limb look…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- SDO (2010–). AIA (Lemen et al. 2012): four telescopes, 4096 × 4096 pixels of 0.6 arcsec, extreme-ultraviolet images every 12 s at 94, 131, 171, 193, 211, 304 and 335 Å (each channel sensitive to plasma at different temperatures), plus UV (1600, 1700 Å) and visible channels. HMI (Scherrer et al. 2012): continuum images, Dopplergrams and magnetograms from the Fe I 6173 Å line. EVE measures EUV irradiance.
- Other sources. GOES X-ray sensors (flare classes); Solar Orbiter (ESA/NASA, launched 2020) with close-up and out-of-ecliptic views; Parker Solar Probe; the 4 m DKIST telescope on Haleakalā; coronagraphs (SOHO/LASCO) for coronal mass ejections.
- Coordinates. Helioprojective (angles on the sky from disc centre, as seen by the observer); heliographic Stonyhurst (latitude and longitude, longitude zero facing Earth) and Carrington (rotating with the Sun, one rotation every 27.2753 days as seen from Earth). The B0 angle tilts the rotation axis towards or away from the observer by up to about 7°.
- Differential rotation. The surface rotates faster at the equator: ω(φ) = A + B sin²φ + C sin⁴φ, with A = 14.713, B = −2.396, C = −1.787 degrees per day (Snodgrass and Ulrich 1990). Features must be de-rotated to compare images taken hours apart.
- Photometric effects. Visible-light limb darkening, roughly I(μ) = 1 − u(1 − μ) with u ≈ 0.6 near 550 nm, where μ = cos θ; foreshortening shrinks projected areas by μ. Optically thin EUV coronal emission brightens towards the limb instead. AIA sensitivity degrades over time and is corrected with aiapy.
- Flares and forecasting. GOES 1–8 Å peak flux classes A, B, C, M and X (each ten times the previous; X is at least 10⁻⁴ W/m²). Forecasting uses active-region magnetic features (SHARP parameters) or images: Bobra and Couvidat (2015) used SVMs on SHARP features and argued for the true skill statistic TSS = TPR − FPR, which does not depend on the class ratio.
- Data and models. SunPy (core library: maps, coordinates, data search) and aiapy; SDOML (Galvez et al. 2019), a curated ML-ready version of SDO data; NASA and IBM’s Surya (2025), a foundation model pretrained on SDO images for tasks such as flare forecasting.
- 1. AIA takes full-disc EUV images every…
- 2. An X1 flare's peak 1–8 Å flux is…
- 3. TSS is preferred for flare forecasting because…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Working with solar images
Exercise 1.
- μ = cos θ maps of the disc.
- The linear limb-darkening law and its least-squares fit.
- Pixel to heliographic latitude and longitude.
- Snodgrass differential rotation.
Practice.
- Use SunPy maps: they carry the observer position and WCS, so reprojection, de-rotation and coordinate transforms are correct.
- Prepare AIA level-1 data: register and rescale to level 1.5 (aiapy), normalise by exposure time, correct for degradation.
- Normalise before thresholding: divide continuum images by a limb-darkening fit; for EUV, use log scaling and per-channel normalisation.
- Correct areas for foreshortening (divide by μ) and report them in millionths of a hemisphere; avoid the outermost few per cent of the radius.
- Flare forecasting: split train and test by time or by active region, never randomly by image (neighbouring frames are nearly identical); report TSS and skill scores, not accuracy.
import astropy.units as u
from sunpy.net import Fido, attrs as a
import sunpy.map
from aiapy.calibrate import register
res = Fido.search(a.Time("2024-05-10 17:00", "2024-05-10 17:01"), a.Instrument.aia, a.Wavelength(171 * u.angstrom))
m = sunpy.map.Map(Fido.fetch(res)[0])
m = register(m) # level 1 → 1.5: common scale, centred, north up
m = sunpy.map.Map(m.data / m.exposure_time.to_value(u.s), m.meta) # counts per second
print(m.rsun_obs, m.observer_coordinate)- 1. Split flare-forecasting data by…
- 2. AIA level 1.5 data are…
- 3. Before thresholding a continuum image, divide by…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Disc geometry. A pixel at distance ρ from disc centre, in units of the solar radius, sees the surface at angle θ with μ = cos θ = √(1 − ρ²). A small surface patch of area A appears with projected area A μ, so areas measured in pixels must be divided by μ. Near the limb μ changes fast, so pixel quantisation errors explode there.
Limb darkening. Looking towards the limb, the line of sight reaches optical depth one higher in the photosphere, where gas is cooler, so the intensity drops. The linear law with u ≈ 0.6 gives an edge 40% as bright as the centre. A global threshold at 0.85 × the disc median therefore flags a ring at the limb. Meanwhile spot penumbrae near disc centre (0.75 × a bright surrounding) can stay above it, so both precision and recall suffer.
Non-parametric profiles. A radial median in bins is robust to spots but approximates a steep profile with a step function. Near the limb the intensity changes by more than 15% within one bin, so the outer pixels of each bin fall below 0.85 × the bin median.
Rare-event metrics. With few flaring cases, accuracy rewards never predicting a flare. TSS = TPR − FPR ranges from −1 to 1 and is 0 for any constant forecast.
- 1. Projected area of a patch at angle θ from disc centre:
- 2. Limb darkening arises because the limb shows…
- 3. TSS of a forecaster that always says no flare:
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.What does it take to find sunspots and measure their areas correctly?
History.
- Galileo and contemporaries recorded sunspots by telescope from 1610; R. Carrington defined rotation numbers and observed the first white-light flare (1859).
- W. Pesnell, B. Thompson and P. Chamberlin, “The Solar Dynamics Observatory (SDO)” (2012).
- M. Bobra and S. Couvidat, “Solar flare prediction using SDO/HMI vector magnetic field data with a machine-learning algorithm” (2015).
- R. Galvez et al., “A machine-learning data set prepared from the NASA Solar Dynamics Observatory mission” (2019).
Exercise 2. Three simulated white-light discs (256 × 256, radius 110 px, linear limb darkening u = 0.6, 2% noise), each with 12 sunspots drawn on the sphere at latitudes ±35° and longitudes ±80°. Spot radii are 1 to 4 degrees, with an umbra at 0.3 and a penumbra at 0.75 of the local intensity.
- Detectors: pixels below 0.85 × (i) the disc median (global), (ii) a fitted linear limb-darkening law, (iii) a 40-bin radial median profile.
- Measure: pixel precision and recall, false regions per image, spot centres found, and areas in millionths of a hemisphere with and without dividing by μ.
| detector | pixel precision | pixel recall | false regions per image |
|---|---|---|---|
| global threshold | 0.051 | 0.788 | 81.3 |
| limb-darkening fit | 0.999 | 0.999 | 0.3 |
| radial median (40 bins) | 0.900 | 0.999 | 62.3 |
| spots | projected area error | μ-corrected error |
|---|---|---|
| near centre (μ above 0.5) | −0.136 | +0.014 |
| near limb (μ below 0.5) | −0.543 | +0.013 |
- All three found every spot centre; the difference is in false regions and spot extent.
- The global threshold flagged the darkened limb as dozens of fragments and missed penumbrae near disc centre (recall 0.79).
- The fitted law recovered u = 0.597 despite the spots and isolated them almost perfectly.
- Null result for the radial median: robust in principle, but a coarse step profile failed at the limb; it would need finer bins or interpolation.
- Foreshortening: projected areas were 14% too small even near centre and 54% too small near the limb; dividing by μ brought both within 1.4%.
- Seeds 1 and 2: global precision 0.048 and 0.049 (83.7 and 94.3 false regions); fitted-law precision 1.0 and 0.998; limb-area error −0.693 and −0.593 projected, +0.006 and −0.009 corrected.
- Caveat: idealised spots, B0 = 0, no faculae or granulation; real HMI continuum images also need pore and facula handling.
Solar imaging in AI, robotics and aerospace
- Space weather operations: NOAA’s Space Weather Prediction Center and ESA’s Space Weather Service Network turn solar images and GOES X-ray data into alerts for satellite operators, aviation and power grids.
- Satellite operations: flares and storms raise drag on low-orbit satellites and cause single-event upsets; operators adjust orbits and safe-mode spacecraft based on forecasts.
- Foundation models: pretrained models on SDO data (for example Surya) are fine-tuned for flare forecasting, solar-wind prediction and EUV spectral reconstruction.
- Instrument calibration with ML: models trained on SDO channels have been used to estimate degradation and to synthesise missing channels.
References
- J. Lemen et al. (2012). “The Atmospheric Imaging Assembly (AIA) on the Solar Dynamics Observatory.” Solar Physics 275.
- P. Scherrer et al. (2012). “The Helioseismic and Magnetic Imager (HMI) investigation for the Solar Dynamics Observatory.” Solar Physics 275.
- M. Bobra and S. Couvidat (2015). “Solar flare prediction using SDO/HMI vector magnetic field data with a machine-learning algorithm.” ApJ 798.
- R. Galvez et al. (2019). “A machine-learning data set prepared from the NASA Solar Dynamics Observatory mission.” ApJS 242.
- The SunPy Community (2020). “The SunPy Project: open source development and status of the version 1.0 core package.” ApJ 890.
- P. Snodgrass and R. Ulrich (1990). “Rotation of Doppler features in the solar photosphere.” ApJ 351.