Optimal beat alignment permits the averaging of signals at physiologically corresponding timepoints. Sliding template alignment provides the greatest precision and may be computed by maximizing the dot-product between candidate beats and a template. QRS peak and upstroke fiducial methods are less precise but still used. The P-wave triggered signal averaged ECG requires P-wave alignment, typically with a sliding template approach.