Python Tool · AstroSURE

AstroSURE

The telescope that denoises itself. A Noise2Noise U-Net trained on pairs of dithered Hubble exposures of the same field: the two frames share the signal but not the noise, so the signal is the only thing the network can learn. No clean reference image exists anywhere in the training, and inference takes seconds, not hours.

Trained on Hubble's own exposure pairs No clean images needed Seconds per frame MIT, free
Arp 70 · HST ACS/WFC

Before and after

Drag across the image to compare. Two 390 s F606W snapshot exposures, the full production chain (cosmic rays, destriping, denoise, drizzle, final 0.75 blend). Both sides share the same absolute display stretch, computed on the input. The whole field runs in about four minutes on a Mac Studio.

Arp 70 after the AstroSURE chain Arp 70 classic drizzle before denoising
Classic AstroSURE
The idea

Trained on the instrument itself

Hubble shoots every field at least twice, dithered, so the archive is full of image pairs that show the same sky with different noise. Noise2Noise (Lehtinen et al. 2018) says that is all you need: train a network to predict one exposure from the other, and the best it can do is output what the two frames have in common. The noise model is not a guess and not somebody else's prior: it is learned from the actual detector.

The road

Nine runs, five failures

Independent normalization drew rings around every star. A perfect validation loss shipped a catastrophic model, twice: checkpoints are now selected by photometric QC, never by the loss curve. And the run that "erased 99.7 % of bright stars" was a broken metric, not a broken model: on raw Hubble frames, 97 % of bright point-like peaks are cosmic rays. Gaia DR3 settled it, the real stars survive at 100 %. The full lab notebook, failures included, is in the repository.

The training data

Each exposure is the target of the other

Two dithered exposures of Arp 70, and their difference: the galaxy cancels out, and what remains (noise, plus each frame's cosmic rays in white and black) is exactly what the network learns to remove. The final training set is 2 140 such pairs across 19 galaxy fields and five filters from the MAST archive.

Two dithered Hubble exposures of the same field and their difference
Method

One tool per defect

A network trained on exposure pairs has a precise blind spot: anything the two exposures agree on. So each defect is handled in the domain where it lives, on the raw detector frames, before any resampling.

1

deepCR

Removes the cosmic rays that pair logic cannot see, with a partner-flux veto per clump so undersampled star cores are not eaten.

2

StripeField

Removes the ACS row bias in detector coordinates, where the stripes are exactly horizontal, before denoising collapses the background.

3

AstroSURE

The 2-channel U-Net denoises each exposure using its partner as the second input. A few seconds per 4096×2048 chip.

4

Drizzle, then blend

The STScI drizzle engine resamples onto the official grid, and the final image is 0.75*denoised + 0.25*original: natural grain, photometry safe.

Raw FLC chip, after deepCR, and after StripeField plus AstroSURE, identical stretch
Arp 70 · 1:1 native resolution

The galaxy, pixel for pixel

A 700 px crop at native HST resolution, raw drizzle against the pure network output. Spiral arms, dust lanes and star-forming knots stay exactly where they are; the grain between them goes. Measured on this field: fine-detail correlation 0.890, star photometry 100.4 % on 21 Gaia DR3 stars.

Nothing here was sharpened or enhanced: the output is the raw linear result of the network, displayed with the same stretch as the input.

Arp 70 galaxy after AstroSURE, 1:1 crop Arp 70 galaxy before denoising, 1:1 crop
Classic AstroSURE
Arp 70 · 1:1 native resolution

The background, pixel for pixel

An empty patch of the same field. These snapshot exposures carry about 14 000 cosmic-ray hits per chip; the chain removes 99.9 % of them without drizzle rejection, along with the detector striping, while the faint background galaxies stay put. Background noise on the pure output drops by a factor of 30 and more.

The model was trained on raw frames, cosmic rays included: a median-style loss learns to ignore what only one exposure sees. Rejection comes free.

Arp 70 background after AstroSURE, 1:1 crop Arp 70 background before denoising, 1:1 crop
Classic AstroSURE

Measured, not promised

Metric (Arp 70)run 5run 8run 9 e20
Fine-detail correlation0.7930.8560.890
HF amplitude preserved82 %84 %86 %
Gaia photometry (median)103.6 %98.2 %100.4 %
Background noise÷40÷36÷32

The production model is run 9, epoch 20, selected by this QC battery, not by validation loss. Thirteen Arp fields ran through the batch with zero per-field tuning.

Honest limits

  • Instrument-specific by design: this checkpoint knows ACS/WFC FLC frames, nothing else. Another camera means downloading pairs and retraining (scripts included).
  • Expects raw detector frames: electrons, cosmic rays present. Not a tool for finished stacks.
  • Individual faint stars can dip a few percent; saturated cores and bleed trails are passed through, not repaired.
  • Collapsing the noise reveals the ~1 % flat-field mottling that was always in the data; the official archive products carry the same amplitude.
Sanity check

Against the official archive product

The MAST DRC of the same visit, on the same pixel grid, at the same absolute stretch, sky level matched. Same objects, same levels, same inter-chip step. Only the noise differs: the chain does not invent a different image, it produces the archive image, cleaner.

Arp 130, official MAST DRC against the AstroSURE chain at identical stretch
The Arp series

Thirteen fields, one batch script

Every pair below shares one stretch: drizzle without, then with AstroSURE. All from HST snapshot program 15446, two 390 s exposures each. The finished versions are on my Astrobin.

Thirteen Arp fields, drizzle without and with AstroSURE at identical stretch per pair
Open source

Code, checkpoints and the lab notebook

The full pipeline, the trained models, and the run-by-run notebook (failures included) are on GitHub under an MIT license. The companion project, denoising with no training data at all, is Deep Image Prior Linear.

View on GitHub The companion: DIPL