{
  "name": "Welch segment length vs frequency resolution, segments averaged and noise-floor estimate (worked example)",
  "description": "Computed by running scipy.signal.welch (SciPy 1.18.1, Hann window, default 50% overlap) on a 10 kHz, 100,000-sample test signal: a 1234 Hz sine (RMS 2 V) plus white noise of density 0.001 V^2/Hz, generated with numpy default_rng(1234). Frequency spacing is fs/nperseg per the SciPy documentation; the other columns are measured outputs of the run. The mean noise floor uses bins above 2.5 kHz.",
  "page": "https://casrai.org/guides/scipy-welch",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-17T17:03:28Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "nperseg",
      "unit": "",
      "description": "Samples per segment"
    },
    {
      "name": "Frequency spacing",
      "unit": "Hz",
      "description": "fs / nperseg with fs = 10 kHz"
    },
    {
      "name": "Frequency bins returned",
      "unit": "",
      "description": "Length of f for the one-sided output"
    },
    {
      "name": "Segments averaged",
      "unit": "",
      "description": "Number of overlapping segments in the average at 50% overlap"
    },
    {
      "name": "Peak bin frequency",
      "unit": "Hz",
      "description": "Frequency of the largest Pxx value; true tone is 1234 Hz"
    },
    {
      "name": "Mean noise density above 2.5 kHz",
      "unit": "V^2/Hz",
      "description": "True injected density is 0.001"
    }
  ],
  "rows": [
    {
      "nperseg": 256,
      "Frequency spacing": 39.0625,
      "Frequency bins returned": 129,
      "Segments averaged": 780,
      "Peak bin frequency": 1250,
      "Mean noise density above 2.5 kHz": 0.000995
    },
    {
      "nperseg": 512,
      "Frequency spacing": 19.53125,
      "Frequency bins returned": 257,
      "Segments averaged": 389,
      "Peak bin frequency": 1230.469,
      "Mean noise density above 2.5 kHz": 0.000999
    },
    {
      "nperseg": 1024,
      "Frequency spacing": 9.765625,
      "Frequency bins returned": 513,
      "Segments averaged": 194,
      "Peak bin frequency": 1230.469,
      "Mean noise density above 2.5 kHz": 0.001
    },
    {
      "nperseg": 2048,
      "Frequency spacing": 4.8828125,
      "Frequency bins returned": 1025,
      "Segments averaged": 96,
      "Peak bin frequency": 1235.352,
      "Mean noise density above 2.5 kHz": 0.001005
    },
    {
      "nperseg": 4096,
      "Frequency spacing": 2.44140625,
      "Frequency bins returned": 2049,
      "Segments averaged": 47,
      "Peak bin frequency": 1232.91,
      "Mean noise density above 2.5 kHz": 0.000999
    }
  ],
  "sources": [
    {
      "title": "SciPy v1.18.0 Manual: scipy.signal.welch",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.welch.html",
      "accessed": "2026-11-17"
    }
  ]
}