
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
ndarray-freqz
Advanced tools
Compute the frequency response of a digital filter based on it's transfer function.
This scijs compatible module calculates the frequency response of a given transfer function, described by the coefficient of the numerator and denominator polynomials.
| jw -jw -jmw
| jw B(e) b[0] + b[1]e + .... + b[m]e
| H(e) = ---- = ------------------------------------
| jw -jw -jnw
| A(e) a[0] + a[1]e + .... + a[n]e
Inspired by the scipy.signal.freqz function.
Sample usage:
var freqz = require('ndarray-freqz')
var b = [0.5, 0.5];
var a = [1];
var fr = freqz(b, a);
fr.H_r // real part of the frequency response.
fr.H_i // imaginary part of the frequency response.
var magnitude = zeros([512])
cops.mag(magnitude, fr.H_r, fr.H_i);
$ npm install ndarray-freqz
freqz( b, a, [omega] )Compute the frequency response of a digital filter based on it's transfer function.
b Array/ndarray of the numerator polynomial coefficients of the filter transfer function.a Array/ndarray of the denominator polynomial coefficients of the filter transfer function.omega Optional Array/ndarray of frequency (in radians/sample) values to calculate the frequency response for. If the value is a Number, then frequency response will be calculated for that many frequencies equally spaced around the unit circle. If undefined then frequency response will be calculated at 512 frequencies equally spaced around the unit circle.Returns a object with following components
H_r ndarray of the real part of the generated frequency response.H_i ndarray of the imaginary part of the generated frequency response.omega ndarray of the frequencies of the generated frequency response.(c) 2016 Chinmay Pendharkar. MIT License
FAQs
Frequency Response of a z-transformed Transfer function
The npm package ndarray-freqz receives a total of 3 weekly downloads. As such, ndarray-freqz popularity was classified as not popular.
We found that ndarray-freqz demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.