A computer-implemented method, comprising the steps of: receiving previously-recorded electrograms of a heart of a living subject in a plurality of channels, the electrograms comprising a plurality of beats having morphologic characteristics; automatically placing the beats into respective classifications according to a resemblance of the morphologic characteristics of the beats to members of a set of templates of signal morphologies of different arrhythmias, by calculating respective overall correlations between instances of a selected beat in all the channels and the members of the set of templates, and associating the selected beat with a member of the set of templates having a highest ranked one of the overall correlations when the highest ranked one of the overall correlations exceeds a predefined correlation threshold; wherein for each template, PATTERN i, and each electrogram signal, ECG i,j, wherein ECG i,j denotes the electrogram signal in channel i for the selected beat j, a correlation is calculated by Corr i , j = CORRELATION PATTERN i , ECG i , j wherein CORRELATION x y = ∑ x − x ̅ y − y ̅ x − x ̅ 2 y − y ̅ 2 and wherein each respective overall correlation between instances of the selected beat in all the channels and a member of the set of templates is calculated by ∑ i = 1 N A i , j + B i Corr i , j ∑ i = 1 N A i , j + B i wherein A i,j is the maximum amplitude of the absolute electrogram signal in channel i for the selected beat j and B i is the maximum amplitude of the absolute template i, and N is the number of said plurality of channels; and the method further comprising the step of: generating respective electroanatomic maps of the heart from the beats in the respective classifications. receiving previously-recorded electrograms of a heart of a living subject in a plurality of channels, the electrograms comprising a plurality of beats having morphologic characteristics; automatically placing the beats into respective classifications according to a resemblance of the morphologic characteristics of the beats to members of a set of templates of signal morphologies of different arrhythmias, by calculating respective overall correlations between instances of a selected beat in all the channels and the members of the set of templates, and associating the selected beat with a member of the set of templates having a highest ranked one of the overall correlations when the highest ranked one of the overall correlations exceeds a predefined correlation threshold; calculating respective overall correlations between instances of a selected beat in all the channels and the members of the set of templates, and associating the selected beat with a member of the set of templates having a highest ranked one of the overall correlations when the highest ranked one of the overall correlations exceeds a predefined correlation threshold; wherein for each template, PATTERN i, and each electrogram signal, ECG i,j, wherein ECG i,j denotes the electrogram signal in channel i for the selected beat j, a correlation is calculated by Corr i , j = CORRELATION PATTERN i , ECG i , j wherein CORRELATION x y = ∑ x − x ̅ y − y ̅ x − x ̅ 2 y − y ̅ 2 and wherein each respective overall correlation between instances of the selected beat in all the channels and a member of the set of templates is calculated by ∑ i = 1 N A i , j + B i Corr i , j ∑ i = 1 N A i , j + B i wherein A i,j is the maximum amplitude of the absolute electrogram signal in channel i for the selected beat j and B i is the maximum amplitude of the absolute template i, and N is the number of said plurality of channels; and the method further comprising the step of: generating respective electroanatomic maps of the heart from the beats in the respective classifications. <EOS>