← All work

Detecting Weak Signal in Noisy Images

Image analysisCalibration
Problem
Turn a stack of camera images into calibrated brightness measurements of a moving target, with error bars measured from the images rather than assumed. Here, the camera is on a telescope and the target is an asteroid.
Methods also apply to
Satellite and drone imagery, remote sensing, and inspection and microscopy images.
Data
A public test set of 143 images of one asteroid, taken over five nights in March 2020 by six Las Cumbres Observatory 0.4-meter telescopes, each with its own camera, at four sites on three continents.
Built
A documented Python pipeline, with each step available as a reusable function, replacing an older workflow built around external programs.
Builds on
A measurement method I published in 2013 and a workflow I developed from 2019 to 2022.
Comparable client project
About 3 to 5 weeks for one dataset (one target over a few nights), including data vetting, a written report, and handover.

Client estimates start from my recorded hands-on time, add a margin for meetings and off-computer work, then add time to vet and reconcile the client’s data, background research, a written report, and handover, counted in 40-hour weeks.

Telescope star field with brighter stars circled in blue, faint sources barely above the noise circled in orange, and the target asteroid in a square
Part of a five-minute exposure from Squint’s test dataset, taken with a Las Cumbres Observatory 0.4-meter telescope in South Africa. Circles mark sources Squint found and measured in this one frame: orange for faint sources, with a signal-to-noise ratio (S/N) under 20 (the faintest about 10), and blue for brighter ones. The square marks the target asteroid. For this figure, each circled source was also checked against cosmic rays, hot pixels, and the glare of bright stars, including a measurement of the same spot in the night’s 14 other exposures.

Measuring a moving target across six cameras and five nights

Any digital image is just pixels: noise, stray bright pixels from cosmic rays, objects you do not care about, and somewhere in there, the target. Here the target is an asteroid, so it sits in a different place in every frame, sky conditions change through the night, and each telescope and camera behaves a little differently. Turning that into a measurement with an honest error bar is most of the daily work in observational astronomy, and doing it by hand does not scale.

Locating and measuring the target in every frame

Squint predicts where the asteroid should be in each frame from its known orbit, finds every compact, point-like object in the image, and measures each one by fitting a model of how its light spreads over neighboring pixels (its point-spread function, the same measure of blur used for microscopes and camera optics). The fit runs in two passes: it first learns the shape of a typical object from the brightest stars, then fits every object with that shape held fixed, which also copes with the slight smear of a moving target. I published the method in a peer-reviewed journal (Sonnett et al. 2013, Publications of the Astronomical Society of the Pacific). Each image’s pixel grid is matched to positions on the sky, and brightness is tied to an absolute scale using dozens of reference stars of known brightness in the same image (from the APASS or SDSS sky surveys).

Measuring calibration error in every frame

Error bars are where pipelines most often cut corners. Squint measures them: in every frame it compares about 40 reference stars with their known brightness, and the spread of those differences becomes that frame’s calibration error, added to the random counting noise in the light itself (photon noise). A few judgment calls stay with a person, such as rejecting frames where the asteroid overlaps a star, and the pipeline makes a cutout of every frame so that review is quick.

Comparing results with the workflow it replaces

Squint replaces the older external programs one for one (its documentation maps each new function to the program it replaces) and gives results consistent with theirs. On the test set, the reference stars line up on a single flat offset across a wide range of brightness, and only the faintest stars, beyond a set cutoff, drift away from it, which is how a sound calibration should behave.

From 143 frames to 81 calibrated measurements

The test set went from 143 frames to 81 calibrated measurements: frames blurred by unsteady air (poor “seeing”) or a star too close to the asteroid were screened out, and every remaining point carries its own uncertainty. In this data the measured calibration error was larger than the counting noise, exactly the part of the error budget that a pipeline assuming its errors would have understated. The calibrated measurements feed directly into SpinDoc’s search for the asteroid’s spin period.

Traceable measurements from other kinds of images

The same steps (removing the background, finding faint objects, fitting their shape, and calibrating against references of known brightness) apply to any measurement made from images that has to be traceable to a reference: satellite and drone imagery, remote-sensing radiometry, and inspection and microscopy images. In each case the honest error bar matters as much as the value. Squint itself was built for, and tested on, telescope images; using it on another imager means replacing its sky-specific steps: forecasting the target’s position from its orbit, matching pixels to sky coordinates, and calibrating against catalog stars.

Tools: Python, astropy, astroquery, photutils, SEP, astrometry.net, PSF photometry, APASS and SDSS calibration

Read the code: Squint on GitHub →