A hard disk drive that includes a disk that contains at least one signal
and a head that is coupled to the disk. The disk drive also contains a
circuit that includes a data sampler that generates a plurality of data
samples from the signal, a harmonic sensor coupled to the data sampler
and a spectral power accumulator coupled to the harmonic sensor. The
harmonic sensor accumulates the data samples. The circuit includes a
window generator that determines a window length of the data samples
accumulated by the harmonic sensor. The spectral power accumulator
accumulates the windows of sample data accumulated by the harmonic
sensor. The sample data accumulated by the spectral power accumulator can
be accessed by a processor that performs a spectral analysis of the data.