Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Discrete Fourier Transform (DFT) represents a finite set of samples as complex coefficients at discrete frequencies. Each coefficient has magnitude and phase, but its plotted height is not automatically a calibrated signal amplitude, power, or power spectral density (PSD). To interpret a DFT correctly, first establish the sampling rate and record length, then identify the frequency axis, normalization, window, and whether the display is one-sided or two-sided.

The Fast Fourier Transform (FFT) is an efficient algorithm for calculating the same DFT, not a different transform. SciPy’s FFT documentation defines its output as the DFT; NumPy’s FFT documentation describes its complex magnitude and phase.

What a DFT coefficient tells you

For an N-sample sequence x[n], the DFT is X[k] = Σ x[n]e−j2πkn/N, for k = 0, …, N−1. It compares the finite record with a set of complex sinusoids. Each output coefficient has a real part, an imaginary part, a magnitude |X[k]|, and a phase angle arg X[k]. The real and imaginary parts express cosine- and sine-like contributions at that frequency; magnitude indicates the strength of the coefficient and phase its offset relative to the chosen time origin.

A DFT is a frequency-grid representation of the record you supplied. It does not, by itself, prove that the indefinitely continuing physical signal consists of exactly those discrete sinusoids. Finite observation, noise, frequency drift, windowing, and sampling all affect what appears in the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Map bin numbers to physical frequencies

For a uniformly sampled record with sampling rate Fs and N samples, the unshifted DFT bin k corresponds to fk = kFs/N, with bin spacing Δf = Fs/N. Since the record duration is T = N/Fs, this spacing is also 1/T. The frequency vector must use the actual sampling rate: an array indexed by k is not a frequency axis until converted.

  • Increasing Fs while holding N fixed increases bin spacing, because the same number of samples covers less time.
  • Increasing N while holding Fs fixed lengthens the observation and reduces bin spacing.
  • Choose an observation long enough to capture the low-frequency behavior and distinguish the components of interest, but short enough that changing conditions are not averaged together.

For an even-length, unshifted transform, bins run from DC through positive frequencies to the Nyquist frequency, then continue as negative frequencies. Use a frequency helper such as SciPy’s fftfreq rather than guessing the ordering. For real-valued input, the negative-frequency half is redundant: X[N−k] = X[k]*. A real-input transform such as rfft returns only the nonredundant nonnegative portion; rfftfreq supplies its matching frequency bins. A centered two-sided plot instead places negative frequencies to the left, DC at the center, and positive frequencies to the right.

DC is the 0 Hz bin. For even N, Nyquist is Fs/2; it is the highest uniquely represented frequency for ordinary uniform sampling. Components above Nyquist can alias into the sampled band, and windowing cannot reverse that. Check that the sample rate and any anti-alias filtering suit the signal before assigning physical meaning to a peak.

Read magnitude and phase with the right qualifications

Magnitude is not automatically amplitude

The raw FFT magnitude |X[k]| generally scales with N. A common basic amplitude convention divides by N. For a one-sided spectrum of real data, double interior positive-frequency bins to account for their negative-frequency partners, but do not double DC or, for even N, the Nyquist bin. This convention is for sinusoidal amplitude interpretation, not a universal normalization for arbitrary windows or PSDs. MathWorks’ FFT example demonstrates N normalization and one-sided doubling of the interior bins.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a rectangular-window record, a basic one-sided amplitude calculation is:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
A = abs(rfft(x)) / N
if N % 2 == 0:
    A[1:-1] *= 2
else:
    A[1:] *= 2

With other windows, account for coherent gain when measuring tone amplitude. Peak amplitude and RMS amplitude are also different quantities: for an isolated sinusoid, RMS amplitude is peak amplitude divided by √2. Do not compare raw FFT heights across record lengths, windows, or scaling conventions as if they were directly comparable.

Phase needs a usable signal level and reference

Phase is φ[k] = arg X[k]; in Python, it is commonly obtained with np.angle(X). It is meaningful only when the corresponding magnitude is sufficiently above the noise floor. Near a spectral null or below the floor, small changes can swing the phase substantially. Phase commonly wraps at ±π, so a plotted jump may be a wrap rather than a physical discontinuity; phase unwrapping can help when a continuous trend is relevant.

A delay τ contributes a phase slope of approximately φ(f) = −2πfτ. Estimating delay therefore requires a consistent phase trend or cross-phase, not simply reading one coefficient. Absolute phase depends on the time origin and preprocessing. For comparing two measured signals, cross power spectral density and coherence are often more informative than two separate phase plots; SciPy provides csd and related signal-analysis functions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Interpret DC and low-frequency energy

The DC coefficient is X[0] = Σx[n]; after ordinary 1/N amplitude normalization, it represents the sample mean. A large low-frequency feature can reflect a real offset, sensor bias, drift, or a trend across the record. Inspect the time-domain data and its mean before removing anything. Detrend only when the analysis concerns fluctuations or AC content rather than the absolute level, and record that choice.

SciPy’s periodogram and Welch interfaces document constant detrending as a default, with options to disable or customize detrending. A default is not a substitute for deciding whether the mean or trend is part of the measurement.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Why a tone spreads across bins: leakage and windows

A finite record is a truncated observation. If a tone does not complete an integer number of cycles in the record, its endpoints do not align with the DFT’s periodic extension. Energy then spreads into neighboring bins, an effect called spectral leakage. One tone can consequently appear as a broad lobe or several bins rather than a single isolated spike.

Windowing multiplies the record by weights before the transform: xw[n] = x[n]w[n]. A window reduces some sidelobes but broadens the main lobe, trading leakage suppression against the ability to distinguish nearby tones. Bin spacing alone does not tell you whether two components can be resolved; window shape, signal-to-noise ratio, and their separation matter too. SciPy’s spectral-analysis guide explains this window trade-off.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Window Useful when Trade-off
Rectangular (boxcar) The record is coherent and tones align with bins; it has a narrow nominal main lobe. High sidelobes can spread substantial leakage when alignment is poor.
Hann A general-purpose compromise is needed for amplitude or PSD analysis. Its main lobe is wider than rectangular’s, and tone amplitude needs gain correction.
Hamming Lower nearest sidelobe than rectangular is useful. Its resolution and sidelobe behavior differ from Hann’s; it is not a universal improvement.
Blackman Strong sidelobe suppression is more important than separating close tones. Its wider main lobe makes nearby tones harder to distinguish.
Flat-top Amplitude accuracy for isolated tones is the priority. Its very wide main lobe is poor for resolving nearby frequencies.
Kaiser An adjustable sidelobe-versus-main-lobe compromise is useful. The parameter must be chosen for the measurement goal.

For weak tones near strong ones, prioritize sidelobe suppression; to separate close tones, favor a narrower main lobe and a sufficiently long record. For broadband noise, use a PSD estimate with appropriate window and bandwidth scaling rather than treating a windowed FFT height as power. A window redistributes the effects of finite observation; it does not add information to the record or eliminate the finite-record limit.

Distinguish frequency grid density from resolution

Zero-padding appends zeros to the record before computing a longer FFT. It gives more closely spaced plotted samples, Δfgrid = Fs/NFFT, and can make a peak easier to locate or interpolate visually. It adds no measured samples, does not lengthen the observation, and does not narrow the window’s main lobe. Thus it does not, on its own, improve the ability to resolve two nearby tones. MathWorks describes zero-padding as interpolation of the Fourier transform with finer frequency spacing in its FFT documentation.

Keep three ideas separate: bin spacing is the spacing of the displayed frequency grid; resolving power is limited chiefly by observation duration and the chosen window; estimation accuracy is how precisely a model or peak location can be inferred. With high SNR and an isolated tone, interpolation or parametric estimation can sometimes estimate frequency more finely than the bin spacing. That does not mean two close components are necessarily resolved. MathWorks’ zoom-FFT discussion relates spacing to frame length and notes the difficulty of discriminating closely spaced tones.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Know whether the plot is amplitude, power, or PSD

A squared-magnitude quantity is power-like, but the exact units depend on normalization and windowing. A PSD describes power per unit frequency, such as V²/Hz, so band power is obtained by integrating the density over frequency (or summing with the corresponding frequency increment). A power spectrum has different units and interpretation: it represents power associated with discrete frequencies or bins. Do not call a plot a PSD unless the calculation uses density scaling.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SciPy distinguishes scaling='density', typically with units such as V²/Hz, from scaling='spectrum', typically with units such as V², in its periodogram and Welch documentation. MathWorks likewise distinguishes a mean-square spectrum from a PSD, where power is represented by area over a band; see its spectrum documentation.

For decibels, use 20 log10 of an amplitude ratio and 10 log10 of a power or PSD ratio. State the reference level when reporting dB values. A tall, narrow PSD feature is not directly a voltage amplitude; integrate its power over the relevant band or use a tone-amplitude calculation with documented normalization.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose an estimator for the signal and question

Periodogram for a finite-record view

A periodogram is a direct estimate from one record. It is useful for a straightforward finite-record spectrum or for examining coherent tones, but its noise estimate can vary substantially from one record to another. Window, detrending, scaling, and one-sided/two-sided choices affect the result.

Welch for a steadier noise estimate

Welch’s method divides data into overlapping segments, windows each segment, calculates modified periodograms, and averages them. Averaging generally smooths random variation in the noise floor, but shorter segments reduce effective frequency resolution. Segment length, overlap, window, FFT length, detrending, scaling, and averaging method all matter. Consult the installed SciPy version’s documentation for defaults rather than assuming they are invariant.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Time-frequency methods for changing content

A single DFT summarizes the selected record and does not say when a component occurred. For nonstationary signals, use a short-time Fourier transform (STFT) or spectrogram, a wavelet transform, order tracking for rotating machinery, or an analytic-signal method for suitable narrowband signals. The STFT’s short windows improve timing but worsen frequency discrimination; long windows do the reverse. SciPy lists spectrogram and STFT tools, and MathWorks describes the STFT for changing frequency content.

Multitaper or parametric methods can be appropriate for specialized leakage, variance, or resolution goals, but are not automatic upgrades for every spectrum. Select an estimator based on whether the record is stationary, whether transient timing matters, and whether the priority is tone measurement or a stable noise-floor estimate.

A reproducible Python workflow

First verify uniform sampling, units, sample rate, and record integrity. Inspect for missing or duplicated samples, clipping, saturation, invalid values, offset, drift, transients, and changes in operating state. Confirm that any required anti-alias filtering occurred before sampling. Do not automatically detrend or window without recording why.

For a real-valued signal, a basic transform and matching frequency vector can be formed with SciPy:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import numpy as np
from scipy import fft, signal

Fs = 1000.0
x = np.asarray(x, dtype=float)
x_detrended = signal.detrend(x, type="constant")
N = len(x_detrended)
nfft = 4 * N

X = fft.rfft(x_detrended, n=nfft)
f = fft.rfftfreq(nfft, d=1 / Fs)
magnitude = np.abs(X)
phase = np.angle(X)

This example zero-pads to create a denser frequency grid; the record still contains N measured samples. The rfft and rfftfreq documentation describes the corresponding output and bin centers. The detrending line removes a constant mean, so omit or change it if the absolute level is part of the question.

For a density-scaled periodogram or Welch estimate, use the signal functions directly:

f, Pxx = signal.periodogram(
    x,
    fs=Fs,
    window="hann",
    detrend="constant",
    scaling="density",
    return_onesided=True,
)

f, Pxx = signal.welch(
    x,
    fs=Fs,
    window="hann",
    nperseg=1024,
    noverlap=512,
    nfft=4096,
    detrend="constant",
    scaling="density",
    return_onesided=True,
)

These settings are examples, not universal defaults. In Welch, the segment length and overlap determine how much data contributes to each averaged estimate; the longer FFT length here pads each segment for a denser grid. The plotted PSD’s units derive from the input units squared per hertz when the input is in units such as volts.

Troubleshoot an unexpected spectrum

  • A large DC spike: Check the sample mean, physical offset, sensor bias, and drift. Remove the mean only if offset is outside the question being measured.
  • Mirrored peaks: For real-valued data, the negative-frequency half mirrors the positive half by conjugate symmetry; it is not a second physical tone.
  • A broad or uneven peak: Check bin alignment, leakage, the window’s main-lobe width, and possible frequency drift. A broad lobe may be one tone under finite observation, not several independent tones.
  • Amplitude changes with N: Raw FFT magnitude scales with record length. Normalize consistently and correct for window gain before comparing records.
  • A noisy-looking floor: A single periodogram can have high variance. Consider Welch for approximately stationary data, while noting the frequency-resolution cost of shorter segments.
  • A peak moves when only FFT length changes: Zero-padding changes the sampled frequency grid, not the underlying observation. Do not interpret a finer grid as additional resolution.
  • Frequencies seem impossible or above Nyquist: Recheck the sample rate and frequency vector. Aliasing from inadequate sampling or filtering is distinct from leakage and is not fixed by a window.
  • Phase jumps or erratic phase: Check for wrapping and mask bins whose magnitude is near zero or below the noise floor.
  • A prominent peak hides the feature of interest: A large offset, interference, mechanical fundamental, or sensor resonance may dominate. Define the measurement question before deciding which component matters.
  • A transient vanishes in an average: Welch averaging suits stationary noise better than short-lived events. Use a spectrogram, triggered analysis, or a separate transient analysis.
  • Integrated spectrum disagrees with time-domain power: Check whether the plotted quantity is amplitude, power, or PSD, along with normalization, units, window, and frequency increment.

Before drawing a conclusion

  • What are the sampling rate, number of measured samples, and observation duration?
  • Is the frequency axis calculated for the actual sampling rate, and is the display one-sided or two-sided?
  • What window and detrending choices were used, and are they appropriate to the measurement?
  • Is the plotted result amplitude, power, or PSD, with the correct normalization, units, and decibel convention?
  • Could leakage, aliasing, drift, clipping, transients, or noise explain the observed feature?
  • Does the record remain stationary over the analysis interval, and does the interpretation persist when reasonable analysis settings change?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.