A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
0answers
231 views

Using Wavelet Transform on a 1D signal while updating the values

I'm working on a NN that uses Wavlet Transformed signals (with different wavelets and levels) and combines them with an additional Statistical Features input (input_4) to provide one step ahead ...
0
votes
0answers
120 views

Filtering out different narrow-band frequencies at once

I have asked a closely related question on SO at https://stackoverflow.com/questions/55168460/python-implementation-for-filtering-out-multiple-distinct-narrow-band-frequencie but I am still unclear ...
0
votes
1answer
57 views

How do I differentiate between signals from an unknown program?

I believe this question is on topic for this site under Algorithm debugging questions, but if not, I would appreciate a suggestion about where to post this question....
2
votes
1answer
171 views

Extract approximation and detail coefficients

I am a student and would like to know how to extract the approximation and detail coefficients (A5, D5, D4, D3, D2 and D1) after an applied DWT decomposition dB5 (Daubechies 5, level = 5)?
0
votes
0answers
31 views

Accelerometers (again…) using appropriate transformation for drifting signal returning back to x-axis (0 m/s)

Quick question on processing velocity results from accelerometer data. I'm aware of the unreliability of the data, but I'm willing to tolerate a fair amount of error. Also willing to perform lots of ...
0
votes
1answer
253 views

Extrapolate a 2D array using Fourier Transform

I need to extrapolate a given 2D array to a larger domain, keeping the spatial frequency. This is the original field: (the data file in numpy npz format and a Jupyter notebook to plot it can be found ...
0
votes
0answers
413 views

How to Extract frequency bands from Short-time Fourier Transform?

I am reproducing the results reported by the author in a research paper. In which he takes the STFT of EEG signals. The input data has a shape of (1 X500) and I used Scipy library built-in function to ...
0
votes
0answers
10 views

TEO-CB-AutoEnv implementation on python?

I'm trying to search for an implementation proposed as the nonlinear critical band based TEO auto correlation envelope area (TEO-CB-AutoEnv). If anyone knows of a library or such can you please link ...
1
vote
1answer
114 views

For discrete wavelet transforms, is redundancy needed to ensure perfect reconstruction?

So I was using pywt and I noticed that in the padding mode documentation they explain the following: DWT performed for these extension modes is slightly ...
0
votes
1answer
63 views

Is there a reason why with symmetric padding, the inverse wavelet transform is not the adjoint of the wavelet transform?

I recently stumbled upon a bothering fact when using the pywavelet library in Python. When we use the default "symmetric" ...
0
votes
0answers
121 views

Butterworth Method using Python

I want to use the Butterworth filter in python on my data set. I want to plot it and compare it to the original line. This is my code: ...
0
votes
1answer
549 views

Third octave bandpass filter with python

I am very new to signal processing and coding which is why my questions might be really basic. I have a signal of the acoustic pressure p'(t) and I would like to use a third octave bandpass filter in ...
3
votes
0answers
287 views

Evaluate Fourier coefficients at arbitrary point using Python

Lets say I have a sinusoidal function $s$ that looks like ...
1
vote
0answers
39 views

How to account for number of electrodes in EEG data while converting to frequency domain?

I have raw data from 64 electrode EEG in CSV format where there are multiple rows and 64 columns. I am using the following Python code to separate the data into frequency bands: ...
0
votes
2answers
7k views

Remove background noise from audio file (python or matlab)

I am implementing a project for infant cry detection and the audio set contains background noises. So for preprocessing i need to remove the background noise from the audio.I am not able to get a ...
0
votes
1answer
140 views

FFT: do I need to include gaps in data in my FFT domain?

I am currently doing an FFT on a very large amount of vibration data, which I am going to sample with no pattern which I want to PSD eventually My question is in essence can I go from my data ...
0
votes
1answer
103 views

Choppy output when trying play through a callback buffer

I am trying to make a keyboard in python where every note's frequency is a ratio of the previous note but my output is strangely choppy for some reason. Here's an example of what I mean. I'm using ...
0
votes
0answers
636 views

LMS adaptive filter noise suppression- question about my implementation

I am writing LMS filter to suppress noise in wav file (I know there are many modules to do this but I need to write LMS manually now as I will translate it into C later). According to this answer[1], ...
0
votes
1answer
609 views

Filter ECG signal with Wavelet and Python

I have to filter the signal of an ECG with the wavelet method with Python. The data is in a txt file. I can create my dataframe with pandas, display that with seaborn, but can not find a way to apply ...
-1
votes
1answer
130 views

Displaying Cosine Signal in Python [closed]

I am new to signal processing concept, so this can be easy question. Actually, I want to display cosine signal by using python scipy.signal module. The method <...
1
vote
1answer
94 views

Looking for a analytical formula to compute the central frequency of a signal analyzed by a discrete wavelet at a given scale

I am reading this paper by Han et al. (2014). In this article, the authors extract detailed information from geomagnetic data sampled at 1Hz using a daubechies 5 (db5) wavelet: they reconstruct the ...
0
votes
0answers
54 views

Python scipy firwin2 has a low frequency error when designing arbitrary amplitude filter

I've been trying to design an arbitrary amplitude FIR filter which has a specific attenuation for each frequency. However I get an error at low frequency when comparing the results to my expected ...
2
votes
1answer
180 views

How to set STFT-parameters to visualize woodpecker / Sawtooth Signal? ​

I always wanted to work with FFTs and Spectrograms to characterise sounds and their frequencies using python. Lately I recorded a woodpecker at his work. Woodpecker Wav File To know where to look ...
0
votes
1answer
558 views

Audio/speech detection, verification

I would like to write a program to compare two '.wav' files, one of which is the original played file with human speech and the other is a recorded '.wav' file. The program I wish to write in python ...
0
votes
0answers
21 views

fitting lines based on image content with python

I trained an algorithm for road semantic segmentation that gives an output like this: I want to retrieve the coordinates of the vanishing point (the top of the triangle) and to fit two lines ...
0
votes
0answers
24 views

problem in selecting correct algorithm for project (RCNN)

I am doing a deep learning project in which i have to identify different models of cars. i am a bit confused for the following reason: first is what algorithm should I use. I have studied that RCNNs ...
0
votes
0answers
176 views

tensor flow is slow on gpu

I'm trying to do people detection using tensorflow. Here is a video of what I came up for https://youtu.be/93XOujVi-1U My questions. I run the tensorflow on GPU 1050ti nvidia, and it's extremly ...
1
vote
1answer
702 views

How can I improve my fit of cosines to periodic data using Python?

I have a space-separated csv file containing a measurement. First column is the time of measurement, second column is the corresponding measured value, third column ...
0
votes
0answers
85 views

Artifacts observed in STFTs computed with C++ library FFTW3 or NE10

In one of my projects, I have to compute stfts with audio signals coming either from a microphone or a .wav file in a C++ based program. However, I am observing different artifacts due to my stft ...
1
vote
0answers
120 views

audio sound localization using machine learning [closed]

I'm trying to localize a sound by using an array of microphones, the localization is done based on the sum and delay algorithm. I'm trying to to do the same in machine learning. I don't have much ...
0
votes
0answers
51 views

Convolution in the Hartley Domain

The convolution Theorem of the Hartley Transform is given by $$ Y_{Ha}(k) = X_{Ha}(k)H_{Ha}^{e}(k) + X_{Ha}(-k)H_{Ha}^{o}(k) $$ where, $$ H_{Ha}^{e}(k) = \frac{H_{Ha}(k) + H_{Ha}(-k)}{2} $$ $$ H_{...
0
votes
0answers
49 views

Scipy Welch's gives different first element

I've re-implemented Welch's method and want to compare it to scipy.signal.welch. However, the first two and last elements of the resulting array are different. My ...
1
vote
0answers
127 views

Generate time domain signal from frequency domain filter

I am familiar with using the Fourier transform to take a signal from the time domain to the frequency domain. What I would like to do is the reverse: describe a signal in the frequency domain and then ...
0
votes
0answers
264 views

Detection of Video Quality Using Python

I am getting started with image/video processing. As a start I have a dataset for which the goal is to detect the quality as the video progresses. Based on my readings I think any video under test ...
0
votes
0answers
125 views

Sampling Frequency, Fast Fourier Transform and some strange results in python

So, I have 2 types of signals - Dirac: $\left[ 1,0,0,0,0..NumberOfSamples \right]$ and Gauss (it's sinus * window_gausian). I need to do some operation in ...
2
votes
2answers
273 views

Why does a higher sampling frequency mess up my bandpass filter?

I was designing a bandpass filter in python using some of the scipy.signal modules. I am plotting the frequency response of my filter to verify that my desired frequency is in the passband. However, ...
2
votes
0answers
326 views

Basics of Normalizing Cross-Correlation with a View to Comparing Signals

I'm trying to understand how cross-correlation is used determine the similarity of two signals. This tutorial offers a very clear explanation of the basics, but I still don't understand how to use ...
3
votes
1answer
1k views

Comparing multiple signals for similarity

I have multiple (between 2 and 100) signals and need to determine when a significant number diverge from the rest. We're exploring machine learning techniques, but we also want tackle this as a signal ...
0
votes
1answer
371 views

python: how to compute the sharpness features of image

I am extracting the sharpness features of image as shown in the following image mentioned in a paper. I have done with the following code. Firstly, use the open cv convert the RGB to HSL (luminance ...
0
votes
1answer
678 views

python: how to compute the gray level histogram features as mentioned in the paper, and

Hi I am extracting the grey level features of image mentioned in this paper (part 4.5 low level features). "We describe two low level features that are particu- larly important for photo quality ...
0
votes
0answers
88 views

Why convolution in time and frequency domain are not equal?

I was writing this Jupyter Notebook. Then, I unexpectedly faced two visually similar output, but their numerical results were very different. This is the code I used for convolution in the time ...
1
vote
2answers
361 views

Extending Goertzel algorithm to 24 kHz, 32 kHz and 48 kHz

I'm learning to implement Goertzel's algorithm to detect DTMF tones from recorded wave files. I got one implemented in python from here. It supports audio sampled at 8 kHz and 16 kHz. I would like to ...
0
votes
1answer
38 views

Will noise cancellation with playstation eye improve my spectral analysis?

Im doing some beginners spectral analysis for a homemade reactive RGB LED project and was thinking of ways to improve the accuracy of the audio analysis. Im using a Playstation eye with a Raspberry Pi ...
0
votes
1answer
289 views

What's wrong with my implementation of the Matching Pursuit algorithm?

I have recently attempted to implement a simple version of the Matching Pursuit algorithm, following the description detailed on Wikipedia. Although the algorithm itself seems dead simple, my ...
0
votes
1answer
41 views

Confused about Fourier transform output

I am new to signal processing, so I did a fourier transform on a frame of 200 samples with NFFT = 512 and then I took the absolute value : I am trying to understand these values on the output, are ...
0
votes
2answers
236 views

Comparing FFT for increasing time intervals in a signal

Assume a dataset where the rows represent signals: each signal $s$ is sampled at a sampling rate $f_s$ and available as an array of common length $T$. For an increasing sequence of integer times $t_i &...
0
votes
1answer
226 views

How can I modify a sound signal based on it's MFCC

I'm working on an NN algorithm with which I want to filter noise from sound signals. I have some clean speech sound samples and noise samples, by combining them I get the signal that I want to filter....
0
votes
1answer
160 views

Unit Step Response of an Integrator

Desinging a very basic 1st order integrator with the continous transfer function: $H(s) = -1 / (0.001 s)$ [No zeros, one pole at origin] I was expecting the unit step response to be positive-slope. ...
1
vote
0answers
631 views

How to envelope a non periodic Impulse signal?

I want to analyse a trc oscilloscope file, find impulses and envelope them. In the end I want to plot the envelope. data file (trc): https://ufile.io/z4m4d Code: (Python) ...
1
vote
1answer
266 views

Extreme quantization of audio

I would like to take an audio sample and reduce it to a very limited set of numbers, with one value for amplitude and another for length. Example: I want to find the dimensions of the red boxes, ...