A system, comprising: an electrical interface; and a processor, configured to: receive, via the electrical interface, a signal sensed by at least one electrode in contact with tissue of a heart of a subject, the signal spanning successive time periods that are each of length T1 and including multiple signal points, wherein the time periods include a first time period, a second time period that immediately follows the first time period, and a third time period that immediately follows the second time period, calculate a respective threshold for each time period of the time periods, select a set of points that includes, for each of the time periods, a signal point of greatest magnitude in the time period, provided that the greatest magnitude is greater than the threshold for the time period, wherein the set of points includes a first-period signal point in the first time period and a second-period signal point in the second time period, remove, from the set, one of any pair of the selected points that are within a first interval T2 of one another, T2 being less than T1, and generate an output that is based on the points remaining in the set corresponding to respective electrical activations of the tissue wherein the processor is further configured to: identify a first global extremum of the signal within a second interval T3 from the first-period signal point, and identify a second global extremum of the signal within the second interval from the second-period signal point, and wherein the processor is configured to calculate the threshold for the third time period as a product of (a) a coefficient that is less than one, and (b) a minimum of (i) a first-global-extremum magnitude of the first global extremum and (ii) a second-global-extremum magnitude of the second global extremum. an electrical interface; and a processor, configured to: receive, via the electrical interface, a signal sensed by at least one electrode in contact with tissue of a heart of a subject, the signal spanning successive time periods that are each of length T1 and including multiple signal points, wherein the time periods include a first time period, a second time period that immediately follows the first time period, and a third time period that immediately follows the second time period, calculate a respective threshold for each time period of the time periods, select a set of points that includes, for each of the time periods, a signal point of greatest magnitude in the time period, provided that the greatest magnitude is greater than the threshold for the time period, wherein the set of points includes a first-period signal point in the first time period and a second-period signal point in the second time period, remove, from the set, one of any pair of the selected points that are within a first interval T2 of one another, T2 being less than T1, and generate an output that is based on the points remaining in the set corresponding to respective electrical activations of the tissue receive, via the electrical interface, a signal sensed by at least one electrode in contact with tissue of a heart of a subject, the signal spanning successive time periods that are each of length T1 and including multiple signal points, wherein the time periods include a first time period, a second time period that immediately follows the first time period, and a third time period that immediately follows the second time period, calculate a respective threshold for each time period of the time periods, select a set of points that includes, for each of the time periods, a signal point of greatest magnitude in the time period, provided that the greatest magnitude is greater than the threshold for the time period, wherein the set of points includes a first-period signal point in the first time period and a second-period signal point in the second time period, remove, from the set, one of any pair of the selected points that are within a first interval T2 of one another, T2 being less than T1, and generate an output that is based on the points remaining in the set corresponding to respective electrical activations of the tissue wherein the processor is further configured to: identify a first global extremum of the signal within a second interval T3 from the first-period signal point, and identify a second global extremum of the signal within the second interval from the second-period signal point, and wherein the processor is configured to calculate the threshold for the third time period as a product of (a) a coefficient that is less than one, and (b) a minimum of (i) a first-global-extremum magnitude of the first global extremum and (ii) a second-global-extremum magnitude of the second global extremum. identify a first global extremum of the signal within a second interval T3 from the first-period signal point, and identify a second global extremum of the signal within the second interval from the second-period signal point, and wherein the processor is configured to calculate the threshold for the third time period as a product of (a) a coefficient that is less than one, and (b) a minimum of (i) a first-global-extremum magnitude of the first global extremum and (ii) a second-global-extremum magnitude of the second global extremum.