A robotics signal notebook asks for peaks that are sufficiently prominent and sufficiently far apart. It returns fewer events than an analyst expected, even though the missing peak would pass the prominence threshold. The discrepancy can come from the order of filtering: a nearby taller peak can remove that candidate during spacing selection, then fail a later prominence check itself.

This article isolates that behavior in an invented eleven-sample signal. It is not a vibration record, fault diagnosis, or event-rate measurement from a robot. The example was independently executed with Python 3.14.7, NumPy 2.5.2, and SciPy 1.18.1. The official SciPy pages inspected for the function contracts are labeled 1.18.0.

Declare the samples and the intended comparison

Use sample values [0, 20, 15, 9, 9, 9, 9, 10, 0, 8, 0], with zero-based indices zero through ten. These values are dimensionless. The local maxima are at indices one, seven, and nine, with heights twenty, ten, and eight. The flat run of nines does not form an additional local maximum because the adjacent values rise above it.

The experiment compares three calls on this unchanged signal: find_peaks with distance=4, with prominence=5, and with both arguments together. Four means four sample-index positions of separation. It is not four seconds, a physical clearance, or a frequency until an application supplies the relevant sampling interpretation.

Height and prominence answer different questions

The three peak heights alone do not determine their prominences. The prominence calculation uses a surrounding contour level. For the peak at index seven, the left base occurs at index six with value nine, while the right base at index eight has value zero. The higher of those base values is nine, so this peak's prominence is ten minus nine, or one.

For the peak at index nine, both bases have value zero: the left is index eight and the right is index ten. Its prominence is eight. Thus this shorter peak is more prominent than the peak at index seven under the calculation used here. Its lower absolute height does not imply a lower prominence.

The peak at index one has height twenty and prominence twenty in the executed fixture. Its reported bases are indices zero and eight, both at zero. Together the three prominences are [20, 1, 8]. The calculation uses the original signal with no wlen restriction; these values should not silently be carried over to a different evaluation window or altered trace.

Trace spacing before the later rejection

SciPy documents distance selection before prominence selection in find_peaks. Its spacing step removes smaller competing peaks until the required separation is satisfied. Here peaks seven and nine are only two samples apart, below the requested four. Peak seven is taller, so the distance-only call retains seven and removes nine. Peak one remains, giving indices [1, 7].

The combined call then applies the prominence threshold to the surviving candidates. Peak seven has prominence one and fails the requested minimum five. Peak one passes. The final result is [1]. Peak nine does not return when seven is rejected: it was already removed during the earlier stage.

This sequence explains the empty region in the report without assuming that the prominence calculation for peak nine was wrong. The final output can omit a prominent peak because that peak competed with a candidate that did not survive every later condition. A list of requested conditions does not necessarily express the same procedure as applying those conditions in a different order.

Compare a different, explicitly declared policy

The prominence-only call on the original samples retains [1, 9]. Those two indices are eight samples apart, already satisfying a separation of four. Therefore a policy that first selects prominence-qualified candidates and then checks spacing would retain both in this particular example.

That is a different selection policy, not a corrected interpretation of the combined call. The original combined procedure returns one candidate; the explicitly staged comparison returns two. Which policy matches a robotics monitoring question depends on what the candidates mean and how conflicting events should be chosen.

For this two-survivor comparison, checking their original index difference is sufficient. A general signal with many eligible candidates needs an explicit conflict-resolution rule, including priority and ties. The example does not supply a universal peak-selection algorithm or claim that prominence-first filtering is always preferable.

Preserve the original signal when diagnosing exclusions

An informative diagnostic record retains all local peak indices and their measured properties before applying a final selection policy. In this fixture, an open prominence interval, prominence=(None, None), returns the original candidate prominences without using prominence to discard them. Running this diagnostic without a distance constraint preserves all three candidate identities for comparison.

Do not replace the signal with the short list [20, 10, 8] and run the same peak-finding call again as though it were equivalent. That compressed list changes neighbors, sample coordinates, and the surrounding baselines. It no longer represents the eleven-sample problem, and its spacing no longer uses the original index gaps.

Similarly, deleting the sample at index seven would alter the signal rather than merely removing a candidate from consideration. The staged comparison above leaves every original sample in place and changes only which candidate records remain eligible. Keeping that distinction explicit prevents a diagnostic rewrite from changing the phenomenon being explained.

Record why each candidate left the selection

For the combined run, the useful audit record is specific: candidate nine was removed by the spacing stage because of nearby candidate seven; candidate seven later failed prominence; candidate one survived. For the prominence-first comparison, seven was rejected first, and the remaining pair already met the required spacing.

These explanations are more informative than a final event count alone. They also keep interpretation separate from numerical selection: neither count proves the number of physical impacts, completed cycles, or faults. A robotics analysis report should state the signal, sampling convention, property definitions, and selection order before attaching an operational meaning to the returned indices.

Sources checked November 10, 2026:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html

https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.peak_prominences.html

The dedicated image is an AI-generated concept illustration of the two selection orders for the original candidate set. It is not a measured waveform or a robot fault diagnosis.