Response
Your handy frequency and impulse response processing object!
This module supplies the Response class: an abstraction of frequency and
impulse responses and a set of handy methods for their processing. It implements a
fluent interface for chaining the processing commands.
Find the documentation here and the source code on GitHub.
import numpy as np
from response import Response
fs = 48000 # sampling rate
T = 0.5 # length of signal
# a sine at 100 Hz
t = np.arange(int(T * fs)) / fs
x = np.sin(2 * np.pi * 100 * t)
# Do chain of processing
r = (
Response.from_time(fs, x)
# time window at the end and beginning
.time_window((0, 0.1), (-0.1, None), window="hann") # equivalent to Tukey window
# zeropad to one second length
.zeropad_to_length(fs * 1)
# circular shift to center
.circdelay(T / 2)
# resample with polyphase filter, keep gain of filter
.resample_poly(500, window=("kaiser", 0.5), normalize="same_amplitude")
# cut 0.2s at beginning and end
.timecrop(0.2, -0.2)
# apply frequency domain window
.freq_window((0, 90), (110, 500))
)
# plot magnitude, phase and time response
r.plot(show=True)
# real impulse response
r.in_time
# complex frequency response
r.in_freq
# and much more ...
Release files for response 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| response-0.5.0.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| response-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:30.6 kB
Release files / response-0.5.0.tar.gz
| Download URL | response-0.5.0.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f1c1bd0728468be692c6e1c38c55015746778d35ea6e061e990b95e119932d4
|
|
BLAKE2b-256 checksum How to use checksums |
16855ef9dc059effac9932cc88465f3b8f5b187f23dc3b9bbe14e09664a0975c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7
|
Release files / response-0.5.0-py3-none-any.whl
| Download URL | response-0.5.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48bc94600ad4031085063a7da1e4c450cdc0cbb8c768f5c8808aba38247cb973
|
|
BLAKE2b-256 checksum How to use checksums |
33b79018719dabdf399e9aa53543ea11f4a527ea04af9d98633b418448b40ba6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7
|