Alignment
Ref: sharpest of ~40 epochs
EVERY PIXEL, THE SAME PIXEL.
Before you can compare two images, every pixel has to mean the same thing in both. This tutorial covers how the pipeline pins every epoch to one shared pixel grid — the step that makes the difference-imaging in tutorial 03 possible at all. Nine tutorials, read in order — this is the second.
Unlike the Overview page, nothing on this page is invented. This describes the real pipeline — the same one the viewer, survey and cell browsers actually run.
Lining every exposure up
Before you can compare two images, every pixel has to mean the same thing in both.
A star that drifts a few pixels between exposures isn't moving — it's just misaligned. Compare two frames without fixing that first and drift reads as change it isn't.
The grid. One shared frame, not many.
Every epoch is reprojected with astropy's WCS-based reproject library onto a single pixel grid, defined by the sharpest epoch's own coordinate solution.
A fixed star lands on the identical pixel in every frame, whether the exposures are minutes or years apart.
The shortcut. No star-pattern matching.
ZTF frames already ship with a good WCS solution, so there's no need to hunt for matching constellations of stars between frames.
Reprojection can just trust the coordinates each image already carries — a deliberate simplification, worth naming as one.
The proof. Subtract two aligned frames.
Subtract one aligned epoch from another and every static star should cancel to flat gray — no light/dark pairs, no dipoles.
That clean cancellation is the whole test: if alignment worked, the sky goes quiet.
The deep reference, built on alignment
Our reference template is a median stack of the sharpest ~40 epochs, deliberately spread across multiple years rather than clustered in one season.
Epochs from the science frame's own season are excluded by 60+ days — the self-subtraction guard.
The tradeoff. A deeper reference lowers the noise floor and sharpens sensitivity to real change. But push it too far and a genuinely variable source can vanish into its own reference — averaged into the very baseline it's meant to be compared against, self-subtracted out of existence before the subtraction step even runs.
Go watch it run.
Everything above is the real pipeline, explained in the order it runs. The browsers below are that same pipeline's actual output — a working ZTF difference-imaging system, not a mockup of one.
Or read what this project actually is