A method (500) can comprise performing principal component analysis (PCA) on data corresponding to a subset of a plurality of signals and a selected template to generate a virtual lead and an optimized template (530). The method can also comprise calculating a cross correlation on the virtual lead and the optimized template to determine a strength of linear dependence between the virtual lead and the optimized template to determine regions of interest (ROIs) of the virtual lead (540). The method can further comprise detecting peak correlation coefficients in the virtual lead (550). The method can still further comprise comparing the amplitude of each of the ROIs of the virtual lead with the selected template to determine an error between the template and each ROI of the virtual lead (560). The method can yet further comprise averaging the ROIs to generate averaged data (570).