Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 vote
0 answers
27 views

How to do RRC filtering in multiple stages?

The goal of the approach is to speed up RRC filtering with (very) large oversampling ratio. To this end I calculate the prime factors of the oversampling ratio and RRC filter the signal with each ...
notEnoughScrews's user avatar
2 votes
1 answer
84 views

Maximally Decimated Polyphase Channelizer Help

I'm hoping someone can help me with this maximally decimated polyphase channelizer I've coded up. This is based on the fitler_ten_a code from the book "Multirate Signal Processing for ...
rtclark's user avatar
  • 121
0 votes
2 answers
95 views

piecewise linear sqrt in python and C output comparison [closed]

I am implementing a piecewise linear function to linearize the sqrt operation. I am using breakpoints from 0 to 100,000. I have set higher precision in lower breakpoints (as the sqrt changes more ...
Gabriel Galeote-Checa's user avatar
0 votes
0 answers
35 views

Low pass Thiran filter difference equation in Python

I'm attempting to build a time domain low-pass Thiran filter (in Python if that is relevant) based on the original article: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1083363&tag=...
MGreen's user avatar
  • 1
1 vote
1 answer
33 views

Detecting and fixing clipped positive waveforms

I have a large number of audio files recorded using custom IOT devices. When analysing the data I noticed that a portion of them seems to have their positive amplitude ramp up, but the negative ...
zaza's user avatar
  • 111
4 votes
2 answers
248 views

Inverse filtering to undo a convolution blows up

Essentially, I'm writing a paper in which I want a figure that shows the effect of convolving an arbitrary curve with a Gaussian. Then, I want to show that you can deconvolve it by taking the FFT of ...
3edw's user avatar
  • 41
0 votes
0 answers
14 views

How to get surface topology from fringe pattern

I'm trying to recover the surface shape of a body from fringe pattern. There's a interferometer projecting circular fringes on the body. A camera takes a picture of the reflection of these fringes. I ...
user72008's user avatar
1 vote
1 answer
61 views

What is the type of blurring in such an image?

I can't figure out what type of blur such an image has and how I would be able to generate it in python. I would be grateful for any help. I tried Gaussian blur, bokeh blur, Wolf and Born out of focus ...
empirefloo's user avatar
0 votes
1 answer
40 views

Aligning/syncing one audio file to another using Python

I have 2 audio files recorded using laptop mic and one with external mic. Laptop mic recording starts after external mic. The time difference could be 2-60 seconds. So I wrote this code which is ...
Joan Venge's user avatar
1 vote
1 answer
47 views

Signal response amplitude depends on the time interval in simulation

I have already tried to look for an answer, but I do not find existing answers satisfactory. I am interested in the absolute value of the response function of a damped oscillator (or any time series). ...
Andris Erglis's user avatar
0 votes
1 answer
18 views

How to compute the 2D coordinate in the s-domain?

I am not sure if my question is a right question to ask or not since I am still learning about Laplace Transform and S-Domain. If we have 2D coordinates (x,y) in the spatial domain (i.e., Euclidean ...
S.EB's user avatar
  • 163
0 votes
0 answers
39 views

Pixel Shift when using Fourier Downsampling

I am working on a Super-Resolution network, and want to try to use Fourier downsampling, different from the normally used bicubic downsampling as it relates to MRI imaging. I have tried using this ...
Christoffer Overgaard's user avatar
1 vote
1 answer
48 views

Ignoring Negative Frequencies from FFT on Real Time Series Seems Inconsistent With Time Series

I ran an FFT on real financial monthly time series data. If I plot the FFT frequency domain output on the interval $[0, f_s)$, the dominant frequency pair peaks occur at $f_{A1}$ $\approx$ $0.02 \ ...
Data2Dollars's user avatar
0 votes
1 answer
47 views

Binning and Frequency for FFT on Financial Time Series Data

I'm trying to analyze financial market time series data, so are there any particular concerns in using FFT for that kind of data? The data seems to be relatively covariance stationary. My sampling ...
Data2Dollars's user avatar
0 votes
2 answers
73 views

How do you properly cut out negative frequencies from FFT of a real signal if it reduces sample size?

If a real time signal has $N$ samples, then the magnitude of its FFT will also have $N$ samples--half of which will have positive frequencies and half of which will have negative frequencies. The ...
Data2Dollars's user avatar
0 votes
0 answers
28 views

Does the print of readframes(n) of wave library return the audio samples in hexadecimal form?

When I print the result of the first audio frame by doing track.readframes(1), I get b'\xfb\xff\xfb\xfe'. My track is stereo so we know that we have 2 channels where each channel has 1 sample. Does it ...
user71782's user avatar
0 votes
1 answer
39 views

Extracting Musical Notes from two audio samples, then providing feedback to the second one based on first one, weekend project or need to learn more?

I am a second year Electronics student attempting to make a mini project in audio analysis. I am thinking about using FFT to convert and then compare the two audio signals, first one being the "...
Doodoo28's user avatar
2 votes
1 answer
52 views

Digital Audio Resampling

I've been working from this reference document, essentially trying to recreate Figure 7 with the understanding that the two functions place_signal and ...
Michael Blazej's user avatar
1 vote
1 answer
95 views

Blackman-Tukey PSD in Python

I am trying to calculate the Blackman-Tuckey (BT) PSD in Python to check my understanding (getting started with signal processing). I have tried making the calculation myself and compare it with Scipy'...
opengisapprendice's user avatar
0 votes
0 answers
36 views

Laplace Transform and Inverse laplace Transform for 2D images python code available?

I am wondering if there is any implementation of Laplace Transform and Inverse Laplace Transform available for 2D data (i.e., images). For example, a batch of N ...
S.EB's user avatar
  • 163
0 votes
1 answer
29 views

Why is the first DCT square black here for the DCT basis images?

I'm trying to understand the DCT, for this purpose I wanted to generate the image of all basis images of the DCT. And given the formula by matlab: $$ B_{pq} = \alpha_p \alpha_q \sum_{m=0}^{M-1} \sum_{...
Rainb's user avatar
  • 103
1 vote
1 answer
85 views

Does Filtering changes the noise characteristics in a signal?

So, I tried out what i am learning in digital communication using GNU radio. The plan is to modulate two baseband signals(sine and cosine) 1kHz with no modulation protocol(don't know any(yet)) to a ...
qwerty's user avatar
  • 11
2 votes
1 answer
69 views

Multiscale Mathematical Morphology Filtering on Python

For context, I'm basing my code on the information provided in the paper "QRS Detection Based on Multiscale Mathematical Morphology for Wearable ECG Devices in Body Area Networks" by Fei ...
karimnh's user avatar
  • 31
1 vote
0 answers
46 views

Combining Two Grayscale Images Without Overlapping Using OpenCV and Matplotlib in Python

I am working on a project where I have two grayscale images of different sizes, named part1 and part2. Each image has some ...
Estiven's user avatar
  • 11
0 votes
1 answer
88 views

How to mitigate floating point error in recursive DSP calculations

I have implemented a modified linear prediction coding function like this: ...
jh0427's user avatar
  • 1
1 vote
1 answer
49 views

Initial conditions for 2 IIR causal filters applied to the same time-series consecutively

I have a buffer of shape (n_samples, n_channels) in which new samples are coming in at regular intervals and old samples are discarded. In this example, the buffer array is called ...
Mathieu's user avatar
  • 213
0 votes
0 answers
44 views

Combining Three Images into One Output Image Python

I have to combine three images that are inside one single image into one output image in Python. This has to be done using Gamma corrections, Histogram equalization, filters convolutions (gradient, ...
Estiven's user avatar
  • 11
0 votes
0 answers
110 views

Removing dense grid lines & convert into clear image - opencv - python

I want to extract the text from this image. I'm a newbie in opencv. I've tried various opencv codes across various questions, but none is working for me. How can I extract text from this? Or maybe ...
Pankaj Singhal's user avatar
0 votes
0 answers
56 views

Vectorizing calculation of slew rate envelope

I am working in a problem where for many stored signals (hundreds of thousands), I need to compute the slew-limited version of each signal. The slew-limited version will start with the same initial ...
Juan Bozzo's user avatar
0 votes
0 answers
61 views

writing from STFT to audio using ISTFT adding harmonics to audio not present before

I'm doing quite a bit of the samething as I wrote in this post here : Shifting frequency peaks such that w[i] moves to w[i/n] using STFT and IFFT I'll quote from it here to present the issue I now ...
Vrisk's user avatar
  • 103
0 votes
0 answers
42 views

Shifting frequency peaks such that w[i] moves to w[i/n] using STFT and IFFT

I am trying to do a kind of frequency compression on say 20 most energetic frequencies in a particular slice of a STFT. If w[i] is the frequency peak for a slice of STFT at a particular time, then I ...
Vrisk's user avatar
  • 103
1 vote
0 answers
26 views

Removing noise from data series of road surface data

I have a data series containing underlying noise, the plot of which is : The issue is to remove the noise leaving the pattern which is raised above the lower level. The lower level is road surface ...
Roy Jaques's user avatar
1 vote
0 answers
62 views

How does the shape of a FMCW radar work in Python?

I’m a beginner to this field, so sorry if my questions aren’t the best, or if I’m missing information. Anyways, I’m working with raw data samples from a FMCW radar. Basically, a frame constitutes of [...
Aquelae's user avatar
  • 11
1 vote
1 answer
65 views

Window Type Effect on Pwelch vs ShortTimeFFT PSD Result?

I am trying to make sure I understand the output scaling of pwelch. I am using the PWelch function to compute the PSD of a signal and I have manually computed the PSD from an STFT output. The results ...
Michael's user avatar
  • 13
2 votes
2 answers
244 views

How to find the pattern of a signal or main cycle of a signal?

I have a dataset where a certain pattern is repeatating in different time interval. The repetation of data pattern can come with slight change. I want first find the pattern (or cycle) and later by ...
asteroid's user avatar
0 votes
0 answers
43 views

Particle Filter for Tracking using Magnetic Data

I want to track a user using only the magnetometer data from their smartphone. For that I calculated the magnetic reading of every part of a room using an app. Then I put those readings in a python ...
Thermal_insulator's user avatar
2 votes
3 answers
116 views

How to find PSNR from two images with different size in python

I have 2 images, one original and other is reconstructed from the original via some processing. I want to find the PSNR for the reconstructed image The original has a size of ...
QuantumOscillator's user avatar
0 votes
0 answers
24 views

How to implement scale-dependent Gaussian averaging using Morlet wavelet envelope in Python?

I'm trying to reproduce the scale-dependent Gaussian averaging of a time series as described in this paper: https://arxiv.org/pdf/1706.01126.pdf The process involves performing a continuous wavelet ...
Jokerp's user avatar
  • 179
0 votes
1 answer
77 views

How to mask part of signal?

I am trying to implement masking in 1D signal data, I saw in one paper that they are masking 70% of the signal as in the figure below: In another study, they have mentioned that the mask part is ...
S.EB's user avatar
  • 163
1 vote
1 answer
247 views

How to generate covariance matrix of coloured noise

For standard gaussian white noise, the covariance matrix is a identity matrix. What about other coloured noises (generated from standard gaussian): Brown(red), Pink, Blue, Violet? Additional details / ...
sdnemina's user avatar
1 vote
0 answers
69 views

Debug the difference between two Frft implementations

I need help to understand the difference between two fractional Fourier transform implementations. On this website two different implementations for the fractional Fourier transform are presented (...
Laszlo Korte's user avatar
0 votes
1 answer
54 views

Unstable high-pass filter on mouse-generated signal

I am making a Desktop application using PyQT as the app is a Digital Filter You can add zeros and poles to a unit circle and apply the filter to the data the data can be of two types 1- saved data on ...
Mohamed Hazem's user avatar
0 votes
0 answers
62 views

Discrepancy between time & frequency domain RMS magnitude

I'm looking at complex baseband RF at a sample rate of 2.56 MHz. I've plotted the FFT of the entire spectrum, a 16 kHz segment of that spectrum, and the output of 160 decimation low pass filter that ...
Deepstop's user avatar
  • 153
1 vote
2 answers
76 views

Unstable high-pass filter on mouse-generated signal using Python

I am practicing some DSP techniques along with desktop application development using Python and PyQt. In my filter design application, I am able to create a filter by placing zeros and poles on a unit ...
Kafka's user avatar
  • 13
0 votes
1 answer
138 views

What is wrong with this sinc interpolation? (Zero padding in frequency domain)

I'm trying to pad $N=16$ zeros to the DFT of a $16$ point sinewave, but something is wrong either with my code or with my method. The method is this : I create a new $32$ point DFT where $F'(0),...,F'(...
In the blind's user avatar
0 votes
1 answer
58 views

Remove noise from lung sound wav

I am working in this dataset data.mendeley.com/datasets/jwyy9np4gv/3? aiming to develop a machine learning model for classifying various diseases based on lung sounds during both expiration and ...
Zayo's user avatar
  • 1
1 vote
1 answer
41 views

2D Fourier downsampling to even number of points gives incorrect modes in the last column

I would like to downsample an image in the frequency domain to an even shape, similar to what is described in this post. I have been able to do this successfully with a 1D signal to both an odd and ...
Jacob Helwig's user avatar
0 votes
0 answers
28 views

Issues obtaining Clarke Park transform

I have a three-phase electric signal and I've been asked to obtain its Clarke-Park transform (also called direct-quadrature-zero or dq0 transformation). I'm using this Python library, and I've gotten ...
J. Maria's user avatar
  • 101
2 votes
1 answer
123 views

what does librosa.stft do that makes it different?

My understanding of the Short Time Fourier Transform is that first I need to frame the signal and window it, after that apply an fft on these windowed frames. Using Librosa: ...
kulon one's user avatar
1 vote
0 answers
71 views

EMD in Python vs. Matlab

I want to move an analysis pipeline from Matlab to Python. I'm noticing a slight difference between the IMFs generated by the emd function in Matlab and those ...
Riley N. Boecher's user avatar

1
2 3 4 5
27