Dual-polarity pulse processing and analysis for charge-loss correction in cadmium-zinc-telluride pixel detectors.