← All work

Simulating a Sky Survey to Measure What It Missed

SimulationPipelinesStatistics
Problem
Every detector misses things. Measure what a real survey missed, size by size, so its counts can be corrected. Here, the survey is NASA’s WISE infrared sky survey and the objects are asteroids.
Data
The complete pointing history of NASA’s WISE infrared survey in 2010 (about 1.24 million exposure records over seven months), and simulated populations of asteroids with realistic sizes, orbits, shapes, and spins.
Built
A simulation pipeline whose tests run automatically on every change, a written ledger of 18 effects that can bias the answer, and a machine-learning emulator that reproduces the simulation about 5,000 times faster.
Builds on
My companion tools SynthPop and PyLEADER, which build the simulated asteroid populations.
Performance
Thermal lookup table about 750 times faster than direct calculation, at under 0.2% error; emulator about 5,000 times faster than the full simulation; 10,000 simulated asteroids through a full survey year in about 20 seconds on one processor core.
Comparable client project
About 8 to 11 weeks for one survey, or 11 to 14 weeks including the two companion tools, with 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.

Log-log chart of asteroid counts versus diameter: detected counts fall away below about 3 km, while corrected counts follow the known true population line down to about 1 km
A test with a known answer. A simulated population of asteroids (dashed line) is run through the simulated survey, which detects fewer and fewer of the small ones (orange). Dividing by the simulated detection efficiency recovers the true numbers (blue). Gray points are flagged because too few objects of that size were detected to correct them reliably. Error bars (one standard deviation) combine counting noise in the detections with uncertainty in the simulated detection efficiency.

Correcting survey counts for asteroids nobody saw

Telescope surveys discover hundreds of thousands of asteroids, but they miss objects too: small ones, dark ones, ones in awkward orbits. Any conclusion drawn from a survey catalog silently inherits those blind spots. How do you correct for objects nobody saw?

Simulating every exposure of an infrared sky survey

Simmer runs an entire infrared sky survey in software. It takes simulated asteroids with realistic sizes, orbits, shapes, and spins (built by two companion tools of mine, SynthPop and PyLEADER), and for every exposure the real survey took, it works out where each asteroid was, how warm and bright it was in the infrared, whether it fell on the detector, and whether it would have passed the survey’s own rules for detecting moving objects and linking detections of the same object across exposures. Comparing what went in with what came out gives the detection efficiency: the chance that an asteroid of a given size and orbit was seen. Dividing real counts by that efficiency corrects them.

Diagram of one survey exposure: a coarse circle picks candidate asteroids near the frame, an exact footprint test keeps those inside, and objects in a thin border at the frame edge are dropped
Deciding which simulated asteroids each exposure could have seen. A quick first pass discards objects far from the frame; an exact test against the area each exposure covered follows, and objects within 9 pixels of the edge are dropped, because the survey’s measurements there are unreliable.

The hard part is near the detection threshold, where many effects interact: when the survey happened to look at each part of the sky, how fast an object rotates, its thermal physics, noise, catalog processing rules, and crowding near the Milky Way. Each one is written up in a ledger of 18 systematic effects, with its mechanism, whether it is modeled, and its measured impact, including the ones that turned out to be negligible.

Chart of predicted infrared brightness for simulated asteroids 1 to 50 km across, compared with the survey’s single-exposure detection limit, with error bars: large ones are detected, those near the limit are marginal, and small ones are not detected
Deciding whether each simulated asteroid would have been detected: its predicted brightness, with error bars for the survey’s measurement noise, against the faintest signal a single exposure can detect. Objects at the limit are detected about half the time.

Checking predictions against 17,610 known asteroids

The figure above is the first check: on a population with a known answer, the correction recovers it. A stronger check uses real asteroids. For 17,610 known asteroids, the model predicted the chance that each one made the 2010 survey catalog. The predicted fraction agrees with the actual one to within 0.026 at every size from 2 to 100 km, and 89.7% of individual asteroids are classified correctly. Below 2 km the model still predicts more detections than the survey made, and that gap is tracked as an open item rather than smoothed over.

Speeding up the simulation for millions of objects

Speed matters because the simulation runs over millions of objects. A precomputed lookup table for the thermal calculation is about 750 times faster than computing it directly, with under 0.2% error, and a machine-learning emulator (gradient-boosted trees) reproduces the detection curves of eight asteroid families (groups of asteroids left by the breakup of a single parent body) it never saw in training to within about 0.02 on average, about 5,000 times faster than the full simulation.

Detection-efficiency curves for each asteroid family

Simmer’s product is a detection-efficiency curve for each asteroid family, which turns raw counts into corrected population statistics. Its test suite runs under continuous integration on every change. Science results are being prepared for publication.

Correcting counts from any imperfect detector

Any count made through an imperfect detector needs this correction: how many targets a sensor network missed, by size and location; how many defects an inspection line let through; how many cases a screening program never saw. The method carries over directly: simulate what you cannot observe, inject known objects, and measure what comes back. In defense and remote-sensing terms, this is probability of detection, measured by injection and recovery.

Tools: Python, NumPy, pandas, parallel processing, scikit-learn (gradient-boosted trees), pytest, GitHub Actions CI

Read the code: Simmer on GitHub →