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
1answer
29 views

inverse discrete FFT in python, multiple times?

I was wondering what really happens when taking the inverse discrete FFT on some set of numbers, for 3 times? Because looking at it, it looks like we're getting an output that is identically with the ...
0
votes
1answer
1k views

Adaptive Piecewise Constant Approximation (APCA) with wavelets/DWT

I am trying to approximate a vector or a time series, in order to have as little changes as possible. To do so, I pretend to apply the Adaptive piecewise constant approximation (APCA) algorithm. ...
0
votes
1answer
124 views

how to extract a radio signal features with python?

I have a dataset of radio signals that i want to classify. So, I decided to extract features. After some googling, I have noticed that I have to calculate moments, cumulants, Kutosis and skewness to ...
0
votes
2answers
135 views

I wish to create a GNU Radio program in C++ that doesn't need GRC or Python, is there a reference or template for this?

I want to create a functionally equivalent C++ file to the Python top_block.py file that is generated by GRC when executing a (blank example) flow chart. I know that C++ can be used to define blocks ...
0
votes
1answer
608 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 ...
3
votes
1answer
2k views

Python: Least Squares Support Vector Machine (LS-SVM)

I'm looking for a Python package for a LS-SVM or a way to tune a normal SVM from scikit-learn to a Least-Squares Support Vector Machine for a classification problem. The goal of a SVM is to maximize ...
9
votes
3answers
2k views

Implementation of Wikipedia Equation for the DFT

I was writing a simple fourier transform implementation and looked at the DFT equation on wikipedia for reference, when I noticed that I was doing something differently, and after thinking about it ...
0
votes
0answers
26 views

Strange signals in wifi channel

I am currently working with a USRP B200 mini-i to receive 802.11 signals from various usb wifi devices. When sending packets with the USB device over a channel, lets say 2.412GHz, i can't really see ...
0
votes
1answer
55 views

How to manually implement convolution with FFTs?

I'm trying to manually implement a convolution using FFTs and it isn't working as expected. I know I'm probably missing some subtlety with padding, shifting, or conjugation, (all of which I've tried ...
0
votes
3answers
137 views

dft of sampled sine using python

I'm trying to write a python script to perform a 100-point DFT over a finite length sample of a sinewave at 1/8 the sampling frequency. I'm curious why my DFT magnitude plot has two spikes in it when ...
1
vote
1answer
2k views

Shift in Time Domain After DFT Based Convolution

To my understanding, multiplying a signal in the frequency-domain is equal to a convolution in the time-domain. I wrote a small python program, but i always end up with a shift in the time domain. ...
1
vote
0answers
27 views

How to create different Time frequency images from a data

I'm new to Python. I have a time series in a CSV file that has about 5000 rows and 3 columns. I have split the data into training and testing in ratio 70:30 respectively. However, I have a problem ...
0
votes
1answer
1k views

Bandpass filter for audio wav file

How do I apply a bandpass filter on an audio file which is in wav format? And write back the filtered data in a new wav file for further analysis.
0
votes
0answers
6 views

Image extraction post processing to increase similarity

I’m trying to train an OCR model, but I need to get my extracted images to look more like the training images. However I’m not sure of how to go about it and what techniques I can use. For instance ...
2
votes
1answer
695 views

How is WSNR (weighted signal to noise ratio) defined?

I'm studying about comparison between images to determine quality. I've learned about MSE, SNR and PSNR, and now I'm trying to understand WSNR, which I assume is similar to SNR but with weights. I ...
0
votes
0answers
31 views

Kalman-Filter Estimate the position

I am quite new in this field and trying to learn Kalman-Filter but i am quite lost how to start my task. This is the file description Problem. I guess the state vector x must be the poistion of ...
0
votes
1answer
297 views

How to find the probability of Kalman filter states? [OpenCV+Python]

I am working on a video object tracking problem. I am using Kalman filter to predict and correct the object position return by an algorithm such as CamShift. I want to adjust the likelihood ...
0
votes
1answer
555 views

Python tool for time-frequency analysis

I am trying to perform time-frequency analyses using the PyWavelets (pywt) toolkit for python. My ultimate goal is to perform time-frequency analyses for EEG signals but I am starting with something ...
0
votes
2answers
57 views

how can we align wto signals with a time lag in between?

I have two signals from two different sensors. I cropped the area i am interested in from both sensor signals. The problem is that the signals start at different time instants. I am searching for a ...
6
votes
1answer
1k views

Issues with the smoothing operator in coherence estimation using the complex Morlet (Gabor) wavelet

The goal I wish to compute the coherence estimate using the continuous wavelet transform (CWT) of a real-valued signal with the complex Morlet (a.k.a. Gabor) wavelet. I compute the cwt of the signal ...
0
votes
1answer
490 views

Confusion with data after cross correlation

Surely this question has been answered before in parts but I cannot find one solid answer. Ultimately I am trying to calculate the audio delay between two signals I am recording on USB microphones. ...
0
votes
1answer
99 views

reconstructing time-stretched signals for filtering purposes

I would like to know if it's possible to reconstruct the original time domain signal from it's time-stretched version? Is there any algorithm out there that can do this? Python, Matlab, etc? I want ...
4
votes
1answer
2k views

How can we know the geometry of a blob detected by OpenCV

I am performing blob analysis using connectedComponentsWithStats, which returns elementary statistics about the blobs (AABB and area). It is also possible to ...
0
votes
1answer
15 views

script to check zero crossings to check if microphones phases are aligned

I have 'n' microphones placed in square fashion and I want to make sure that all the channels must be aligned in time exactly the same if the signal is equidistant from all the 'n' microphones i.e. in ...
0
votes
1answer
33 views

Comparing spectra from hyperspectral images

I extracted the mean spectra of regions of interests of different tissues from hyperspectral images. How to compare those spectra by the difference of their reflectance and their spectral behavior (...
0
votes
1answer
30 views

generate a repeated square pulse train in python

Generate a pulse train with -2dBFS pulses of 20 sample duration every 8 seconds. I have referred here to generate a pulse train but not able to repeat it. How can I repeat this audio signal every 8 ...
0
votes
1answer
366 views

Machine Learning - any suggestions to solve Python rounding errors?

I am working with Python to isolate voiced segments from music using the Jamendo corpus for singing detection. Training a model, I break my audio into frames, and have a label (0,1) for each frame. ...
5
votes
3answers
27k views

Apply Low pass Butterworth filter in Python

I want to use a low pass Butterworth filter on my data but on applying the filter I don't get the intended signal. Here is the dummy code: Signal A: ...
2
votes
2answers
5k views

Implementing inverse FFT using forward FFT

I am trying to implement an inverse FFT using the forward FFT. For clarity: Let S[t] be a signal in time, and S[w] the transformed signal. As per this site, it seems one can reverse S[w], use the ...
0
votes
1answer
649 views

Is there a way to obtain the transfer function from a bode plot on Python? (I know that it is possible on Matlab)

Quite simply, I have a bode plot obtained from a source signal. Now I wish to obtain the transfer function. I know it is possible with Matlab: http://www.mathworks.com/help/ident/examples/frequency-...
0
votes
1answer
128 views

Low-Pass Filtering of not evenly sampled signal

I have a signal sampled unevenly over 1 million ns. the signal is sampled over 1GHZ clock and the samples are as the following: 0-100 ns - sample every 1 ns. 100-1000 ns - sample every 10 ns. 1000-...
1
vote
1answer
1k views

Are there any signal processing libraries that implement TD-PSOLA?

For such a popular and old algorithm, I've had surprisingly little luck finding implementations. I've got it working in MATLAB, but am curious if any other languages have libraries containing it (...
0
votes
1answer
2k views

Comparing Welch and FFT power spectrum density

Based on previous answers from the forum, I implemented a function to compute the Power Spectrum of a 1D time series. ...
5
votes
1answer
4k views

Demodulating FSK audio in Python

I am trying to write a Python script that can demodulate an FSK modulated audio file and return the data encoded in the audio. The data being transmitted is GPS NMEA strings which are embedded as the ...
0
votes
1answer
96 views

Discrete-time, second-order section, direct-form II filter

I found dfilt.df2sos in Matlab and trying to figure it out how do I do that in Python? Is there any function that works similarly with the Matlab function? I also ...
0
votes
0answers
20 views

modelling radar system for image generation

I am trying to find or derive some model for radar using python and blender which should hopefully create a simulation of what a radar image of the blender environment would look like. I have been ...
10
votes
1answer
12k views

Discrete Wavelet Transform - Visualizing Relation between Decomposed Detail Coefficients and Signal

I'm trying to directly visualize the relation between discrete wavelet transform (DWT) detail coefficients and the original signal/its reconstruction. The goal is to show their relation in an ...
0
votes
1answer
178 views

High resolution spectrograms

I have a recorded audio signal that I would like to convert into spectrogram with the highest possible yield of information. The audio clips I am working with is about 30 ms long and contains ...
3
votes
2answers
772 views

Determine if two signals are the same?

I'm pretty new to signal processing. My data is the $(x,y,z)$ acceleration of someone walking with a smartphone in his/her pocket. Goal Given two signals, determine if it's from the same person ...
0
votes
1answer
43 views

numpy.linalg.lstsq underdetermined case

I would like to understand what I am doing wrong here. I am trying to perform polynomial regression by minimizing the least squares, ||Au-y||^2, where y is the given data and A is the matrix where the ...
1
vote
0answers
146 views

Plotting a scalogram of a signal's Continuous Wavelet Transform (CWT) in python

So I've been learning about wavelets for a few weeks because I'd like to use them in a research project I'm working on and I've been trying to grasp the general ideas behind them.I've been struggling ...
2
votes
1answer
366 views

Binarization, and then thinning/skeletonization

I have pictures of networks, like the one below, and my goal is to obtain the network's skeleton from processing those images. My approach lies in two steps, first I convert grayscale image to binary ...
2
votes
1answer
629 views

(python+opencv) haar cascade training using cloud computing

I will train my own cascade, using python and opencv. I want it to be as precise as possible, so as I read it is common that training takes one or two weeks to compile. I want to use cloud computing ...
0
votes
1answer
2k views

Computing the Power Spectrum Density (PSD) on a CSV File in Python

im quit new with signal processing and im trying to calculate the PSD of a signal im sampling. the signal is an output of a DC buck converter this is the code im using and this is the plot im getting ...
0
votes
2answers
146 views

Shifting signal smaller than discrete step

I have a image that I need to shift with less than a pixel. My plan was to do a Fourier transform and multiply the signal with $e^{-aiu-biv}$ where $a, b$ are the shifts in x and y direction. This ...
2
votes
1answer
82 views

get poles and zeros of frequency response

I am working on a python based LTSPICE project. I would like to get poles and zeros of AC simulation data. Is there a way to get them under use of the magnitude and phase out of the frequency ...
0
votes
2answers
7k views

Avoiding “RuntimeWarning: invalid value encountered in log10” when converting FFT data to dBFS

I've attached some code below that I'm having some issues with. Basically, I need to write a function to get the dBFS value of a signal at a specified Hz value, at a given channel in a .wav file. ...
0
votes
1answer
89 views

Detect gradual increase then decrease in slightly noisy data

I have data thats not too noisy and I am trying to detect a pattern where it gradually increases then decreases in a short period of time (20 ticks? it should be roughly similar per session but can ...
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
1answer
85 views

python3: speech recognition - calculating features of a WAV file

I am supposed to do this as a school project, but I am kind of lost when it comes to signals and would appreciate your help. Also, English is not my first language, and I will be translating the ...