A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [numpy]

The tag has no usage guidance.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
48 views

fft formula convention

I try to code up an algorithm from a scientific paper where they solve a differential equation using Fourier transforms. In the paper, they use the FT convention $\rho(x_i) = \sum_{k=-m}^m r_k e^{i2\...
2
votes
0answers
68 views

How to get an interpolation weight from a mathematical definition

It was recently explained to me that a "Nearest neighbor" kernel for 1D interpolation can be implemented like this using NumPy ...
1
vote
0answers
44 views

Why are low frequency peaks not sharp in scipy fft?

I am using numpy/scipy to plot graphs of sine waves. frequencies at 15 Hz or higher give nice, sharp peaks, but at lower frequencies, the peaks are smeared and the actual peak frequency can't be seen ...
1
vote
0answers
822 views

Acceleration time series to velocity conversion using DFTs

I have 1000 Hz time series data for acceleration (512 data points), which I want to convert to velocity. I am trying to use the omega arithmetic method to achieve this. Following are the steps I am ...
0
votes
0answers
28 views

Understanding outputs of image Fourier Transform in Numpy

I am trying to understand the meaning of FFT outputs with respect to images. Take a look at the following example: ...
0
votes
0answers
38 views

Scaling x axis for FFTs in Python

I edited the post to be more specific, see below. I have a dataset, on which I need to perform and IFFT, cut the valueable part of it (by multiplying with a gaussian curve), then FFT back. First it's ...
0
votes
0answers
29 views

delayed result in sinc upsampled signal

I have implemented an infinite kernel sinc interpolation. For some signals I notice an artifact, visible at the right end of the plot. I am wondering: is it a bug in my code or a phenomenon usual for ...
0
votes
0answers
176 views

Restoration problem with numpy fft function and self-made high-pass filter

Hi, I am using numpy.fft functions to do CV assignments in univ. But while implementing the high-pass and low-pass filter, I found something wrong during the process. The difference should converge ...
0
votes
0answers
98 views

Is there any python code for applying a-law/mu-law on 3D numpy array?

I have 3D numpy array of probabilities between [0,1], I need to emphasize on some area with lower probabilities. I was suggested to apply a-law and mu-law. I am wondering if there is python library/...
0
votes
1answer
102 views

Choppy output when trying play through a callback buffer

I am trying to make a keyboard in python where every note's frequency is a ratio of the previous note but my output is strangely choppy for some reason. Here's an example of what I mean. I'm using ...
0
votes
0answers
207 views

retrieving complete 2d autocorrelation function from 2d power spectral density function (numpy.fft.ifft2)

My question is at the boundary between signal processing and python. I have a 2d power spectral density function (PSDF) constructed on Nx/2 + 1 and ...
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 ...
0
votes
0answers
4k views

AM Modulator Demodulator in Python

I am trying to make a AM modem using Python Numpy and Matplotlib. I am successful in generating the AM Signal but I cannot demodulate it using a lowpass filter function that I made. The demodulation ...
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. ...