A method, including selecting an initial set of electrocardiograph (ECG) signals taken over a single heartbeat of a human subject, the set having respective morphologies to be used as a template for an arrhythmia of the subject, and receiving a subsequent set of ECG signals taken over a subsequent heartbeat of the human subject. The method also includes performing a cross-correlation between the initial set and the subsequent set, so as to generate a correlation coefficient that is a measure of a goodness of fit between geometries of the initial set and the subsequent set, and, when the correlation coefficient exceeds a threshold coefficient, accepting the subsequent heartbeat as having been caused by the arrhythmia.