CdZnTe Detectors for Astrophysical and Medical Applications