Skip to main content

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

How to find the "minimum spectrogram" across multiple recordings to extract a common audio signal?

The problem I'm trying to solve is that I'm trying to extract a "pure" version of a one-minute musical track that has been mixed together with voices speaking over it, over let's say 50 ...
crazygringo's user avatar
1 vote
1 answer
55 views

The Discrete Fourier Transform (DFT) Pair of Rectangular / Indicator Function

I'm trying to properly understand the fft and tired to recover the sinc function from its Fourier transform, i.e. an indicator ...
Sim's user avatar
  • 57
0 votes
0 answers
42 views

Beats not detected in clear signal

I am trying to identify beats and tempo to differentiate between signals with librosa. However, when I was exploring the data I found that I cannot find the beats for my fourth audio (audio 4) despite ...
Carlos Vega's user avatar
1 vote
2 answers
80 views

Flatten noise floor of spectrum by reference/dark measurement

I'm currently stuck with a problem and would appreciate any input or guidance in this regard. Background information In a laser experiment, an amplitude signal in volts and a position signal are ...
Rex's user avatar
  • 11
0 votes
2 answers
57 views

Phase shift between X and Y components of the same wave

I was told to post this question here, originally posted on Overflow. I have two signals, I1 and I2, which were acquired from a white light source in a spectrally resolved interferometer with a ...
Julio Ortega Izquierdo's user avatar
0 votes
0 answers
21 views

How to sync two similar lists/waveforms with differently populated data in python?

I have two lists of sizes L1 - 22400(865*26) and L2 - 79000 with measurements of some environmental data. Data of both the lists are measured simultaneously. The L2 is a continuous measurement for ...
Some Random Name's user avatar
1 vote
2 answers
85 views

Debugging a Haar wavelet transform in the Fourier domain

I'm trying to get a minimum-viable prototype going for a project on sensor fault detection using a scale-zero Haar wavelet (frequency-domain locality is not important). After some Googling, I managed ...
user169291's user avatar
0 votes
2 answers
95 views

Implementing a Butterworth low-pass filter in Python without knowing the order

I am relatively inexperienced with respect to lowpass filters, but I am trying to replicate parts of this paper, which deals with the processing of 3D accelerometer and 3D gyroscope data, both from ...
lonyen11's user avatar
1 vote
0 answers
44 views

How to improve quality of the recovered image in compressed sensing technology?

I was trying to use compressed sensing technology in image processing. Basically, I did a code in Python(Spyder IDE) which takes an image, compress the image and reconstructs it. I tried with the ...
Anya's user avatar
  • 11
0 votes
1 answer
51 views

How do I extract a part of an audio clip whose start and end times are given into a .wav file?

I have data on which I have performed Voice Activity Detection (VAD) and this returns a file containing columns of data in the following order : Segment Id, Audio file name, Start time, End time. For ...
zero_day's user avatar
1 vote
0 answers
72 views

How to calculate the cross-correlation of two signals that have different sizes?

I have two video signals of the same video. One encoded in MPEG format and the other in H.263 format. These signals are represented in .txt files with the frame sizes in an array. I need to calculate ...
user72361's user avatar
1 vote
0 answers
31 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
98 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
97 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
48 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
37 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
256 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
20 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
2 votes
3 answers
90 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
51 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
52 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
43 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
37 views

Tune Least Squares Support Vector Machine (LS-SVM) With Grid Search Optimization

I am looking for LSSVM with Gride Search optimization in Python, but could not find it. Scikit learn has SVM with Grid Search but not for LSSVM.
novin's user avatar
  • 11
1 vote
1 answer
51 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
51 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
94 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
30 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
42 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
56 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
106 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
50 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
33 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
87 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
  • 13
2 votes
1 answer
70 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
64 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
93 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
53 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
132 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
60 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
68 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
43 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
27 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
63 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
74 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
312 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
44 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
133 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
1 vote
0 answers
28 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
  • 189

1
2 3 4 5
27