A non-transitory computer readable storage medium comprising computer executable instructions which when executed by a computer cause the computer to perform a method of improving time-resolved emission (TRE) waveforms representing an electronic device, wherein the TRE waveforms represent photons detected by a photodetector at respective scan locations on the electronic device, the method comprising:
- obtaining a list of the scan locations, wherein each scan location corresponds to a pixel of interest;
- constructing a first waveform for an initial one of the scan locations, wherein the first waveform represents a measurement of the photons detected by the photodetector at the initial one of the scan locations;
- constructing a second waveform by combining a measurement of the photons detected at a subsequent location in the list of scan locations and those used in constructing the first waveform;
- and
- advancing to a next location in the list of scan locations and updating the first waveform to be equal to the second waveform upon determining that a signal-to-noise ratio of the first waveform is less than or equal to a signal-to-noise ratio of the second waveform.