Questions tagged [python]

Python is a high-level interpreted general programming language. Python has popular numerical and scientific libraries/packages, most notably numpy and scipy. The scipy.signal package is a powerful signal processing software collection. This tag covers the use of numpy, scipy, and other Python packages often used for SP computations.

Filter by
Sorted by
Tagged with
0
votes
2answers
21 views

How to do high-resolution FFT on just the lower frequencies in a signal?

Description of the data and problem: I have a signal sampled at 1000 Hz. I'm low-pass filtering it at 120 Hz, and want to make spectrograms of the frequencies below this threshold. I'm using the scipy ...
1
vote
1answer
25 views

Way to extrapolate scarce signal

Firstly apologise if I use the wrong terminology, I don't have formal experience in signal processing, hence I would appreciate the help a lot. I have a time-domain photon counting signal which due to ...
0
votes
1answer
21 views

How to deal with [h] coefficients which are 0 from sos-matrix

Calling scipy.signal.sosfreqz with a sos-matrix describing an ordinary butterworth bandpass returns an array of h coefficients, ...
0
votes
2answers
53 views

How can I generate a sine wave with time varying frequency that is continuous in PYTHON!

The question was asked before in C: How can I generate a sine wave with time varying frequency that is continuous? How can I resolve the following problem? I want a continuous graph. But how do I do I ...
0
votes
0answers
17 views

Filtering out motion noise from ECG

I have some ECG data that have some noise from motion in it. I also have have accelerometer data sampled at the same time. The idea is to use the accelerometer data to filter out motion noise from the ...
1
vote
1answer
54 views

Identifying Instruments within a music file

Say I have a file that contains a few musical instruments, how can Identify the name of each one (ultimate goal) or at least the category they belong to, like wind instruments? For example, if I load ...
0
votes
1answer
30 views

Identifying an Instrument

Say I have a file that contains a single musical instrument, how can I use python code to detect which instrument is it (ultimate goal), or at least what is the category of instruments it belongs to (...
0
votes
0answers
32 views

FFT on a specific part of an image [python]

I'm currently working on a project where I have to analyse an interferogram. Instead of doing an FFT on the whole image I'd like to focus only on a small part of it (one fringe) is it possible to ...
1
vote
1answer
37 views

Add chirp to time domain pulse

I have a Gaussian pulse $E(\omega)$ centered at 500 PHz with a bandwidth of 10 PHz. The pulse is transform limited initially. I am trying to add chirp, through multiplying the FT of $E(\omega)$ by a ...
1
vote
1answer
22 views

Scaling of FFT2 magnitude in image-processing

I got the following code: ...
4
votes
3answers
135 views

Role of window length and overlap in uncertainty principle?

I am trying to predict epilepsy using spectrograms and a convolutional neural network. So far I have achieved a validation accuracy of 86% which i feel like is pretty good. Lots of the papers doing ...
1
vote
1answer
42 views

How can THD (Total Harmonic Distortion) be applied to compare between two signals ( for example between original and encoded signals)?

I would like to compare between two signals (original signal and its encoded version) and plot the scores) as we do with STOI and PESQ. should we calculate the THD for each single signal separately ...
4
votes
1answer
47 views

How to automatically identify the start and stop times of a "ramp" seen in time series?

I am analyzing pressure data sampled at 1Hz. The times series exhibit "ramps" (a linear increase in pressure followed by a sudden drop) for which I would like to automatically detect the ...
0
votes
1answer
26 views

iFFT and extracting dw

I have a trivial fourier transform question. I have a correlation function, C(t), with complex components in the time-domain, and dt. I would like it in the frequency domain, C(w), like from ...
1
vote
1answer
121 views

FSK modulation with python

I am very new to DSP, and I am trying to implement a BFSK signal with python, but for some reason, the wave is not "clear", and there seems to be a lot of "discontinuities phases" ...
0
votes
1answer
16 views

GNU RadioTagged Stream: How to clip the stream as "packet length" tag long

I am currently trying to develop a GNU Radio block which takes a tagged stream as an input. The tags keeps the length of the packets. But the distance between the tags and the packet length are not ...
6
votes
1answer
44 views

How Are MATLAB's `cpsd()` and SciPy's `csd()` Related?

I am trying to determine an estimate of the H1 transfer function between two acceleration signals in Python. To do this, I am calculating Pyx using ...
0
votes
0answers
7 views

Analyze EEG data without epochs?

I have conducted EEG experiments to investigate the impact of VR on creativity. Therefore, participants were asked to come up with creative ideas regarding a certain problem statement that related to ...
0
votes
0answers
18 views

Why don't I see linear chirp for IFFT of gaussian with quadratic phase?

I am trying to set up a program for numerically simulating a pulse in the time domain after it is transmitted through a material that imparts linear, quadratic, and third order phase in the spectral ...
3
votes
0answers
50 views

Overall approach for building a footfall/age/gender counter using CCTV footage

I would like some advice to validate my approach for building a computer vision system. Design brief: Using existing CCTV cameras in a retail store, detect the footfall in the shop (count individual ...
1
vote
1answer
72 views

Scipy FFT and Numpy FFT disagree on pulse train spectrum?

I am doing an FFT on a series of pulses. The series is one pulse of amplitude 1 every 7 days over a total of 367 days. The code below is what I run: ...
7
votes
1answer
113 views

Kalman Filter State Covariance Matrix for Non Constant Process Noise Matrix in PyKalman

I'm experimenting with the pykalman Python library to learn about Kalman Filters. In the code below, I'm generating a random walk where each step is the last step ...
0
votes
1answer
50 views

How to combine highpass and lowpass filter to implement a bandpass filter

I want to implement a bandpass filter by using and combining my highpass and lowpass filter functions in Python: ...
0
votes
0answers
35 views

Color coherence vector - implementation

I'm trying to implement a color coherence vector for a small dataset. I understand what are the steps to do, but for example, the number of connected components is giving me always 1. I didn't know if ...
0
votes
2answers
32 views

lopsided Hanning Window function

I am processing sensor signals and have been looking at using window functions to smooth out the signal before I conduct a fft on it. A normal symmetrical hanning function seems to disorientate the ...
1
vote
0answers
33 views

Zero phase - Minimum phase of Butterworth filter [closed]

I am trying to implement the Zero phase - Minimum phase of Butterworth filter (1st, 2nd, and 3rd order) from scratch using python. Based on the resulting plots, it seems that I am doing something ...
0
votes
1answer
51 views

How to create a real bandpass filter?

I'm trying to create a real bandpass filter (17-point) in Python by calculating the coefficients b of a signal. This is the formula I'm using: $$b = \cos(ω(k-k_m))$$ for $k = 0,1,..,L-1$, where $k_m$ ...
0
votes
0answers
58 views

GNU Radio Stream Input-Vector Output

I successfully designed the transmitter block. I am now implementing the GNU Radio receiver block and using a Python (since it is easier for me to design a prototype) block that takes a stream of the ...
2
votes
1answer
59 views

Hankel Matrix SVD Denoising

I have performed Hankel Matrix Singular Value Decomposition de-noising to smooth out my univariate time series. It is the close price of EUR/USD exchange rate. Here is a picture: The problem I have is ...
0
votes
1answer
28 views

Creating the frequency-spectrum with VC-curves for Building Vibrations measurement

I'm very new to signal processing and can't get ahead: I'm using an Accelerometer to measure the acceleration of i.e. the building vibrations or elements/machinery etc. For creating the spectrum, I ...
2
votes
1answer
101 views

How to design a digital Butterworth bandpass filter?

I am looking into designing a Bandpass Butterworth filter in python, but, I was not sure I am designing my filter correctly. What I have are the following: High cutoff frequency = 200Hz Low cutoff ...
2
votes
1answer
26 views

Generate a PSF based on MTF Mapper's SFR measurement

Not sure if I should post this here or on Stack Overflow I have a .csv file from MTF Mapper with 2 columns from SFR measurement - frequency and contrast: ...
1
vote
1answer
59 views

Should i normalize FFT signal with z-score?

I am working with EEG data (time domain) in a machine learning task, where each input signal must be mapped to a class/frequency. I am using FFT in order to get data in frequency domain and make ...
0
votes
1answer
41 views

How to calculate magnitude of frequency response?

I'm trying to write a function in Python that calculates the magnitude of an FIR filters frequency response. I tried doing it by first calculating the Fourier transform with np.fft.fft and then ...
0
votes
1answer
41 views

How to find the shape of the highs from a noisy signal with many dips

I try to find that looks something like the red curve below and I am pretty clueless what is the best way. I tried first the Savitzky-Golay Filter, then I tried a simple fit with a second degree ...
0
votes
1answer
19 views

Self-Adjoint Filter Doesn't Work

My understanding is that a symmetrical kernel is its own self-adjoint. For example, if we had the following kernel: ...
0
votes
0answers
15 views

How to do appcoef and detcoef using pyWavelets?

I am new to signal processing and currently doing a school project in wavelet transform using Python. I want to extract all details and approximations (Example: cA2, cA1, cD2, cD1), pywt could return ...
0
votes
0answers
16 views

Multilevel DWT wavedec - How to get each coefficient (approximations and details) in the same length as the original signal?

I am doing a school project referring to the research paper https://www.tandfonline.com/doi/abs/10.1080/0952813X.2013.813976?journalCode=teta20 The overall concept of the research is as the following ...
2
votes
1answer
74 views

inverse fourier transform coefficients

Context I want to implement (real) cepstrum on stock data (for example MSFT stock) and achieve cepstral coefficients of this time series. as noted in "Cepstral-based clustering of financial time ...
1
vote
1answer
30 views

Hop size in STFT

I am reading the documentation of scipy.signal.stft function: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.stft.html#scipy.signal.stft. My question: is the 'noverlap' parameter of ...
0
votes
0answers
25 views

How to design function for Random Decrement technique in python and implement the function?

I was looking into a technique called Random decrement technique from the following links/articles: How can I use Random Decrement Method to convert a non-stationary signal into a decay function ...
0
votes
1answer
81 views

Implementing basic high pass filter using difference equation

For the following signal, I am trying to remove the gradual positive drift but retain the spikes using a high pass filter. I am aware that I can use implement a high pass filter using difference ...
0
votes
1answer
85 views

Send real and complex signal from python to GNU radio. ZMQ Python SUB -> GNU Radio

I've been reading about this. To do this, you should use the ZMQ blocks instead of the UDP blocks because of data loss. Now when using ZMQ I have problems with the received signal, if I create a np ...
0
votes
1answer
41 views

Fourier Transform High Pass Circular Filter Intuition

The situation I need to apply a high pass filter to an image. The approach I'm following uses Fourier transform to apply a circular filter which would eliminate low frequencies. Say I have a frequency ...
0
votes
0answers
54 views

High pass filter with specific cut-off frequency

The situation I am trying to apply a high pass filter to a black&white image to enhance the texture by keeping the high frequencies. The goal is to filter from a specific frequency value obtained ...
2
votes
1answer
65 views

Object Detection using audible sonar

I am currently working on a project of identifying the position and angle of the objects in an environment using sonar (audible) about 1 to 2 m away from a desktop speaker within an angular sector of ...
0
votes
1answer
59 views

Removing Attenuator and Real Mixer influence on the received Baseband signal in Radar IQ Transmitter - De-embedding

Radar IQ Transmitter Measurement Setup: Waveform Generator + IQ Transmitter + Attenuator + Real Downconversion mixer + Oscilloscope + Post-processing (Hilbert Transform) With the above arrangement ...
0
votes
0answers
39 views

Sample rate vs noise floor in power spectral density measurement

I am trying to measure the noise floor of my picoscope. I want to generate a PSD in volts per root hz that I can compare with specs from other equipment, e.g. a preamp. I gathered some data from my ...
0
votes
0answers
31 views

Separating several kinds of information in a sound file

I have a 90min audio recording of a lecture using a handheld recorder. Since the recorder was in the shirt pocket of the speaker, I can clearly hear that the their voice is much louder than the ...

1
2 3 4 5
21