Identifying characteristic patterns in time series, such as heartbeats or brain responses to a stimulus, is critical to understanding the physical or physiological phenomena monitored with sensors. Convolutional sparse coding (CSC) methods, which aim to approximate signals by a sparse combination of short signal templates (also called atoms), are well‐suited for this task. However, enforcing sparsity leads to non‐convex and untractable optimization problems. This article proposes finding the optimal solution to the original and non‐convex CSC problem when the atoms do not overlap. Specifically, we show that the reconstruction error satisfies a simple recursive relationship in this setting, which leads to an efficient detection algorithm. We prove that our method correctly estimates the number of patterns and their localization, up to a detection margin that depends on a certain measure of the signal‐to‐noise ratio. In a thorough empirical study, with simulated and real‐world physiological data sets, our method is shown to be more accurate than existing algorithms at detecting the patterns' onsets.