Digital pulse processing techniques for X-ray and gamma ray semiconductor detectors