Spectral Features
GX-TXT DEV112 P011-bis
Extract features from signals and spectra and check that quantities and units in the result match the settings.
GX-TXT P011-bis · module 1.2.0. Spectral Features derives descriptors from an already computed linear spectrum, on uniformly spaced frequencies. The results are a summary and a distribution, reusable as Datasets in the Session.
Generate the signal and the spectrum
- From Session → New Session → Generate Session choose Spectral Features (
spectral_features) and create a Standalone Session. In Datasets openspectral_features.source. Check in Preview and Metadata 4,096 samples ofsignal_Vat 4,096 Hz. - Use FFT Spectrum & Error Analysis with
primary.time_s,primary.signal_V,full_record,rectangular, detrendmeanand the full source without selections. In Run start the FFT and openspectral_features.source.spectrum, contractspectrum.table. FFT procedure. - In Canonical table find
frequency_Hzandamplitude. For computing the descriptors use non-negative linear values. The FFT columnmagnitude_dBccontains relative logarithmic levels.

Bind frequency, ordinate and semantics
From Configuration → Modules → Analysis & Services select Spectral Features, check Health and press Enable module. In Analysis tick Run / recalculate now. In Dataset sources choose spectral_features.source.spectrum as primary. + Add source adds an alias. Remove releases a source or removes an added alias. The module reads one spectrum.
- Frequency
- Bind
primary.frequency_Hz. The variable must have a recognized frequency unit, increasing frequencies and uniform spacing. The optionautoresolves the binding from the canonical data. - Spectral value
- Choose
primary.amplitudein the Generator’s FFT case.autodelegates the choice based on the metadata. The ordinate must be numeric, linear and non-negative. - Input spectral semantics
amplitude, the default, squares the amplitudes before using them as weights.poweruses the per-bin power directly.psduses the power spectral density directly. This last summary adds up the per-bin values without multiplying them by the width in Hz. Use the semantics that matches the measurement of the ordinate.- Exclude DC bin from descriptors
yes, the default, excludes the zero-frequency bin.nokeeps it as part of the distribution. If the signal was centered, its numerical weight is minimal.- Spectral-features result Dataset ID
spectral_features.summaryis the default ID of the summary. The distribution uses the suffix.distribution. Change the ID to save several cases in the Session.

Use already scaled power or density
To compare the other semantics use the per-bin power and PSD CSV (ZIP), derived from the same Generator series. The preparation script (ZIP) reads the source CSV and produces a one-sided transform with a rectangular window and the mean removed. In Acquisition → Generic CSV add the file, set spectrum.table and open Variables in the queued row. In Unit assign, respectively, Hz, V^2 and V^2/Hz. In the field Semantic role uses frequency, power and psd. Go back to Acquisition and choose Import current.
Select the new Dataset as primary, keep Frequency on frequency_Hz and choose bin_power_V2 with power or psd_V2_per_Hz with psd. Set no to include DC and use distinct IDs. On a uniform grid, dividing all weights by the same bin width leaves the relative descriptors unchanged. The test with DC included produced 2,049 bins in both cases. The centroid is about 176.19 Hz and the numerical sum of the weights is 0.65625 on this 1 Hz grid. The report assigns V² to power and V²/Hz to PSD.

Interpret the published values
Open Run, update the plan and start the selective analysis. In Results open spectral_features_report.txt. For the amplitude with DC excluded the test counted 2,048 bins at a 1 Hz step, found the dominant frequency at 100 Hz and a centroid at about 176.19 Hz. The cumulative frequencies at 5%, 50%, 85% and 95% are 100, 100, 300 and 300 Hz. The 90% occupied bandwidth is 200 Hz.
- Dominant, centroid, RMS, bandwidth
- The dominant frequency is the first bin that reaches the maximum weight. Centroid, RMS frequency and standard deviation describe the position and spread of the weighted distribution.
- Quantiles and occupied bandwidth
- Searches for the first bin where the cumulative weight reaches each threshold. The 90% occupied bandwidth is the difference between the 95% and 5% quantiles.
- Flatness, crest and entropy
- Flatness compares the geometric and arithmetic means of the weights. Crest compares maximum and mean. Normalized entropy measures how evenly the weights are spread across the bins. Dominant peaks reduce the uniformity of the distribution.
- Sum of the weights
- Read it together with the units. For the PSD, a physical integration requires the frequency step.
In Datasets select the summary and .distribution. Use Preview, Metadata and Canonical table to review descriptors, frequencies, weights, fraction and cumulative. In Plots open the relative levels in dB (01_relative_power_db), the percentage fraction per bin (02_normalized_power_percent) and the cumulative percentage (03_cumulative_power_percent). Look for the persistent variants Plot p… to customize the plot with Presentation → Title and labels…. Save, regenerate with Render → Rerender, then use Graph → Open PNG 1:1.

