Reducing CCD data