Surface Topography PSD and Synthetic Roughness Suite

Surface and spectral settings

Use uniformly sampled power-of-two grids. Start at 32 × 32 and repeat with finer sampling.

Generated surface
Analysis

Topography result

The canonical amplitude result is direct RMS after selected form removal.

RMS height, Rq—

Enter or generate a surface, then select Calculate.

Processed height map, z(x,y)
Y position (µm)
—————
—————
X position (µm)
Numbered axes span Lx × Ly; the colorbar reports processed height in µm.
Two-dimensional PSD, log₁₀ C(qx,qy)
Directional content is retained; map scale is logarithmic in m⁴.
Radially averaged PSD
Both log₁₀ axes include numerical ticks. Radial averaging is a compact isotropic summary and can hide directional texture.

Equations used

Heights z are positive upward. x follows matrix columns, y follows rows, and angular spatial wavevectors q are in rad/m. All calculations use SI units internally.

Form removal, DFT, and areal PSD

z′jk = zjk − (a + bxj + cyk);   Zmn = Σj=0Nx−1Σk=0Ny−1 wjkz′jk exp[−i2π(mj/Nx + nk/Ny)]
U = (1/NxNy)Σwjk²;   Cmn = ΔxΔy |Zmn|²/[(2π)²NxNyU]

a, b, and c are least-squares plane coefficients; j and k index samples; m and n index Fourier modes; Δx and Δy are pixel spacings; w is either unity or a separable Hann window; U is its mean-square power correction; i² = −1; and Cmn is the two-sided areal PSD in m⁴ under the angular-wavevector convention. Lx = NxΔx, Ly = NyΔy, qx = 2πm/Lx, and qy = 2πn/Ly with wrapped negative-frequency indices.

Spectral moments and directionality

Δqx = 2π/Lx;   Δqy = 2π/Ly;   m0 = ΣCmnΔqxΔqy;   m2 = Σ(qx²+qy²)CmnΔqxΔqy;   m4 = Σ(qx²+qy²)²CmnΔqxΔqy
RqPSD = √m0;   Sdq = √m2;   RMS(∇²z) = √m4
M = Σ Cmn[qx² qxqy; qxqy qy²]ΔqxΔqy;   γ = √(λmax/λmin);   θ = ½ atan2(2Mxy, Mxx−Myy)

A = LxLy. The anisotropy ratio γ uses eigenvalues of the directional second-moment matrix; γ = 1 is balanced, while larger values indicate a preferred wavevector direction θ measured counter-clockwise from +x. Radial C(q) is the arithmetic mean of Cmn in each q-radius bin, with wavelength λ = 2π/q.

Sampling and generated surface

qNy,x = π/Δx;   qNy,y = π/Δy;   Δqx = 2π/Lx;   Δqy = 2π/Ly
C(q) ∝ 1 for q ≤ qr;   C(q) ∝ (q/qr)−2(1+H) for qr < q ≤ qs;   C(q) = 0 for q > qs

qr = 2π/λr, qs = 2π/λs, and the Hurst exponent H is dimensionless with 0 < H < 1. Seeded complex Gaussian coefficients obey Hermitian symmetry; inverse DFT heights are mean-centered and scaled to the requested Rq.

Assumptions and limits

  • Samples must lie on a uniform orthogonal grid and represent a stationary patch.
  • The DFT treats opposite edges as periodic; plane removal and Hann windowing reduce, but do not eliminate, leakage.
  • Radial averaging discards direction. Interpret it only with the 2D PSD and anisotropy result.
  • Slope and curvature moments strongly amplify high-q noise. Repeat at different pixel spacing, map size, window, and detrending; do not report unconverged values.
  • No instrument transfer-function, missing-data, spike, uncertainty, or anti-alias correction is applied. Repair and calibrate metrology data before use.

References

Jacobs, Junge & Pastewka (2017), Quantitative characterization of surface topography using spectral analysis; ISO 25178-2:2021.

How to use

  1. Select Generated self-affine or Measured grid. Generated mode is for reproducible numerical studies; measured mode is for uniformly sampled areal topography.
  2. Set grid size and x/y pixel spacing in µm. Measured matrices must have power-of-two dimensions from 8 to 128; the grid-size selector controls generated mode.
  3. In measured mode, paste or upload finite TXT/CSV height values and choose nm, µm, or mm. Rows are y samples and columns are x samples.
  4. In generated mode, enter target Rq in µm, 0 < H < 1, λs, λr, and an integer seed. Require 2max(Δx,Δy) ≤ λs ≤ λr ≤ min(Lx,Ly).
  5. Select form removal. Least-squares plane is the normal starting point; use mean-only or none only when the physical datum/form is intentionally retained.
  6. Select Hann to reduce edge leakage or None for an already periodic map. Choose 4–64 radial bins, then select Calculate. Reset example restores defaults and clears results.
  7. Read direct Rq as the canonical amplitude result. Compare spectral RMS, RMS slope, RMS Laplacian, anisotropy ratio, and principal wavevector direction.
  8. Inspect the processed topography with its numbered x/y axes and height colorbar in µm. Use Download surface CSV to export the processed map as `x_um,y_um,z_um` coordinate rows. Read the numerical log₁₀ wavevector and PSD ticks on the radial curve, and download radial PSD CSV when a numerical result exists. A high anisotropy ratio warns that the radial curve hides direction.
  9. Correct red validation messages. Check the Nyquist and map-length limits, then repeat with finer spacing, larger area, another window, and another detrend choice.
  10. Do not use the model for irregularly sampled, uncalibrated, aliased, spike-contaminated, nonstationary, or safety-critical data, or when instrument transfer and uncertainty must be quantified.

Interpretation

Rq describes amplitude; Sdq and RMS Laplacian emphasize progressively shorter wavelengths. Differences between direct and spectral RMS can reflect window correction and leakage. Synthetic output is a statistical realization, not a material specification.