Code and data
Every figure and every measured number in the course is produced by the Python files below from free, public data. All searches end on 21 November 2026, so a re-run returns the same scenes. Nothing is downloaded whole: each scene is a cloud-optimised GeoTIFF, and only the small window needed is read.
- build_figures.py – builds the eight figures and writes the measured numbers
- sarlib.py – search and windowed reads from the Planetary Computer STAC API
- figures_facts.json – the measured values quoted in the text (dates, backscatter, counts, every detection)
- build_iceye_figs.py – lesson 13: the two ICEYE comparison figures, and iceye_facts.json
- build_course_figs.py – lessons 2, 3, 4, 7 and 12: image formation, C-band against L-band, decibels, the dual-polarisation composite, coherence and phase, plus two assessment images; numbers in course_facts.json
- build_unseen.py – the four final-assessment images from places the lessons never show (Leipzig, the Bernese Alps, Bremerhaven); every answer is taken from data (land cover, orbit metadata and a slope test, the water mask), numbers in unseen_facts.json
- annotate_figs.py – the labelled teaching copies of figures 4, 5 and 14; check_geometry_points.py tests each label in figure 4 against the elevation model
- make_exercise_crops.py and make_assessment_imgs.py – crops of the published figures for the exercise and the lettered assessment images
- iceye_lib.py – reads the ICEYE ground range file and puts it on the map with the RPCs supplied in it
- cache/osm_hh.json – the OpenStreetMap outlines used in figure 10, saved so a re-run draws the same ones
Run it
pip install pystac-client planetary-computer rasterio matplotlib pyproj scipy numpy python build_figures.py python build_iceye_figs.py python build_course_figs.py python make_exercise_crops.py python make_assessment_imgs.py python build_unseen.py python annotate_figs.py
Data
- Sentinel-1 RTC (radiometrically terrain corrected, gamma0) –
sentinel-1-rtc. Sentinel-1 RTC: Microsoft Planetary Computer, processed by Catalyst, CC BY 4.0. - Sentinel-1 GRD (not terrain-corrected; used once, for panel B of figure 4, geocoded with a polynomial fit to its own tie points) –
sentinel-1-grd - Sentinel-2 Level-2A true colour –
sentinel-2-l2a - Copernicus DEM GLO-30 –
cop-dem-glo-30. Elevation: produced using Copernicus WorldDEM-30 © DLR e.V. 2010–2014 and © Airbus Defence and Space GmbH 2014–2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.
All via Microsoft Planetary Computer (planetarycomputer.microsoft.com), free to access. Contains modified Copernicus Sentinel data (2019–2020, 2026).
Lesson 13 adds one scene from the ICEYE Synthetic Aperture Radar (SAR) Open Dataset (© ICEYE) (registry.opendata.aws/iceye-opendata), licensed CC BY 4.0: ICEYE_U1X0DE_20260826T205215Z_10395144_X61_SLH, spotlight, Port of Hamburg, 26 August 2026. It is read straight from the public bucket, with no account. The ground range file carries rational polynomial coefficients (RPCs) instead of a map projection; the script warps it to UTM 32N at the scene’s reference height of 51 m and checks the result against Sentinel-1 by searching whole 10 m shifts for the best correlation (best: about 14 m; not corrected). It also reads the Sentinel-1 incidence angle and heading from the same-day GRD annotation. Outlines © OpenStreetMap contributors (ODbL).
The ship detector, in one paragraph
Water is any pixel whose 20th-percentile VV backscatter (gamma0) over nine dates (orbit 139, 1 Oct to 18 Nov 2026) is below −11 dB, cleaned with a morphological opening and kept only in large connected areas; it is then shrunk by 20 m, about one resolution cell, to keep most quay walls out (some still leak in; the course says so). A target is a group of at least four water pixels brighter than +3 dB gamma0 (an absolute threshold, not relative to the background); fragments within about 40 m are merged. Targets in consecutive images within 40 m of each other are treated as the same target. These are teaching choices, not an operational detector, and the course says where they fail.
Other data
- L-band: ALOS-2 PALSAR-2 annual mosaic, 2021, HH and HV (
alos-palsar-mosaicon Planetary Computer), converted to dB with 10·log10(DN²) − 83.0. The original data have been supplied by JAXA's Global PALSAR-2/PALSAR Mosaic. - Coherence: Global Seasonal Sentinel-1 Interferometric Coherence and Backscatter Data Set (Kellndorfer et al.), tile N53E013, seasonal medians for 1 December 2019 to 30 November 2020, CC BY 4.0, read from the public AWS bucket
sentinel-1-global-coherence-earthbigdata. Stored as coherence × 100. - Land cover, used only to choose the Leipzig tiles and sample places: ESA WorldCover 2021 (
esa-worldcoveron Planetary Computer). Land cover: © ESA WorldCover project 2021 / Contains modified Copernicus Sentinel data (2021) processed by ESA WorldCover consortium, CC BY 4.0. - Sentinel-1 bandwidths for lesson 2 come from the annotation file of the 26 August 2026 GRD over Hamburg, cached by
build_iceye_figs.py.