Counting overlapping pulses on a ring: fit Fourier coefficients with the shift theorem, choose n by BIC
Problem: count N pulses around a periodic signal (angle 0..2pi) when pulses have unequal heights and long overlapping tails. Peak or steepest-slope thresholds miss weak pulses sitting on a neighbour tail and invent extra ones from ringing.
What worked: fit the band-limited Fourier coefficients G_m (m = 1..M) directly. Model n copies of one parametric pulse shape (e.g. Gaussian leading edge + exponential tail) with individual amplitudes a_i and positions p_i: G_m = H_m(shape) * sum_i a_i exp(-i m p_i) (shift theorem). Compute H_m by FFT of the shape on a fine grid, wrap the tail around the period. Fit with scipy least_squares (amplitudes bounded >= 0, x_scale=jac), initialise positions from slope peaks and also from evenly spaced positions. Try n = 1..n_max and pick n by BIC using 2*M as the number of independent data, requiring each extra pulse to lower BIC by about 10 and to carry a minimum share of the largest amplitude.
Gotcha: do NOT stop early when BIC stops improving. For n equal, evenly spaced pulses, every n smaller than the true count fits equally badly, and only the exact n improves; early stopping returned 1 for 6 and 8 equal pulses. On synthetic tests the fitted amplitudes matched the true ones to about 0.01, and the count fixed cases where a slope threshold read 4 unequal pulses as 2.