Modeling and Characterization of X-ray Image Detectors