{
  "name": "scipy.signal.spectrogram default parameters and their values at 10 kHz sampling",
  "description": "Documented default arguments of scipy.signal.spectrogram (SciPy 1.18.0 manual), with the derived segment length, hop and frequency-bin spacing worked out for the manual's own 10 kHz example. Derived values are arithmetic from the defaults, not output printed by SciPy.",
  "page": "https://casrai.org/guides/scipy-spectrogram",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-18T06:59:31Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Parameter",
      "unit": "",
      "description": ""
    },
    {
      "name": "Documented default",
      "unit": "",
      "description": ""
    },
    {
      "name": "What it controls",
      "unit": "",
      "description": ""
    },
    {
      "name": "Derived value at fs = 10 kHz",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Parameter": "window",
      "Documented default": "('tukey_periodic', 0.25)",
      "What it controls": "Window applied to each segment",
      "Derived value at fs = 10 kHz": "Tukey with 1/8 of the window overlapping at each end"
    },
    {
      "Parameter": "nperseg",
      "Documented default": "None, which becomes 256 for string or tuple windows",
      "What it controls": "Samples per segment",
      "Derived value at fs = 10 kHz": "256 samples = 25.6 ms per segment"
    },
    {
      "Parameter": "noverlap",
      "Documented default": "None, which becomes nperseg // 8",
      "What it controls": "Samples shared by neighbouring segments",
      "Derived value at fs = 10 kHz": "32 samples; step of 224 samples = 22.4 ms"
    },
    {
      "Parameter": "nfft",
      "Documented default": "None, which becomes nperseg",
      "What it controls": "FFT length (zero padding only if larger)",
      "Derived value at fs = 10 kHz": "bin spacing fs / nfft = 39.0625 Hz; Nyquist 5 kHz"
    },
    {
      "Parameter": "detrend",
      "Documented default": "'constant'",
      "What it controls": "Per-segment detrending",
      "Derived value at fs = 10 kHz": "Each segment's mean is removed"
    },
    {
      "Parameter": "return_onesided",
      "Documented default": "True",
      "What it controls": "One-sided or two-sided spectrum for real data",
      "Derived value at fs = 10 kHz": "One-sided: 0 to 5 kHz"
    },
    {
      "Parameter": "scaling",
      "Documented default": "'density'",
      "What it controls": "Units of Sxx",
      "Derived value at fs = 10 kHz": "V**2/Hz when x is in V and fs in Hz"
    },
    {
      "Parameter": "mode",
      "Documented default": "'psd'",
      "What it controls": "Kind of values returned",
      "Derived value at fs = 10 kHz": "Power spectral density"
    }
  ],
  "sources": [
    {
      "title": "SciPy manual: scipy.signal.spectrogram",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.spectrogram.html",
      "accessed": "2026-11-18"
    }
  ]
}