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
21 views

Matlab: separate parts of a speech signal vector automatically

I have a speech signal that contains 5 vowels consecutively. In order to do formant estimation of each vowel, I want to cut them out of the signal into a new variable. When looking at the plot of the ...
0
votes
1answer
30 views

How can I obtain the transfer function from these two transfer functions in this case?

Using Scipy signal in Python I want to obtain a transfer function for an input which passes first from sys1 and then sys2. So ...
0
votes
0answers
18 views

Complex demodulation zero-padding and frequency shifting/truncation errors (Python)

I've been stuck trying to make a complex demodulation of a signal using the FFT work. I am currently trying to achieve the following: Window the time signal with a hanning window Add zeros to the ...
0
votes
0answers
14 views

Scipy visualize Linear filter using numerator coefficients

Python scipy signal package has a function freqs to get the frequency response of a linear filter from [b, a] numerator and denominator. So, I should be able to get ...
0
votes
1answer
25 views

Cropping binary images based on pixel counts in python

I have a numpy binary masked image that looks like the following: I want to automatically crop this image like the following: Can I achieve this using some sort of image processing rather than ...
2
votes
1answer
52 views

Matlab FIR filter numerator coefficients to python

I created a equiripple FIR filter in Matlab using filterDesigner and exported it to an ASCII file. The file contains the numerator values as a list of 51 numbers ...
0
votes
1answer
39 views

Recreating matlab second order filter in python

I want to create some custom filters in Matlab filterDesigner tool and then apply those filters to a large set of audio files. I want to use python to do the ...
0
votes
1answer
24 views

Continuum Fitting with Python using specutils

it's my first time processing spectra from a black body radiation experiment, I'm using Python and having some troubles... I have this spectra with 2 peaks and uneven background noise which I want to ...
-1
votes
0answers
47 views

How to convert matlab code into python?

Could you please help me to convert matlab code into python? ...
1
vote
1answer
46 views

Difference between librosa.stft and scipy.signal.stft

I read the source code of librosa.stft and sicpy.signal.stft, and notice that the calculation results of STFT(short-time fourier transform) in these two libraries are quite different: In scipy.signal....
0
votes
0answers
13 views

Which audio features to use for content based music recommendation

I am attempting to write a content-based music recommendation system using machine learning. Using a python library, I am able to extract the features from raw audio files. For each audio file, I have ...
0
votes
0answers
18 views

Identifying sounds patterns from wav file

I have an audio recording stored as a .wav file. My goal is to identify exact sounds patters from it using Python. The problem I'm facing is there's a clear "ting" sound in the audio file, ...
1
vote
1answer
17 views

Third octave band zero-phase forwards-backwards Butterworth filter adds amplitude to complex signals?

Overall aim: to take a short signal (likely to be noisy with some tonal components) and filter it into third-octave bands (TOBs), apply frequency-dependent spectral adjustments, then recombine the ...
0
votes
1answer
44 views

Relationship between amplitude and sampling rate

I'm loading a signal with librosa in python. With the original sample rate of 22050 Hz, i get the following waveplot: When i choose to resample my signal with the sample rate of 512 Hz, i get the ...
0
votes
0answers
20 views

Using MNE-Python for EEG trimming and Filtering

I am working on an EEG Signal analysis problem with python. I need to remove the recordings below 1st minute and above 6th minute of the signal, and pass it through a bandpass filter. I am not ...
0
votes
1answer
19 views

gnuradio - flowgraph with cpp

I build a flowgraph in gnuradio, generated python code, change a little and run it using python. My question is, does building the flowgraph in cpp will provide better results (time)? (in other words ...
0
votes
0answers
13 views

Registration of segemented medical images

I’m looking to register images based on probability maps (or possibly the binary images) resulting from segmentation of medical images of blood vessels with a circular FOV using python. Are there any ...
1
vote
1answer
29 views

Map time/scene differences between two similar videos

Goal: Given two videos that are episodes from series but in different format (one Bluray/one TV for example), map the time differences between the two (which scenes are not in one of the two) and be ...
1
vote
0answers
21 views

Red Color selection in Python and Skimage

I'm trying to load an image from the disk and then to extract just the red channel of it and display it in grayscale with grey colormap but I don't know what I'm doing wrong.. The image should be ...
0
votes
0answers
19 views

Right discrete cepstrum implementation in python

I know that the cepstrum is mainly computed as follow: $ C_{r}={\mathcal {F}}^{-1}\left\{\log({\mathcal {|{\mathcal {F}}\{f(t)\}|}})\right\} $ What I am wondering is if I should take the whole fourier ...
0
votes
1answer
35 views

How to reprocess SDR data to be equal to that captured with a higher RBW

I have a data set that consists of max hold frequency vs intensity data from an SDR at a specific RBW. I want to reprocess the data as if I sampled it with the larger resolution bandwidth so I can ...
0
votes
1answer
43 views

Ripple in a SciPy Butterworth SOS Filter

I have a script using SciPy for checking the RMS of various Butterworth Bandpass Filters of varying orders. I would expect the RMS values to increase and decrease linearly and consistently as you get ...
0
votes
1answer
18 views

Restricting elemets in mfcc of a signal

I am getting 20-length mfcc of an audio signal. Each element(vector) is of size 5. I am using Librosa. How to give custom size to the each element of mfcc (say 6)?
0
votes
0answers
24 views

FFT followed by SVD leads to topography?

I am implementing the localizer method from this paper. One of the steps is not hard to understand and implement, but I don't understand why it is applied or what is the rationale behind it. Each data ...
0
votes
0answers
36 views

MAP Estimation Problem for Frequency Band Occupancy Calculation

Consider designing a wireless communication system. Your communication link is not iso- lated in the environment, there are other similar devices trying to communicate in the same general frequency ...
0
votes
1answer
54 views

Noise removal in discrete signal

How do i remove these kinds of noise from the discrete signal in python?
1
vote
2answers
120 views

DIY DSP projects ideas

I have a Masters Degree in DSP but all I learnt there is theory. I would like to complete some projects at home which I can add in my resume to showcase my skills and to get jobs in industry. But I ...
0
votes
1answer
87 views

Butterworth filter of the acceleration and drifting displacement problem

I am only mechanic engineering and I need to filter my acceleration from MEMS mobile phone which has a noise and drifts. Here is my data. Acceleration vs time from an app mobile phone ...
0
votes
1answer
30 views

Recovering time domain signal from sum of independent and identically distributed signals [closed]

Background: I observe a sample of a variable z that is the sum of two independent and identically distributed variables x and <...
2
votes
1answer
127 views

PyWavelets CWT: normalization? Vs Scipy?

Related. The equation being implemented normalizes by sqrt(1 / scale): $$ C_{a, b} = \frac{1}{\sqrt{a}} \sum_k s(k)\left( \int_{-\infty}^{k+1} \overline{\psi \left(\...
0
votes
0answers
49 views

Extracting articles from epaper into individually cropped image

I want to segment the image below (click for bigger image) into columns based on the natural gaps that exist in the columns. The article columns should be perfectly vertical and need not be the same ...
0
votes
1answer
37 views

How to model transfer functions using Python (without using higher level packages) and plot the magnitude and phase response?

I'm trying to model a transfer function in Python and thought I could do it by simply plotting the transfer function at many frequencies. This seemed to work for a 2nd order LPF. See the below figure. ...
0
votes
0answers
35 views

Establish instantaneous amplitude of signal

I'm using the YIN algorithm to establish the pitch of my humming / whistling voice. This is a time domain algorithm and gives me the instantaneous frequency as a function of time ($f(t)$). I now wish ...
1
vote
1answer
46 views

How to get rid of discontinuities at the start of a signal caused by the filter

I'm processing an audio signal using an overlap add method.Everything at the block boundaries is fine. However I have a discontinuity at the very start of the first block and I'm not sure how to (or ...
0
votes
0answers
21 views

How can I visualize the sEMG(Surface Electromyography Signals) using python?

I get surface EMG signals using a device called BioRadio and we got 3 channel signals, How can I visualize those signals in time domain and frequency domain in python. this is a sample of the data we ...
0
votes
1answer
48 views

window function between program and math

I'm newbie on signal processing. I know when we program python with window function. (just signal multiply with window) According to Harris paper I know we change w with different window(blackman). ...
0
votes
1answer
54 views

Wrong values calculating FFT with EEG Bands using Numpy

First of all I have to say I am very new to these matters. I am trying to apply FFT algorithm to some values obtained by EEG bands. I found the following code but I am unable to make it work correctly....
1
vote
0answers
13 views

What is the order of the output of HoughCircles in OpenCV, when having several circles on a frame?

So I am trying to use stereo vision to calculate the depth of several red balls. With the function HoughCircles, I get an output at one frame from one of the cameras like for example: ...
0
votes
0answers
30 views

Zero Padding in image reconstruction

I need to zero-pad the image for a better reconstruction but according to my project details, I will be given a Fourier-transformed image so can someone tell me how to pad the image in such a ...
0
votes
1answer
29 views

Detect static in audio with Python

I have a program running in python. It samples the demodulated FM output from an SDR. When there is no transmission, the input to the program is completely static. How can I go about squelching the ...
0
votes
1answer
65 views

Making a 3D point cloud from multiple RGB-D images

I have multiple (4 kinect) cameras that give RGB-D (color and depth) information of the same scene from different points of view. I want to make a 3D point cloud out of these depth maps. I can get a ...
1
vote
0answers
46 views

ModuleNotFoundError: No module named 'custom_OFDM' with custom Python OOT Block [closed]

I am using gnuradio to develop custom OFDM blocks using Python. I have used gr_modtool to create my blocks and import them into gnuradio. When I try to run my flow graph using one of my blocks I get ...
0
votes
1answer
50 views

How to calculate PSD if i have power vs freq spectrum?

i have a signal something like this how to calculate PSD? i have freq from 191000200 to 196500000 time gap or delta t = 1 or 2 sec, (what i mean is [tn] - [tn-1]) i will be computing in python any ...
0
votes
0answers
17 views

Fbank back to wav

Here's my problem. I have some wav files. I use the wavs as input to compute the fbanks. Then I want to do some stuff with the fbanks and then I want to recreate a wav file associated to the new fbank....
0
votes
1answer
28 views

Remove audio signal component under certain frequency in python

I want to remove all signal components under 10KHz in one audio file. Below is my code ...
2
votes
1answer
56 views

Exponential Swept Sine Distortion

I was able to get passable results on fundamental measurements using and exponential swept sine. Now I am trying to get distortion information from the same measurement but am puzzled by the results. ...
2
votes
2answers
139 views

Does chirp have constant magnitude frequency response?

Pg. 223 claims so, yet my results via DFT differ: Is the textbook wrong? My attempted explanations: (code) DFT vs DTFT: "frequency response" is computed via latter. Still, DFT should ...
0
votes
0answers
36 views

How do I extract n-dimensional cepstral coefficients with a sliding Hamming window in PyTorch?

I am trying to replicate the features from this paper, described as follows: MFCCs of speech frames are computed using a mel-scale filterbank. We extract 20-dimensional cepstral coefficients with a ...
0
votes
0answers
27 views

Interpolationg phase and magnitudes, Transformation function

I am trying to filter signal x(n), n = 150. I made a filter with few frequency points on the x axis , [-11., -9., -3., -2., -1., 1., 2., 3., 9., 11.]) ...
0
votes
0answers
34 views

Is it possible to apply a fractional delay to even-length signals using the frequency-domain phase shift method?

Suppose I have the following Python function to apply any real-valued circular delay to a signal by multiplying by a phase factor in the frequency domain: ...

1
2 3 4 5
17