Skip to main content

Questions tagged [numpy]

Filter by
Sorted by
Tagged with
1 vote
1 answer
84 views

I have a very annoying Problem (I am very much a noob when it comes to dsp so please bear with me): I have a periodic signal with an amplitude roughly one. However, at periodic intervals, the signal ...
Simon Köhl's user avatar
1 vote
1 answer
118 views

I have the output of numpy.fft.fft, calculated with 15000 samples at a rate of 500Hz - giving me bins of size $\frac{1}{30}$. Rather than having 15000 samples, I'd rather have say, 50 or 100. I've ...
Brokndremes's user avatar
0 votes
1 answer
187 views

the SciPy's scipy.signal.correlate function supports computing the cross-correlation between two 1D arrays. However, there is no direct support for axis-wise cross-correlation between two 2D arrays of ...
Habtamu Wubie Tesfaw's user avatar
0 votes
2 answers
101 views

I'm working with an example signal x = [4, 3, 5, 10, 5, 3]. In fftshift land, this is an even signal, because the indices ...
Pavel Komarov's user avatar
0 votes
1 answer
76 views

I've got a signal with known shape (from Oppenheim and Willsky problem 3.22a.(b)). I solve for the Fourier coefficients analytically and am happy with their values, given by. $$ a_0 = 1/2 $$ $$a_k = \...
Pavel Komarov's user avatar
0 votes
1 answer
96 views

I´m trying to simulate digital signals using numpy and scipy. When trying to lowpass filter a signal of the sines the result appears to amplify the region between the frequency spikes above the level ...
Johan's user avatar
  • 1
0 votes
3 answers
171 views

I have created some audio that I would like to play through a speaker using Ifft in python. It gives an array of complex numbers and as such no good to use with pyaudio or sound device. I tried to get ...
sam's user avatar
  • 1
1 vote
0 answers
206 views

I'm trying to find each occurrence of a kick drum sample in a piece of music. I have a reference sample for this kick. I initially used numpy.correlate to find the locations but ran into issues for ...
Baz's user avatar
  • 294
2 votes
2 answers
2k views

In python I'm creating a simple matched filter to find a feature $Q$ in a time-series $T$ where $$|Q| \ll |T|.$$ I've got it working like this: ...
pnadeau's user avatar
  • 125
0 votes
1 answer
405 views

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
2 answers
185 views

I'm trying to understand how Python's fft2 is different from irfft2. Basically, I have some continuous Fourier 2D samples that I need to put in a (n,n) grid (this can be done by a simply count-in-cell ...
Miguel Cárcamo's user avatar
0 votes
0 answers
99 views

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

I am trying to apply np.fft.fft on a 2D array of data of shape (98, 1024), where 98 is the number of trials and 1024 is the sampling rate in Hz. I am trying to find ...
Lisa Duan's user avatar
2 votes
1 answer
313 views

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

I am trying to implement an SDR transmitter and receiver based on the description here. ...
Ladislav Ondris's user avatar
-1 votes
1 answer
218 views

Since I've last posted on dsp@stackexchange, I have been working on my algorithms and recently came across a useful radix-2 implementation which delivers performance as good or better than that of ...
HFGCS's user avatar
  • 27
0 votes
1 answer
991 views

I am struggling with implementing FM demodulation for IQ samples that has 0 center frequency from RTL-SDR ... I have found the following algorithm for FM demodulation, see FM demodulation: ...
Denis Kotov's user avatar
1 vote
1 answer
600 views

Edited for conciseness, please see below: Question: How does overlap and save work, in the context of array buffers? How does overlap and add work? For a specific use case involving STFT, which one is ...
HFGCS's user avatar
  • 27
2 votes
3 answers
481 views

I have two signal spectrums. I represent them with polynomial coefficients and then do convolution. fig 1 & 2 are the two signal spectrums and their corresponding polynomial representations. (I ...
MRR's user avatar
  • 25
0 votes
1 answer
545 views

I'm having a lot of fun writing signal processing code in Python / numpy, and I'm resisting the urge to pre-optimize the code. But my biquad implementation is slower than I want. Here's the inner ...
fearless_fool's user avatar
1 vote
1 answer
211 views

Background: I am learning an interesting Fast CWT algorithm(PPCWT) by reading this paper published in 2019. The algorithm is summarized as below. The continuous wavelet transform of a signal can be ...
Wang Yun's user avatar
  • 134
1 vote
1 answer
170 views

I have been trying to estimate the power spectrum of a timeseries using fourier transform. I have tried to do this using two variations of the spectral density estimate using np.fft.rfft. The two ...
Jokerp's user avatar
  • 189
0 votes
0 answers
290 views

I am trying to calculate the power spectral density step by step using numpy FFT and comparing it to the PSD calculated by pylab PSD. Difference b/w plots of both methods can be visualized from in ...
Abdul wahab's user avatar
0 votes
0 answers
123 views

tl;dr I'm looking for something like Scipy's decimate function, but one that takes in a generator, rather than a Numpy array. I am turning on and off a light using ...
Kevin's user avatar
  • 101
2 votes
0 answers
78 views

Hi apologies in advance if this (optics & image-process) is not where I should post this question. Thanks for the help! I'm required to make a jig that measures the divergence angle of a ...
Hazman's user avatar
  • 21
16 votes
4 answers
6k views

I'm writing a synthesizer using numpy and python. I've run into a problem where concatenating sine waves causes 'pops' or 'clicks' when they are outputted to audio, say, via ...
Tim's user avatar
  • 161
0 votes
1 answer
714 views

I would like to simulate a basic lock-in amplification for post-processing some data. I wrote a basic Python script for this purpose but the output of the lock-in amplification does not seem to make ...
Mantabit's user avatar
  • 121
0 votes
0 answers
28 views

I've been asked to: create a bandpass filter amplifier in python, determine the transfer function, graph the bode diagram, and print the highcut frequency, lowcut frequency, the bode constant and the ...
Marcia Cocozza's user avatar
1 vote
1 answer
448 views

I am trying to resample a signal in Python, only by giving the new and the old step. My function works fine until here. But now I want to start the resampled signal at a specific point other than the ...
frank.lv's user avatar
0 votes
0 answers
1k views

I am dealing with complex IQ data from a software defined radio. I'd like to digitally shift the spectrum by some amount to center an off-center signal, then decimate down to that signal only. ...
Projectile Fish's user avatar
1 vote
1 answer
684 views

I want to plot the FFT of a sine wave using matplotlib and I want to plot a single line at a frequency where the sine wave belongs. here's my code ...
iwrestledthebeartwice's user avatar
2 votes
2 answers
953 views

I'm working on a audio dereverberation deep learning model, based on the U-net architecture. The idea of my project came from image denoising with auto-encoders. I feed the reverberated spectrogram to ...
Lorenzoncina's user avatar
1 vote
1 answer
692 views

I am doing an FFT on a series of pulses. The series is one pulse of amplitude 1 every 7 days over a total of 367 days. The code below is what I run: ...
MikeB2019x's user avatar
0 votes
0 answers
67 views

...
Subhadip Saha's user avatar
0 votes
1 answer
636 views

...
Subhadip Saha's user avatar
0 votes
0 answers
253 views

Tldr: Numpy FFT creates non uniform output when output is wanted to be uniform. I want the output to be a uniform corona. I am trying to eventually run a Gerchberg-Saxton phase retrieval algorithm. I ...
Condor's user avatar
  • 1
0 votes
1 answer
42 views

I see no difference in magnitude, but the phase plots vary significantly while using NumPy and MatPlotLib to plot. Looking at the phase plots, I feel like I'm missing something important. Also, I'm a ...
Abhigyan's user avatar
  • 103
-1 votes
2 answers
227 views

I'm running an fft once a second on a buffer of data 60 seconds long. The data is sampled at 558Hz and is placed into the fifo buffer once per second. FFT is numpy.rfft. The data is scaled to psia ...
chrismec's user avatar
1 vote
0 answers
312 views

I'm using numpy FFT functions to find the amplitude, frequency and phase of low frequency signals. focusing between 0-10 hz.Part of my project is to vary the time over which the sample is taken and ...
Jacob wood's user avatar
-1 votes
1 answer
119 views

I'm new to python and matplotlib, and I'd like to visualise / compare 3 mfcc files stored as numpy arrays in txt format. I have the Octave code below, and I'd like to know how it can be done using ...
lima0's user avatar
  • 9
2 votes
2 answers
4k views

I am having a hard time figuring out how to employ a high pass filter to remove the DC offset of my data signal with the "scipy butter" function because my sample rate is quite high. The ...
user1919542's user avatar
-1 votes
1 answer
325 views

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....
NeoChiri's user avatar
8 votes
3 answers
1k views

I am trying to show with numpy that the quantization noise of a sine wave matches the SNR formula of SNR = 1.761 + 6.02 * Q. The numpy code is simple: ...
Tom Verbeure's user avatar
0 votes
1 answer
365 views

I am trying to apply Haralick textures to a SAR image (float32). As far as I know, the image first needs to be quantized to a reasonable bit depth prior to calculate the co-ocurrence matrix. In the ...
opengisapprendice's user avatar
0 votes
1 answer
875 views

I want to prove using numpy the theory of Fourier transforms in which translation in space corresponds to a shift in the phase domain (frequency domain remains constant). I have generated these three ...
prl900's user avatar
  • 103
0 votes
0 answers
189 views

I am working on a script which is creating a spectrum analysis from an audio file using SciPy and NumPy. Before I started, I analyzed the file using Sonic Visualizer, which got me the following result:...
Flovdis's user avatar
  • 101
1 vote
1 answer
623 views

Edit: Could the following be the answer? Generate WGN-like-signal which is centered around a set dBm value. Treat that signal like it was a frequency domain representation of an unknown X time-domain ...
nlhnt's user avatar
  • 113
0 votes
1 answer
532 views

I'm going through the Think DSP by Allen B. Downey, and I'm struggling to understand a specific aspect of np.correlate and how it differs from statistic autocorrelation. The question is at the bottom, ...
minifigmaster125's user avatar