Questions tagged [scipy]

The tag has no usage guidance.

207 questions
Filter by
Sorted by
Tagged with
90 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 ...
1 vote
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 ...
89 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 ...
255 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 ...
1 vote
110 views

Numerical issues in scipy's Savitzky Golay filter coefficients for large polynomial order

Consider the design of a Savitzky-Golay filter of window length 101 and (high) polynomial order 20. Using scipy version 1.10.1, the filter coefficients can be obtained in python as: ...
1 vote
72 views

How do you filter a signal, split in batches, using an IIR filter?

I have a signal that is measured by an optical sensor that is connected to an ESP-32. I am trying to apply a band pass filter "in real time" on this microcontroller. The signal is comming in ...
1 vote
20 views

convert ndarray with properties in Matlab

I am testing to call a Scipy function of Decimate from Matlab and get a ndarray from this function with structure as below ...
1 vote
42 views

call decimate function from matlab

I tried to call decimate function in Scipy from Matlab but met an error. Can somebody point me in a direction, please? Here is a code of Matlab ...
30 views

How does padding two vectors for cross correlation affect result of time delay?

For example, i have two signals (x and y). If I zero pad both vectors at the end by length ...
48 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 ...
1 vote
30 views

Amplitude Modulation in Scipy Documentation on Hilbert transform

I was reading the documentation on the scipy.signal.hilbert and an example was given there to illustrate the principle. To make it easier to understand, I copied ...
1 vote
50 views

11k views

downsample signal to a specific number of samples in Python

The Python Scipy library provides several functions to downsample signals, but they all have limitations: The resample function is based on Fourier method, which means it assumes periodic signals. ...
313 views

find out ideal window size for coherence analysis - python

Is there a general formula I could use to calculate the ideal window for the window argument in the function ...
525 views

Signal Reconstruction Using Scipy.signal.cwt

Can someone explain to me how I can reconstruct a signal using the scipy.signal.morlet2? The codes in the link only allows one to do a fourier transform using the morlet wavelet, but there is no such ...
1 vote
43 views

Convert MUSIC algorithm to EV

I write some code, but result looks very strange: ...
1 vote
107 views

Prony method doesn't work

I have used the code from: https://github.com/quantumlib/OpenFermion/blob/v1.5.1/src/openfermion/linalg/wave_fitting.py#L41-L76 try using with my signal: ...
65 views

Why is DFT magnitude less than expected?

Code for signal: ...
296 views

scipy convolve and fftconvolve return different output [closed]

I'm writing an autocorrelation function using and I noticed a difference between fftconvolve and convolve that should use fft if it's faster. This is my function with convolve: ...