{ } Raw JSON

bundles / scipy latest / scipy / signal / _filter_design / findfreqs

function

scipy.signal._filter_design:findfreqs

source: /scipy/signal/_filter_design.py :100

Signature

def   findfreqs ( num den N kind = ba )

Summary

Find array of frequencies for computing the response of an analog filter.

Parameters

num, den : array_like, 1-D

The polynomial coefficients of the numerator and denominator of the transfer function of the filter or LTI system, where the coefficients are ordered from highest to lowest degree. Or, the roots of the transfer function numerator and denominator (i.e., zeroes and poles).

N : int

The length of the array to be computed.

kind : str {'ba', 'zp'}, optional

Specifies whether the numerator and denominator are specified by their polynomial coefficients ('ba'), or their roots ('zp').

Returns

w : (N,) ndarray

A 1-D array of frequencies, logarithmically spaced.

Notes

Array API Standard Support

findfreqs has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.

====================  ====================  ====================
Library               CPU                   GPU
====================  ====================  ====================
NumPy                 ✅                     n/a                 
CuPy                  n/a                   ⛔                   
PyTorch               ⛔                     ⛔                   
JAX                   ⛔                     ⛔                   
Dask                  ⛔                     n/a                 
====================  ====================  ====================

See dev-arrayapi for more information.

Examples

Find a set of nine frequencies that span the "interesting part" of the frequency response for the filter with the transfer function H(s) = s / (s^2 + 8s + 25)
from scipy import signal
signal.findfreqs([1, 0], [1, 8, 25], N=9)

Aliases

  • scipy.signal.findfreqs