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 ...

learn more… | top users | synonyms

0
votes
0answers
9 views

PSD Estimation: Welch's method with median averaging

I would like to use median averaging when making a PSD estimate via Welch's method. I notice that this is available as an option in R welchPSD, but not in SciPy or Matlab (in which the default is mean ...
0
votes
2answers
87 views

How can an FFT plot not be symmetrical?

From discussions all over the internet, I understand that in a 512 sample point fft, only the first 256 contain relevant information provided that my signal is real. The other half contains complex ...
0
votes
2answers
42 views

How to interpret results of Fourier transform by using Python

Connected with this topic , I would like to have some clarifications about the Fourier Transform and the Python tools that make it. Having my data set whose plot is showed in the above link, my array ...
0
votes
1answer
35 views

How to find the inflection point in a noisy curve?

I have the the noisy curve defined by numpy 2D array: As you can see, it has the first flat segment, then rise, peak and decay phases. I need to find the starting point of the rise phase, marked ...
0
votes
1answer
52 views

Plot real-time FFT using matplotlib

I'm trying to plot fft in python. I use pyalsaaudio for capturing audio in PCM (S16_LE) format. I use the ion() and draw() functions in matplotlib to have the fft plotted in real time. This is the ...
0
votes
0answers
7 views

Reference Pattern in Background

I want to apply a nonlinear matched filter to an image to find the reference pattern in the background. The image is just a white box in the foreground with a black background. I've included the code ...
1
vote
0answers
16 views

Lowpass then Inverse filtering in python

I wrote a simple lowpass filter in python to run against lena. Now I'd like to add Gaussian noise to the lowpass filtered data and then run an inverse filter against the lowpass and try to get the ...
0
votes
0answers
19 views

Correcting outliers using the standard deviation of a two-point different function?

I recently read a research paper that discussed how to correct lightcurve data (flux vs. time) by using the method as explained below: We have considered as outliers in the datasets the individ- ...
1
vote
1answer
70 views

Continuous Wavelet Transform with Scipy.signal: what is parameter “widths” in cwt() function? How do time-frequency?

I search to display a time-frequency signal with an original discrete temporal signal (sampling step = 0.001sec). I use Python and the library Scipy.signal. I use the function ...
1
vote
1answer
28 views

Finding horizontal count of items in an image

I'm trying to find the count of horizontal columns in an ordered image (a sprite image that is used to generate an animated image): From this image, I'm trying to generate a meta-data file like so: ...
1
vote
0answers
38 views

How do I combine a copy of a signal with the original to achieve a chorus effect in a .wav file using Python?

Can you please explain or point the right way to think about how to implement two sound effects in a .wav file. So I read a .wav file and converted it to int values (in ...
1
vote
1answer
71 views

Bandpass butterworth filter frequencies in scipy

I'm designing a bandpass filter in scipy following the cookbook. However, if I decrecrease the filtering frequencies too much I end up with garbage at high order filters. What am I doing wrong? ...
0
votes
1answer
69 views

Python scipy.fftpack.rfft frequency bin mapping

I'm trying to get the correct FFT bin index based on the given frequency. The audio is being sampled at 44.1k Hz and the FFT size is ...
1
vote
0answers
55 views

Shifting of Shift-Invariant Wavelet Transforms

Main Question: Why would iterative wavelet/inverse-wavelet transforms cause a shift along the x-axis for undecimated (shift-invariant) wavelet transforms? I am attempting to remove backgrounds from ...
0
votes
1answer
58 views

Inverse of Wavelet Transforms - Background and Noise Removal

Main Problem: How can you inverse Wavelet Transforms (Using the data given by signal.scipy.cwt) I was wondering if anyone understands the ...
0
votes
1answer
50 views

Interpret numpy.fft.fft2 output

My goal is to obtain a plot with the spatial frequencies of an image - kind of like doing a fourier transformation on it. I don't care about the position on the image of features with the frequency f ...
2
votes
2answers
93 views

Iterative Hard Thresholding python implementation [closed]

I'm trying to implement the Iterative Hard Thresholding recovery algorithm for compressive sensing in python. It is a very simple algorithm, given $ \mathbf{y}( = \mathbf{A}\mathbf{x}), \mathbf{A}$, ...
-1
votes
2answers
102 views

Spectrogram - Am I missing something?

I have the following signal: I'm trying to compute a Spectrogram algorithm, but, don't think I'm doing it right.. I have computed the following: 1) STFT (size 256 with an overlap of 128) 2) ...
0
votes
1answer
61 views

How do I compute the DC component given the other part of the Fourier spectrum?

I often see examples in textbooks where someone constructs a 2D Fourier spectrum of an image by fixing two (symmetric) pixels to a given value, and computes the inverse DFT to get a nice waveform ...
1
vote
0answers
323 views

numpy.correlate and autocorrelation; audio signal

I want to calculate delay between an input and an output audio signal of my audio processing system. The input and output signals are available as signed 16 bit integers. To try out, I tried the ...
5
votes
0answers
110 views

Removing a sinusoidal artifact from a set of movie frames

I am doing some post-hoc analysis of a dataset consisting of a series of movie frames that are contaminated by a strongly periodic artifact. I would like to remove this artifact from my frames. For ...
1
vote
1answer
60 views

period detection for a series of photons

I have a dataset which records the arrival time for a series of photons. I am using lomb-scargle method of scipy.signal to try to find some kind of period. Since the arrival time is random,how to ...
0
votes
0answers
44 views

Subsetting a GeoTIFF Image

I wish to create a subset of a multiband image in OpenCV / Python. The image is in the GeoTiff format. The bands might be 16 bit or 8bit. How do I achieve this using OpenCV and Python.
1
vote
2answers
147 views

Zero-padding in STFT

I a recent topic, it has been told that zero-padding in the STFT can improve it, and avoid some circular convolution related things. Here is my Python code for STFT : ...
0
votes
1answer
58 views

DWT with more precise scale

With a signal x of length $2^{16}$, the DWT (computed for example with pyWavelet's wavedec) has only 16 or 17 rows (the wavelet ...
0
votes
0answers
80 views

FFT by numpy or scipy

The figure I plot via the code below is just a peak around ZERO, no matter how I change the data. My data is just one column which records every timing points of some kind of signal. For example, I ...
4
votes
2answers
424 views

STFT and DWT (Wavelets)

STFT can be successfully used on sound data (with a .wav soundfile for example) in order to do some frequency-domain modifications (example : noise removal). With ...
0
votes
2answers
184 views

scipy.signal.wiener for audio processing

Does some have an example of what a Wiener filter (that can be used directly with scipy.signal.wiener) can be useful for, in sound processing (it seems that such ...
1
vote
1answer
120 views

Synthesize Digital Filter with Arbitrary Frequency-Response

fdesign.arbmagnphase is a MATLAB built-in function that will create a filter that best fits the frequency-response that it is given. I'd like to implement a similar function in Python. What ...
2
votes
1answer
370 views

Differences between Python and MATLAB filtfilt function

I'm trying to port some MATLAB code to Python and am running into some strange behaviour. I am implementing a 5th order Butterworth bandpass filter. The sampling rate is 30 Hz. Running MATLAB R2012b, ...
2
votes
0answers
59 views

Inpainting: which algorithm should I choose? [closed]

I have a 3D data set sampled on a regular grid shown in the Figure below. This data can be interpreted as an image where the point altitude is equivalent to the pixel intensity value. In the middle ...
4
votes
1answer
131 views

Haar series approximation of a function?

I'm trying to code the Haar wavelet approximation of a function. I'm a complete newbie. Edit Below is a pseudo-code of my algorithm for $f: [0,10] \to \mathbb R$, $f(x)=x$. I picked it here and ...
1
vote
1answer
108 views

Wavelet time extraction

I am trying to understand one simple thing in wavelets and I searched a lot, but did not get any idea. I need to perform Multilevel 1-D wavelet decomposition on my signal. I have arrays ...
1
vote
4answers
953 views

generating spectrograms in python with less noise

I'm trying to do something similar to Shazam (paper here) in Python. Basically the idea is to use FFT with sliding window to transform both WAV files and recorded audio to the same spectral ...
0
votes
1answer
100 views

Compute PSD from a CSV file

I'm sorry if my question might be simple, but I don't have a strong background on signal processing. I have a csv file of a 8 MHz bandwidth, sampled with a resolution bandwidth of 100 KHz. What I want ...
3
votes
1answer
89 views

Constraint on a filter

First of all thanks for your patience: it is the first time for me posting a question in this forum. I am not a DSP expert, but I should get by if you give me in depth explanation. This is an example ...
1
vote
2answers
517 views

Algorithm to zero pad data before FFT

I've seen some other questions on here about zero padding (like this one) but I'm still a little confused about my situation. I'm attempting to zero pad my input time series data, so I get an ...
4
votes
2answers
169 views

how can I calculate pitch deviation in a large collection of audio files?

I am making a software model of an existing digital synthesiser and I have made audio recordings of single notes with particular parameter settings. I made a program in C++ which sends a MIDI sysex ...
1
vote
1answer
216 views

with SciPy, how to generate waveform with common pulse shapes?

With Python/Scipy, if I have a simply BPSK signal sequence [1, -1, -1, 1, ...], how can I generate a real-valued baseband waveforms with oversampling rate ...
1
vote
1answer
545 views

Spectrogram of wav file

I am calculating spectrogram of a audio file of 36 second using the following code snippet: ...
1
vote
1answer
234 views

Has this Principal Component Analysis (PCA) been done correctly?

I have a set of 3D data points, indicated by the blue color in the picture below. I then project them onto the x-y plane, i.e. setting z values of all the points to 0, shown by the yellow color ...
0
votes
1answer
153 views

Implementing a phase-neutral band-pass filter using SciPy

Does the following code properly implement a phase-neutral band-pass filter using SciPy? ...
0
votes
0answers
195 views

How can I draw Bode plot for experimental time series?

I have time-amplitude data collected from an acceleration sensor. I need to plot the Bode diagram of the data. How can I do it? is it possible in MATLAB or Scipy? I am new to these programming ...
1
vote
1answer
1k views

What do I do with the result of an FFT?

So I am working on a project using digital signal processing, which I am not familiar with at all, and a lot of this is all new to me. I am using SciPy\NumPy to play around with code to understand the ...
2
votes
0answers
211 views

Ricean Multipath channel model implementation

I'm trying to implement a multipath ricean channel model. I had found several resources but I'm kind of lost with too much information. What I have from now is the following step: ...
3
votes
2answers
141 views

Fixed point channel model for OFDM system

I'm testing an OFDM system implemented in fixed point. The data format is Q11. My system work's fine but I need to test it under some channel for evaluation of the design before field testing. The ...
2
votes
1answer
721 views

Apply AWGN noise to QPSK-OFDM symbol

I'm working on an OFDM-QPSK based system and I'm having some trouble to match the BER of my system with the theoretical curve. My OFDM implementation fills all the subcarriers and have t_symbol s ...
2
votes
1answer
406 views

How to find the group delay of IIR filters in Python/SciPy

I sent a square wave signal (red) through a IIR filter (butterworth in this case), to make it more "realistic". Then there's a slight group delay in my output signal (blue). Is there a way to find out ...
4
votes
1answer
2k views

What is the phase and magnitude response of white noise?

I would like to create white noise in the frequency domain, and then transform it to the time domain using python. To understand the problem, I simply generated white noise in the time domain, and ...
1
vote
1answer
128 views

Amplitude calculation

I've got an array of different values representing the y-values in a plot: ...