sherlockpipe.scoring.helper.harmonic_spectrum

sherlockpipe.scoring.helper.harmonic_spectrum(periods, spectrum)

Compute a harmonic spectrum by averaging SDE at harmonic periods.

For each period in the input grid, the average SDE at harmonic ratios (1/4, 1/3, 1/2, 1, 2, 3, 4) is computed to detect harmonic patterns.

Parameters

periodsndarray

The array of periods from the search grid.

spectrumndarray

The SDE/power spectrum values corresponding to each period.

Returns

ndarray

The harmonic spectrum with the same length as the input periods.