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
0answers
30 views

How to approach Feature Extraction and Feature Selection part in machone learning in python?

I am a bit new to machine learning and I have the following questions: Question 1: When dealing with feature extraction with signals from sensors, what is the typical approach to extract features ...
0
votes
0answers
53 views

Feature extraction for exponentially damped signals

I am looking into exponentially damped signals where it is a stationary signal (after implementing the Adfuller statistical test) and I would like to look into how can I extract meaningful features ...
0
votes
0answers
15 views

Visualization of wavelets coefficients using python

I need to prepare a plot similar to figure below using coefficients of details of a wavelet transform.I am trying for more than 2 weeks to find how I can do it. This plot represents coefficients of ...
0
votes
1answer
33 views

Programmatically (e.g. in Python) adding clipping to an audio file? [closed]

I am trying to replicate the audio artifact exemplified here to a set of 1000 audio files. In particular, I would like to be able to 'clip' the louder parts of each sound clip so they become distorted ...
0
votes
0answers
43 views

Time domain to angular domain approach

I have a rotating shaft where I need to move from the time domain to the angular domain to look for vibration faults. I have the data from a tachometer. From another post I found these steps: The ...
0
votes
1answer
49 views

Upsampling question- Aliasing/imaging problem

I'm trying to study vibrations in a non-stationary shaft by upsampling the original signal. The original sample rate is at 25.6kHz, and it is being upsampled to 36kHz. In the FFT of the upsampled ...
0
votes
1answer
28 views

Frequency change detection in step-wise frequency chirp

I am driving a system with a step-wise frequency chirp from 50-400 hz with a frequency step of 0.01 hz. I am having difficulty identifying the points of frequency change as the data collected has an ...
0
votes
0answers
51 views

Wavelet transform : how to recover wavelet basis matrix?

In this article, It is said that an image $x$ can be sparsely expressed, if the basis is well chosen. It is said something like "$x$ can be expressed as follows : $x = \psi\theta$ [...] Many ...
0
votes
1answer
78 views

Analyze PCM data

I am getting some 16 bit PCM data (raw bits) from a serial port . I need to collect this stream of bits using some python application running in PC and store it somewhere(Assume it in an array). I ...
0
votes
0answers
35 views

Removal of EEG noise using cascading adaptive filtering technique

I am required to filter out noise from EEG data using preferably Python or MATLAB. My dataset contains values for 64-electrode EEG along with their time-corresponding HEOG (horizontal eye movement), ...
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
49 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
22 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
30 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
103 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
120 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 ...
0
votes
2answers
64 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
31 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
116 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
25 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
46 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
24 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
71 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
46 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
34 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
0answers
57 views

SIS Particle Filter Python Implementation

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

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

I have the following Python code ...
0
votes
1answer
43 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
66 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
51 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
121 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
165 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
29 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
40 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
105 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
85 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
29 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
50 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
27 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
111 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 ...
0
votes
1answer
115 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
73 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
45 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
35 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 ...
2
votes
2answers
88 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
35 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
52 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
36 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 2
3
4 5
16