📦 Archived documentation: r1 (committed 2026-07-24) View current documentation →
Available on: Flexs Q5C

scope.getAmplitudes()

scope.getAmplitudes(freqs, [binWidth], [aggregation]) → object

Extracts amplitudes at named fault frequencies or frequency bands from the most recent FFT.

Reads amplitudes out of the most recent capture's spectrum and returns an object with the same keys as the input, ready to assign to an io group for datalogging.

Each entry in freqs maps a label to either:

  • a single frequency in Hz — read using the default binWidth and aggregation; or
  • an array [fMin, fMax, aggregation] — a band, e.g. [3500, 12000, "RMS"] or [3500, 24000, "AVG"].

Each label also automatically creates a marker on the FFT amplitude chart for the associated capture.

Bearing fault frequencies. Fault frequencies are usually derived from the measured RPM using the bearing's geometry coefficients, e.g. for a Link-Belt F-B22463H:

function getFaultFrequencies(rpm){
  return {
    "Fundamental":        rpm/60,
    "Fundamental Train":  0.0071*rpm,
    "Inner Ring Defect":  0.1717*rpm,
    "Outer Ring Defect":  0.1283*rpm,
    "Roller Defect":      0.0548*rpm,
    "Pelton Cup":         rpm/60*16,
    "Generator Pole":     rpm/60*10,
  };
}

Arguments

NameTypeRequiredDefaultDescription
freqs object yes Map of "label": frequencyHz or "label": [fMin, fMax, aggregation] entries.
binWidth number optional 3 Width in FFT bins used for entries given as a single precise frequency.
aggregation string optional "MAX" Default aggregation for single-frequency entries: "MAX", "AVG" or "SUM" (bands may also use "RMS").

Returns

object Same keys as freqs, with the measured amplitude for each.

Example

let amplitudes = scope.getAmplitudes(getFaultFrequencies(rpm),
                                     2,       // bins wide per precise frequency
                                     "MAX");  // aggregation: "MAX","AVG","SUM"

// band amplitudes for lubrication film health
let hf = scope.getAmplitudes({ lubricationFilm: [3500, 24000, "AVG"] });

amplitudes.speed = rpm;                    // datalog the speed too
for(let i in hf){ amplitudes[i] = hf[i]; } // merge the hf measurements
io["Front Bearing"] = amplitudes;          // everything in io is logged