The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [scipy]

The tag has no usage guidance.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
6k views

Downsampling and upsampling of a signal in Python

If I want to downsample a signal in Python, is it better to use method resample from SciPy Signal Processing module or method decimate from the same module? What is the difference between these two ...
2
votes
0answers
360 views

real refractive index from Kramers Kronig relation

I have a measurement of the complex part of the refractive index $k$ (where the refractive index is $m = n + i\,k$) measured at a nonlinear grid of wavelengths or frequencies that span several orders ...
2
votes
0answers
178 views

Alternative to scipy maximum_filter to find peaks?

I'm using scipy maximum_filter together with binary_erosion to find peaks in my spectrum. I just wondering if there are any ...
1
vote
0answers
39 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
2answers
92 views

Checking Parseval's Theorem for Gaussian Signal by Using Scipy

I'm trying to check Parseval's theorm for Gaussian signal. It's well known that fourier transform of $\exp(-t^2)$ is $\sqrt{\pi}\exp(-\pi^2 k^2)$. So I implement it by using quad and simps. I think ...
1
vote
0answers
204 views

Understanding why spectral flatness cannot be computed

I have a real signal recorded 512Hz for 1s. After resampling the signal at 256Hz, I would like to compute its spectral flatness. To do so, I start by taking its discrete Fourier transform with ...
1
vote
0answers
2k views

How to design an interpolated notch filter in Python to filter powerline harmonics

I have a a time domain data set that records the magnetic field vs time, which must be processed to reveal an embedded signal. This data also contains power line harmonics (i.e. multiples of 60 Hz) ...
0
votes
1answer
24 views

Can't seem to get welch function in scipy work correctly

I'm trying to learn DSP through using Python's scipy package. I have measure some 200Hz signal from a machine. Now I want to inspect the spectral density of the signal. Here's the signal plotted out: ...
0
votes
0answers
8 views

Logical Steps to segmenting Lung Fissure Structures

I am given the task to do the Lung Major Fissure Segmentation in a CT image to find it's position in an image. This is what a Major Fissue looks like: https://www.med-ed.virginia.edu/courses/rad/cxr/...
0
votes
0answers
51 views

Negative Exponential Filter SciPy

I'm trying to transform a time series with a recursive filter to model a feedback. I was able to do a simple filter like : ...
0
votes
0answers
41 views

Losing lowest Frequencies in frequency modulated signal, rest of spectrum is fine

For several reasons I am attempting to re-modulate a de-modulated FM (as in WFM Radio) signal using python. Demodulating the initial signal goes well, it produces the PSD chart below which looks just ...
0
votes
1answer
26 views

How to pad a array representing music to pad the stft of this array?

I have an array named samples of size (2, 1321967) representing an audio file. When I pass it to scipy stft with ...
0
votes
0answers
44 views

Scipy Deconvolve help

I was playing with the deconvolve method in scipy and I can't seem to get it working properly (I am still really new to DSP/deconvolution). I convolved a gaussian with a fwhm of 2.0e-9 with a ...
0
votes
0answers
75 views

Filtering out different narrow-band frequencies at once

I have asked a closely related question on SO at https://stackoverflow.com/questions/55168460/python-implementation-for-filtering-out-multiple-distinct-narrow-band-frequencie but I am still unclear ...
0
votes
1answer
372 views

Third octave bandpass filter with python

I am very new to signal processing and coding which is why my questions might be really basic. I have a signal of the acoustic pressure p'(t) and I would like to use a third octave bandpass filter in ...
0
votes
0answers
43 views

Scipy Welch's gives different first element

I've re-implemented Welch's method and want to compare it to scipy.signal.welch. However, the first two and last elements of the resulting array are different. My ...
0
votes
0answers
76 views

How to know the time of my window to calculate the STFT with python knowing only the length?

I am trying to implement a work presented in an IEEE paper where they have mentioned that the STFT was performed on the signal measurements to obtain a spectrogram with no overlap window of 3 min : I ...
0
votes
0answers
55 views

how to detrend a carrier phase with butterworth filter?

I am new with detrending techniques, I have a carrier phase measurements and I want to detrend it by 6th order butterworth digital filter. After creating the digital filter I get its numerator (...
0
votes
0answers
795 views

How does the Scipy implementation of CWT actually work?

I'm trying to use the SciPy implementation of the Continuous Wavelet Transform to analyze EEG data. I am using The problem is that I have no idea what the width parameter should be. It says that it's ...
0
votes
2answers
6k 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. ...
0
votes
0answers
149 views

Translating Bessel filter from python to C - odd behavior past the cutoff frequency

I recently translated the code from scipy.signal.bessel to C in order to implement a bessel filter in a piece of analysis ...