Window definition methods (sarpy.processing.sicd.windows)

Window function definitions and a few helper functions. This just passes through to scipy functions after managing scipy version dependent import structure.

sarpy.processing.sicd.windows.general_hamming(M: int, alpha: float, sym: bool = True) ndarray

Returns a generalized hamming function. Constructed (non-symmetric) as \(\alpha - (1-\alpha)\cos\left(\frac{2\pi n}{M-1}\right) 0\leq n \leq M-1\)

Parameters:
  • M (int) – Number of points in the output window.

  • alpha (float) – The window coefficient.

  • sym (bool) – When True (default), generates a symmetric window, for use in filter design. When False, generates a periodic window, for use in spectral analysis.

Return type:

numpy.ndarray

sarpy.processing.sicd.windows.hamming(M: int, sym: bool = True) ndarray

The hamming window, which is a general hamming window with alpha=0.54.

Parameters:
  • M (int) – Number of points in the output window.

  • sym (bool) – When True (default), generates a symmetric window, for use in filter design. When False, generates a periodic window, for use in spectral analysis.

Return type:

numpy.ndarray

sarpy.processing.sicd.windows.hanning(M: int, sym: bool = True) ndarray

The hanning or hann window, which is a general hamming window with alpha=0.5.

Parameters:
  • M (int) – Number of points in the output window.

  • sym (bool) – When True (default), generates a symmetric window, for use in filter design. When False, generates a periodic window, for use in spectral analysis.

Return type:

numpy.ndarray

sarpy.processing.sicd.windows.taylor(M: int, nbar: int = 4, sll: float = -30, norm: bool = True, sym: bool = True) ndarray

The Taylor window taper function approximates the Dolph-Chebyshev windows constant sidelobe level for a parameterized number of near-in sidelobes, but then allows a taper beyond.

The SAR (synthetic aperature radar) community commonly uses Taylor weighting for image formation processing because it provides strong, selectable sidelobe suppression with minimum broadening of the mainlobe.

Parameters:
  • M (int) – Number of points in the output window.

  • nbar (int) – Number of nearly constant level sidelobes adjacent to the mainlobe.

  • sll (float) – Desired suppression of sidelobe level in decibels (dB) relative to the DC gain of the mainlobe. This should be a positive number.

  • norm (bool) – When True (default), divides the window by the largest (middle) value for odd-length windows or the value that would occur between the two repeated middle values for even-length windows such that all values are less than or equal to 1. When False the DC gain will remain at 1 (0 dB) and the sidelobes will be sll dB down.

  • sym (bool) – When True (default), generates a symmetric window, for use in filter design. When False, generates a periodic window, for use in spectral analysis.

Return type:

numpy.ndarray

sarpy.processing.sicd.windows.kaiser(M: int, beta: float, sym: bool = True) ndarray

Return a Kaiser window, which is a taper formed by using a Bessel function.

Parameters:
  • M (int) – Number of points in the output window.

  • beta (float) – Shape parameter, determines trade-off between main-lobe width and side lobe level. As beta gets large, the window narrows.

  • sym (bool) – When True (default), generates a symmetric window, for use in filter design. When False, generates a periodic window, for use in spectral analysis.

Return type:

numpy.ndarray

sarpy.processing.sicd.windows.hamming_ipr(x: ndarray | float, a: float) ndarray | float

Evaluate the Hamming impulse response function over the given array.

Parameters:
  • x (numpy.ndarray|float|int) –

  • a (float) – The Hamming parameter value.

Return type:

numpy.ndarray

sarpy.processing.sicd.windows.find_half_power(wgt_funct: ndarray | None, oversample: int = 1024) float | None

Find the half power point of the impulse response function.

Parameters:
  • wgt_funct (None|numpy.ndarray) –

  • oversample (int) –

Return type:

None|float