Distributions and heavy tails

Power spectral density, windows, and 1/fᵅ slopes

A single Fourier transform of a noisy time trace keeps the same large relative variance at every frequency bin, no matter how long you record. Averaging overlapping windowed segments with Welch's method stabilizes broadband spectra, and fitting 1/fα exponents over uniform logarithmic frequency bins prevents thousands of high-frequency FFT bins from drowning out the low-frequency decades.

Updated · 6 min read

On this page
  1. Periodogram vs Welch PSD and variance reduction
  2. Choosing windows, detrending, and Density vs Spectrum
  3. Why 1/fᵅ slopes need log-binned fitting
  4. Autoplot vs Igor Pro, MATLAB, and SciPy for PSD
  5. PSD & 1/fᵅ Fit in Autoplot
  6. Frequently asked questions

Periodogram vs Welch PSD and variance reduction

For a discrete time series x[n] sampled uniformly at rate fs (Δt=1/fs), the unaveraged modified periodogram computes one discrete Fourier transform across all N samples after multiplying by a normalized window w[n]. While its frequency spacing Δf=fs/N is as narrow as the record allows, every frequency bin retains roughly 100% standard deviation relative to the true spectrum because adding more samples increases frequency resolution rather than averaging independent realizations.

Welch's method (1967) solves that variance floor by partitioning the series into K overlapping segments of length nperseg (step size nperseg ×(1−Overlap)), applying the window to each segment, and averaging the resulting periodograms:

Pxx(f)=1K∑k=1KSˆk(f)

Because overlapping tapers de-correlate adjacent windows, dividing a long trace into segments cuts spectral variance roughly proportionally to K while capping frequency resolution at Δf=fs/nperseg. An equally critical precondition is uniform sampling: interpolating or re-gridding jittered timestamps must come first when time steps vary by more than roughly 1%, or phase shifts distort every harmonic. Note also how discrete DC (f=0Hz) behaves: on a log10–log10 plot, zero frequency cannot appear on the horizontal axis, so tracking dcPower separately keeps any unremoved offset from corrupting the low-frequency slope.

Choosing windows, detrending, and Density vs Spectrum

Three estimator settings decide whether two power spectra share units, baseline, and leakage behavior (Harris, 1978):

SettingChoiceWhat it measuresWatch out for
WindowHann or BlackmanLow-leakage broadband continuum and 1/fα slopesBoxcar (rectangular) spills strong-tone power into broad sidelobes across decades
WindowFlat-TopAccurate peak power for pure sine waves off bin centersVery wide main lobe blurs nearby tones; poor choice for steep broadband slopes
DetrendConstant vs LinearRemoves mean DC offset or slow linear drift per segmentNone leaks large DC bias into low-frequency bins right where 1/fα fits begin
ScalingDensity (V2/Hz)Power per unit frequency; invariant to nperseg on white/colored noiseSpectrum (V2) scales peak height cleanly for single tones but shifts broadband continuum height whenever nperseg changes

When comparing an oscillator spectrum collected at fs = 1000 Hz against one collected at fs = 2000 Hz, or switching nperseg from 512 to 2048, always inspect Density scaling rather than raw Spectrum power so bin width Δf divides out consistently.

Why 1/fᵅ slopes need log-binned fitting

Broadband noise processes—from self-organized critical 1/f fluctuations (Bak, Tang, and Wiesenfeld, 1987) to electronic flicker noise, biological time series, and turbulent cascades—follow a spectral power law (Timmer and König, 1995):

P(f)=Af−α

Taking base-10 logarithms yields a line of slope −α and intercept log10A:

log10P(f)=log10A−αlog10f

A subtle trap happens if you run ordinary least squares directly on all raw FFT frequencies inside [fmin,fmax]. Because FFT bins are linearly spaced (Δf=const), the decade from 100 to 1000 Hz contains ten times as many frequency points as 10 to 100 Hz, and a hundred times as many as 1 to 10 Hz. Unweighted regression on linear bins almost ignores the low-frequency decade and lets high-frequency scatter or Nyquist rolloff dictate α. Enabling geometric Log-bin fit aggregates log10P(f) across uniform log10f bins first—just like the conditional averaging explained in power-law scaling relations and log binning—so every decade carries comparable weight.

Restrict [log10fmin,log10fmax] away from coherent spikes and thermal noise floors before accepting α. In the synthetic 8,192-sample example below (1/f1.25 colored background generated after Timmer and König, 1995, plus a coherent 65 Hz peak), bounding the Log-bin fit window to 2.93 – 39.06 Hz (log10f from 0.467 to 1.59, 22 fit points) excludes the narrow 65 Hz tone at log10(65)=1.81 and recovers α=1.297±0.073 (R2=0.9401).

Autoplot X&Y Plot showing Welch PSD of signal_v (fs = 1000 Hz, Hann window, nperseg = 1024, noverlap = 512, Density scaling, Constant detrend) in log10-log10 coordinates with a narrow oscillation peak near log10(f) = 1.81 and red 1/f^α Fit line from log10(f) = 0.467 to 1.59, alongside Figure Inspector Results reporting alpha = 1.297 ± 0.073, log10(A) = -0.839 ± 0.085, R2 = 0.9401, and dcPower = 0.03239
A Welch Hann PSD (8,192 samples at 1,000 Hz, nperseg = 1,024, 50% overlap) isolates the 65 Hz line while log-binned regression below 39 Hz recovers α = 1.297 ± 0.073.

Autoplot vs Igor Pro, MATLAB, and SciPy for PSD

Choose the environment that matches your sampling geometry and downstream signal-processing requirements:

CapabilityAutoplot (PSD & 1/fα Fit)Igor ProMATLAB / SciPy
Mac executionNative Apple silicon (macOS 15+)9.05 Intel under Rosetta 2; 10 is Windows-onlyNative macOS binaries and Python environments
Spectral estimatorsWelch and Periodogram; Hann, Hamming, Blackman, Flat-Top, BoxcarDSPPeriodogram, FFT, built-in window taperspwelch, multi-taper (pmtm), lombscargle, cross-PSD, coherence
1/fα slope fitBuilt-in Log-bin fit (5–200 bins) and [fmin,fmax] bounds in GUIScripted in Igor procedures after computing spectrumScripted in NumPy / SciPy (polyfit, curve_fit)
Best roleInteractive exploratory and figure-ready 1D time-series spectraLegacy .pxp/.ibw experiments and 2D/complex FFTsUnevenly sampled Lomb–Scargle, custom tapers, batch DSP

For uniform 1D recordings imported from CSV or delimited text—especially when moving everyday plotting and spectral checks off Intel-only Igor Pro on Apple silicon—Autoplot turns window selection, detrending, log-binned 1/fα slope fitting, and vector export into one interactive workspace. Keep Igor Pro for .pxp/.ibw legacy experiments or 2D transforms, and use MATLAB or custom SciPy scripts when your analysis requires uneven-time Lomb–Scargle spectra, cross-spectral coherence, or multi-taper estimators.

In Autoplot

PSD & 1/fᵅ Fit in Autoplot

Autoplot's PSD & 1/fα Fit analysis (Run Analysis → PSD & 1/fᵅ Fit inside any X&Y Plot, Plus — free for 30 days) runs Welch or Periodogram spectral estimation and log–log power-law regression locally on your Mac:

  • Inputs (Source): select numeric Signal and optional uniform Time (opt.) (verified uniform within 1% to infer fs automatically), or enter Rate (Hz) directly when Time (opt.) is omitted.
  • Estimator & fit controls (Spectrum & fit): switch Method (Welch / Periodogram), Window (Hann, Hamming, Blackman, Flat-Top, Boxcar), nperseg, Overlap (0%–90%), Detrend (Constant, Linear, None), Scaling (Density or Spectrum), Coordinates (log10–log10 or Linear), [log10fmin,log10fmax] (or linear [fmin,fmax]), and Log-bin fit (5–200 bins).
  • Results & exports (Mark & stroke, Figure Inspector → Results): style PSD line, Markers, Fit line, and Y offset, inspect α±SE, log10A±SE, R2, fitRange, bins, and dcPower, then export the fitted curve via Export 1/fᵅ Function or frequency/PSD arrays via Export PSD Variables.
  • Where it stops: PSD & 1/fα Fit requires uniform 1D sampling (≤1% step variation); unevenly sampled time series (Lomb–Scargle), cross-spectral phase/coherence between two channels, and multi-taper spectra require a separate script in Python or MATLAB—for general nonlinear fits on exported spectra, see how to fit a curve to data.

See features and pricing.

Frequently asked questions

Frequently asked questions
Should I use Density or Spectrum scaling when comparing two signals?Use Density whenever two signals have different segment lengths (nperseg) or different window equivalent noise bandwidths, because dividing by bandwidth aligns broadband noise floors in V2/Hz. Switch to Spectrum (V2) with a Flat-Top window only when measuring the peak amplitude of isolated discrete sine tones.
Why does Log-bin fit change my estimated 1/fᵅ slope?Linear FFT spacing puts ten times as many points into each higher frequency decade, so unbinned regression fits mainly the high-frequency band. Turning on Log-bin fit averages log10P(f) inside equal log10f intervals first so low and high decades contribute evenly across the chosen fit window.
What happens if my time axis is not uniformly sampled?FFT-based Welch and periodogram estimators assume fixed Δt. If timestamps vary by more than 1%, resample or interpolate onto a regular time grid first, or compute a Lomb–Scargle periodogram outside Autoplot.
Can Autoplot compute cross-spectral coherence or multi-taper spectra?No: Autoplot's PSD & 1/fα Fit layer handles single-channel uniform-grid Welch and single-window Periodogram estimation across Hann, Hamming, Blackman, Flat-Top, and Boxcar tapers. Export arrays or run scipy.signal.coherence or scipy.signal.windows.dpss in Python when multi-channel coherence or Slepian multi-taper estimation is required.

Sources

Algorithm details (compute_psd_and_power_law, 1% uniform time-step validation, Welch/Periodogram routing, log10 bin-averaged 1/fα OLS slope and error propagation, and dcPower isolation) and UI labels (PSD & 1/fᵅ Fit, nperseg, Log-bin fit, Density, Spectrum, Export 1/fᵅ Function, Export PSD Variables) were verified directly against Autoplot 2.5.2 source (math_logic.py, FigureCardEditors.swift, and Autoplot's PSD documentation) on 27 November 2026. Underlying estimators wrap SciPy's scipy.signal.welch, scipy.signal.periodogram, and NumPy's numpy.polyfit. Spectral averaging draws on P. D. Welch, "The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms," IEEE Transactions on Audio and Electroacoustics 15(2), 70–73 (1967), DOI 10.1109/TAU.1967.1161901; window leakage and amplitude accuracy draw on F. J. Harris, "On the use of windows for harmonic analysis with the discrete Fourier transform," Proceedings of the IEEE 66(1), 51–83 (1978), DOI 10.1109/PROC.1978.10837; self-organized critical 1/f spectra draw on P. Bak, C. Tang, and K. Wiesenfeld, "Self-organized criticality: An explanation of the 1/f noise," Physical Review Letters 59(4), 381–384 (1987), DOI 10.1103/PhysRevLett.59.381; and synthetic 1/fα noise generation draws on J. Timmer and M. König, "On generating power law noise," Astronomy & Astrophysics 300, 707–710 (1995), ADS 1995A&A...300..707T.

Try it on your own data.

Autoplot computes Welch and Periodogram power spectral density, isolates DC power, and fits 1/fᵅ slopes with optional log binning locally on your Mac. Part of Plus (free for 30 days).

Read power-law scaling relations →
Download .dmg

Without Private Cloud Compute · macOS 15–26

Apple silicon · macOS 15 or later · Free plan · Plus free for 30 days · 11 starter AI credits

Send to my Mac

Autoplot runs on a Mac. Send the link to yourself, or open it in the Mac App Store.