  We present a method designed to efficiently extract optical signals from
InGaAs avalanche photodiodes (APDs) operated in gated mode. In particular, our
method permits an estimation of the fraction of counts which actually results
from the signal being measured, as opposed to being produced by noise
mechanisms, specifically by afterpulsing. Our method in principle allows the
use of InGaAs APDs at high detection efficiencies, with the full operation
bandwidth, either with or without resorting to the application of a dead time.
As we show below, our method can be used in configurations where afterpulsing
exceeds the genuine signal by orders of magnitude, even near saturation. The
algorithms which we have developed are suitable to be used either in real-time
processing of raw detection probabilities or in post-processing applications,
after a calibration step has been performed. The algorithms which we propose
here can complement technologies designed for the reduction of afterpulsing.
