  Charge Transfer Inefficiency (CTI) due to radiation damage above the Earth's
atmosphere creates spurious trailing in Hubble Space Telescope (HST) images.
Radiation damage also creates unrelated warm pixels - but these happen to be
perfect for measuring CTI. We model CTI in the Advanced Camera for Surveys
(ACS)/Wide Field Channel (WFC) and construct a physically motivated correction
scheme. This operates on raw data, rather than secondary science products, by
returning individual electrons to pixels from which they were unintentionally
dragged during readout. We apply our correction to images from the HST COSMOS
survey, successfully reducing the CTI trails by a factor of ~30 everywhere in
the CCD and at all flux levels. We quantify changes in galaxy photometry,
astrometry and shape. The remarkable 97% level of correction is more than
sufficient to enable a (forthcoming) reanalysis of downstream science products,
and the collection of larger surveys.
