Questions tagged [python]

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 packages often used for SP computations.

Filter by
Sorted by
Tagged with
0
votes
1answer
39 views

Measure how Straight/Smooth the Borders are Rendered in an Image

I have two images: I want to measure how straight/smooth the text borders are rendered. First image is rendered perfectly straight, so it deserves a quality measure ...
1
vote
1answer
51 views

How do I generate sound using Python3?

I am totally a newbie in signal processing. I want to generate and play sound for frequencies (1/3 octave band center frequency) 125 Hz, 250 Hz and 500 Hz respectively, each for 30 seconds and with ...
0
votes
0answers
24 views

remove outlier spectra

I have a set of spectra (hyperspectral imaging) per class (~10000) and want to remove those spectra which behave different then the mean of the spectra. I want to remove the entire spectra (not ...
0
votes
1answer
52 views

How to Save FFT output for fast read-in?

For a project, I'm reading in hundreds of short (4 sec) wavefiles and giving them to scipy fft for the frequency information for further processing/experimenting in various ways. Problem is, I want to ...
1
vote
1answer
115 views

Disagreement between Analytic Convolution and FFT Convolution

I've been working on a small project, and as a part of this I need a function that can compute the structure function of the input data. In the process of writing this part/testing it I found the ...
-1
votes
1answer
161 views

Time series in spectrogram() and spectrum()

I'm trying to create an order map for order analysis from my accelerometer data. To do that I want to resample my acceleration data and their time stamps in python. I found ...
1
vote
2answers
90 views

Wind Turbine Vibration Analysis: Which approach?

I'm analysing vibration data from 4 wind turbines (WTs). 8 different sensors are sampled at 25.6 kHz for 10 seconds once a day. I have data from around 400 days (intervals). The plot underneath is for ...
0
votes
1answer
94 views

How can I cut exactly the first harmonic (H1) from a FFT of an image

I have 4D( 2D + slices along z axis + time frames) gray-scale image for the heart beating on different moments. I do like to take Fourier Transform along time axis(for each slice separately), and ...
0
votes
0answers
199 views

Why are MATLAB and matplotlib spectrogram value different?

I'm doing a signal processing to put data into my neural network. I noticed a difference between MATLAB and Python ...
0
votes
1answer
26 views

The complexity of such function run in Matlab

The below function is representing an algorithm, so how can I get its complexity? I don't mean the time of running by using the tic .. toc, I mean how many operation (Additions and multiplications) ...
0
votes
1answer
75 views

How do I deconstruct a signal with fast fourier transformation in Python?

I want to use the fast Fourier transformation in python to deconstruct a periodic signal into its harmonic periodicities. Since the FFT of the original signal is the same as adding the FFT of the ...
0
votes
0answers
33 views

Smoothing the signal by integrating and then differentiating using a gaussian CWT

Recently, I have started implementing CWT on accelerometer signals. A method stated in an article stated that the signal is smoothed by integrating and then differentiating the signal using a Gaussian ...
2
votes
2answers
136 views

what is the difference between the convolution and differentiation over image in image processing?

In image processing the differentiation and convolution are the terms that are used interchangeably. What is the difference between applying convolution and differentiation over the image? How we ...
0
votes
0answers
98 views

Frequency and Order maps

I'm new to python and I'm using it to analyse accelerations from an accelerometer ie. vibration analysis. For that I need to plot 2 types of diagrams: 1) Frequency map; frequency and time on the axis ...
0
votes
1answer
42 views

Why we have to multiply the images with $(-1)^{x+y}$ to center the transform in frequency domain filtering?

To perform the filtering infrequency domain we perform multiplication of $(-1)^{x+y}$ why??
1
vote
1answer
88 views

SIS Particle Filter Python Implementation

Lets say I have some time series data which I generated like this: ...
0
votes
1answer
41 views

What's the purpose of augmenting an image with a random “gradient”?

I have the following Python code ...
0
votes
1answer
44 views

bandpass waveform detector?

I am hoping that somebody might have a good idea for detecting low-frequency pulses in some rather noisy data (I'm working on improving the snr). I have repurposed a "Raspberry Shake 1D" to record the ...
0
votes
2answers
68 views

Help find the bug in my SPLL code

In an attempt to get myself up to speed with PLLs I'm trying to implement Example 1 from this tutorial, in Python: https://wirelesspi.com/phase-locked-loop-pll-in-a-software-defined-radio-sdr/ (search ...
0
votes
1answer
54 views

Reducing one frequency in song

How would I take a song input and output the same song without certain frequency ranges? Based on my research so far, the song should be broken down into chucks, FFT it, reduce the target frequency ...
0
votes
2answers
268 views

Why am I not getting a flat phase for a Gaussian pulse when doing a Fourier transform in Python?

I have been trying to obtain a spectrum and a spectral phase of a Gaussian pulse using the Fast Fourier Transform provided with numpy library in Python. Here are ...
0
votes
0answers
353 views

How to set the measurement matrix of opencv kalman filter [OpenCV+Python]

I am working on a tracking application where I use the kalman filter to validate my current measurement of the position. I use the code from this question: How to find the probability of Kalman filter ...
0
votes
0answers
37 views

Why is the length of smoothed data from filtfilt always double of the input?

I am trying to filter the data I have using python with the code : ...
0
votes
0answers
52 views

Detecting and Recognizing a pattern in the 2D-FFT

More theory before I ask a practical question based on the task I have. I've discovered that performing a 2D-FFT (python or matlab implementations) on some test imagery I have results in a unique ...
0
votes
0answers
199 views

Getting back the original x axis after IFFT-FFT in Python

I have an analitically generated spectrum $I(\omega)$, x axis represents angular frequency, y represents intensity. The spectrum is centered around some frequency value, which is often called central ...
0
votes
1answer
141 views

Subtract background from 2D signal using spectral methods

I have a 2D signal, with intensity as a function of two angles (alpha and beta), as shown below. This contains a background, which makes the signal's base-surface locally convex-concave. I would like ...
0
votes
0answers
79 views

Parameters for inverse image distortion

I'm trying to simulate camera (barrel/radial) distortion, and to reverse it. I.e. a process that would do: Image --> Distorted Image --> ~ Image In ...
0
votes
0answers
57 views

FIR coefficients from complex frequency response with regards to sample rate

I have trouble understanding how the sample rate of a DSP system is taken into account when creating FIR coefficients from a complex frequency response. I work with Jupyter and Python 3.7. The ...
0
votes
0answers
41 views

Pandas resample.mean()

I have a question to all you filter experts out there. I have some engine data sampling irregularly at about 50Hz. Recently I've been downsampling via the Pandas resample().mean() method. Basically ...
0
votes
0answers
13 views

Overlaying A Distorted Text According to its Background

I have several dirty background images, sample image is below: I want to overlay a text on it but I want the text to be as distorted as the background. Example, if the background is a bit wavy, I ...
0
votes
0answers
197 views

Get autocorrelation function from the power-spectrum (python)

I am trying to compute the autocorrelation function of a signal for which I only know the power-spectrum. In order to test my approach I wanted to try it out on the spectrum of $1/f^2$ noise for ...
0
votes
0answers
20 views

Cancelling effect of a system on a signal

I have a signal $A(t)$ and it's been transformed using an unknown system to a signal $A'(t)$. I also have another output signal $B'(t)$ from the same system and I want to retrieve the corresponding ...
1
vote
1answer
191 views

Fast Fourier Transform for varying period (Order analysis)

I am trying to do a fast Fourier transformation on accelerometer data from a shaft rotating at varying speed in Python. What I have done so far: 1: The original plot was in the time domain, and I ...
0
votes
1answer
175 views

Decimating Non-Uniform large time-series data

I'm working with accelerometer data that is sampled at a non-uniform rate. There are major gaps in the data. Below is a scatter plot of the data I can also give a sense of the frquencies at which ...
0
votes
0answers
101 views

Apply a butterworth filter to columns of a large dataframe

I have a large dataframe (7200, 132) and each column is a signal. I want to apply a butterworth filter to each signal, however, I'm not sure how to do this in Python. When I do it in matlab I can ...
1
vote
1answer
38 views

linear-expansion filter for image (2D array)

I am working in python analyzing 2D arrays and I am looking for a filter or some other routine that would provide a linear expansion of an region boundaries in a 2D array with binary regions (i.e. a ...
3
votes
2answers
103 views

Deconvolution of an Image Acquired by a Square Uniform Detector

So, I acquired some images by scanning a radiation source with a square detector like in the following gif. Where the dashed grid represents reality, the 3x3 square my detector, and the 4x4 my ...
0
votes
0answers
42 views

ADSR parameter identification from envelope data

I'm trying to work out how to identify (or predict) ADSR parameters (attack time, decay time, sustain level and release time) from envelope data of real signal (or 'raw' data, but I think getting it ...
0
votes
1answer
130 views

How to allign audio signals after DTW?

Hello I am not a domain expert in signal processing but I need to align two audio signals. I have seen the following page https://librosa.github.io/librosa_gallery/auto_examples/plot_music_sync I ...
0
votes
0answers
40 views

Strange signals in wifi channel

I am currently working with a USRP B200 mini-i to receive 802.11 signals from various usb wifi devices. When sending packets with the USB device over a channel, lets say 2.412GHz, i can't really see ...
1
vote
1answer
208 views

How to manually implement convolution with FFTs?

I'm trying to manually implement a convolution using FFTs and it isn't working as expected. I know I'm probably missing some subtlety with padding, shifting, or conjugation, (all of which I've tried ...
1
vote
0answers
31 views

How to create different Time frequency images from a data

I'm new to Python. I have a time series in a CSV file that has about 5000 rows and 3 columns. I have split the data into training and testing in ratio 70:30 respectively. However, I have a problem ...
0
votes
0answers
44 views

Kalman-Filter Estimate the position

I am quite new in this field and trying to learn Kalman-Filter but i am quite lost how to start my task. This is the file description Problem. I guess the state vector x must be the poistion of ...
0
votes
1answer
43 views

Comparing spectra from hyperspectral images

I extracted the mean spectra of regions of interests of different tissues from hyperspectral images. How to compare those spectra by the difference of their reflectance and their spectral behavior (...
0
votes
1answer
34 views

script to check zero crossings to check if microphones phases are aligned

I have 'n' microphones placed in square fashion and I want to make sure that all the channels must be aligned in time exactly the same if the signal is equidistant from all the 'n' microphones i.e. in ...
0
votes
1answer
683 views

generate a repeated square pulse train in python

Generate a pulse train with -2dBFS pulses of 20 sample duration every 8 seconds. I have referred here to generate a pulse train but not able to repeat it. How can I repeat this audio signal every 8 ...
0
votes
1answer
107 views

inverse discrete FFT in python, multiple times?

I was wondering what really happens when taking the inverse discrete FFT on some set of numbers, for 3 times? Because looking at it, it looks like we're getting an output that is identically with the ...
0
votes
0answers
29 views

modelling radar system for image generation

I am trying to find or derive some model for radar using python and blender which should hopefully create a simulation of what a radar image of the blender environment would look like. I have been ...
3
votes
0answers
3k views

Plotting a scalogram of a signal's Continuous Wavelet Transform (CWT) in python

So I've been learning about wavelets for a few weeks because I'd like to use them in a research project I'm working on and I've been trying to grasp the general ideas behind them.I've been struggling ...
0
votes
1answer
129 views

python3: speech recognition - calculating features of a WAV file

I am supposed to do this as a school project, but I am kind of lost when it comes to signals and would appreciate your help. Also, English is not my first language, and I will be translating the ...

1
3 4
5
6 7
18