Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
The following is from the Daqarta Help system:

# Spectrum Cursor Ratio

Controls: Spectrum Dialog >> Ratio
Macro: SpectRatio

When the Ratio option is active, the Delta X cursor readout shows the ratio of the frequencies at the two cursors. The ratio is always given as the higher over the lower frequency, regardless of which cursor is at which frequency.

You can toggle the Ratio option at any time via the ALT+5 accelerator key. As a reminder, note the % symbol appears on the top-row '5' key.

By placing one cursor on the fundamental peak and the other on any higher peak, the ratio gives you the harmonic number. Note that this might not be an integer, even if the true harmonic ratio is exact. In general, without using Peak interpolation, you will only get an integer ratio if the fundamental frequency falls on an exact submultiple of the sample rate. If you are measuring harmonics produced as a response to a stimulus being created by the Generator, you can assure this by using the Step Lines frequency entry mode.

The best way to improve Ratio accuracy without the above Step Lines approach is to use the Peak interpolation option, which will increase the frequency resolution by a factor of 50 or more.

Otherwise, if you have reason to believe the harmonics are exact (such as when measuring the distortion of an amplified sine wave), you can just round the readout value.

Note, however, that many physical systems have "harmonics" that are not exact integers. Plucked or struck strings, as in guitars or pianos, tend to have a second harmonic (in particular) that is slightly different from a 2.00 ratio. In the case of a single plucked guitar string, you can tell that this is the case by looking at the waveform as the note decays. If the note had perfect integer harmonics, you would see a constant wave shape that only decayed in amplitude. In reality, you will see a little bump of second harmonic that seems to roll through the fundamental wave, due to the slight ratio difference.

You can toggle the Ratio option at any time via the ALT+5 accelerator key. As a reminder, note the % symbol appears on the top-row '5' key.

Note that you can use the Spectrum Track Harmonic option to automatically position the solid cursor on the fundamental and the dotted cursor on a selected harmonic number.

Macro Notes:

SpectRatio=1 sets Spectrum Cursor Ratio mode, SpectRatio=0 turns it off, and SpectRatio=x toggles between on and off.

GO: