An apparatus, comprising: a probe having a plurality of electrodes and adapted for insertion into a heart of a living subject; and a processor, which is configured to receive an electrical signal from the electrodes and to perform the steps of: recording electrograms from the electrodes concurrently at respective locations in the heart; delimiting respective activation time intervals in the electrograms; generating a map of electrical propagation waves from the activation time intervals, comprising: segmenting the electrograms into a series of frames at respective times, wherein each frame includes respective assignments of the electrogram readings to a matrix of values; assigning local activation times for the electrodes based on respective electrograms; modelling at least a portion of the heart as a triangular mesh having vertices, each vertex corresponding to the location of a respective electrode; determining conduction velocities of electrical propagation between the vertices from the frames based on the assigned local activation times; maximizing coherence of the waves by adjusting local activation times within respective activation time intervals of the electrograms, comprising: representing the conduction velocities as conduction velocity vectors (135, 137) of respective triangles (129, 131) of the triangular mesh; computing velocity deviation vectors (v d) at respective vertices from the conduction velocity vectors of triangles connected to the vertex; and minimizing a length of the velocity deviation vector (v d); and reporting the adjusted local activation times. a probe having a plurality of electrodes and adapted for insertion into a heart of a living subject; and a processor, which is configured to receive an electrical signal from the electrodes and to perform the steps of: recording electrograms from the electrodes concurrently at respective locations in the heart; delimiting respective activation time intervals in the electrograms; generating a map of electrical propagation waves from the activation time intervals, comprising: segmenting the electrograms into a series of frames at respective times, wherein each frame includes respective assignments of the electrogram readings to a matrix of values; assigning local activation times for the electrodes based on respective electrograms; modelling at least a portion of the heart as a triangular mesh having vertices, each vertex corresponding to the location of a respective electrode; determining conduction velocities of electrical propagation between the vertices from the frames based on the assigned local activation times; maximizing coherence of the waves by adjusting local activation times within respective activation time intervals of the electrograms, comprising: representing the conduction velocities as conduction velocity vectors (135, 137) of respective triangles (129, 131) of the triangular mesh; computing velocity deviation vectors (v d) at respective vertices from the conduction velocity vectors of triangles connected to the vertex; and minimizing a length of the velocity deviation vector (v d); and reporting the adjusted local activation times. recording electrograms from the electrodes concurrently at respective locations in the heart; delimiting respective activation time intervals in the electrograms; generating a map of electrical propagation waves from the activation time intervals, comprising: segmenting the electrograms into a series of frames at respective times, wherein each frame includes respective assignments of the electrogram readings to a matrix of values; assigning local activation times for the electrodes based on respective electrograms; modelling at least a portion of the heart as a triangular mesh having vertices, each vertex corresponding to the location of a respective electrode; determining conduction velocities of electrical propagation between the vertices from the frames based on the assigned local activation times; segmenting the electrograms into a series of frames at respective times, wherein each frame includes respective assignments of the electrogram readings to a matrix of values; assigning local activation times for the electrodes based on respective electrograms; modelling at least a portion of the heart as a triangular mesh having vertices, each vertex corresponding to the location of a respective electrode; determining conduction velocities of electrical propagation between the vertices from the frames based on the assigned local activation times; maximizing coherence of the waves by adjusting local activation times within respective activation time intervals of the electrograms, comprising: representing the conduction velocities as conduction velocity vectors (135, 137) of respective triangles (129, 131) of the triangular mesh; computing velocity deviation vectors (v d) at respective vertices from the conduction velocity vectors of triangles connected to the vertex; and minimizing a length of the velocity deviation vector (v d); and representing the conduction velocities as conduction velocity vectors (135, 137) of respective triangles (129, 131) of the triangular mesh; computing velocity deviation vectors (v d) at respective vertices from the conduction velocity vectors of triangles connected to the vertex; and minimizing a length of the velocity deviation vector (v d); and reporting the adjusted local activation times.