Characterization of CCD-based imaging X-ray detectors for diffraction experiments