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
22 views

Detect static in audio with Python

I have a program running in python. It samples the demodulated FM output from an SDR. When there is no transmission, the input to the program is completely static. How can I go about squelching the ...
0
votes
1answer
20 views

Making a 3D point cloud from multiple RGB-D images

I have multiple (4 kinect) cameras that give RGB-D (color and depth) information of the same scene from different points of view. I want to make a 3D point cloud out of these depth maps. I can get a ...
1
vote
0answers
24 views

ModuleNotFoundError: No module named 'custom_OFDM' with custom Python OOT Block

I am using gnuradio to develop custom OFDM blocks using Python. I have used gr_modtool to create my blocks and import them into gnuradio. When I try to run my flow graph using one of my blocks I get ...
0
votes
0answers
41 views

How to calculate PSD if i have power vs freq spectrum?

i have a signal something like this how to calculate PSD? i have freq from 191000200 to 196500000 time gap or delta t = 1 or 2 sec, (what i mean is [tn] - [tn-1]) i will be computing in python any ...
-1
votes
0answers
28 views

add noise based on interest

I am trying to add the Gaussian noise of 20 decibel , normal distributed to a seismic signal I have simulated (input data), to get a noisy data. I wrote a python function to generate and adding the ...
0
votes
0answers
15 views

Fbank back to wav

Here's my problem. I have some wav files. I use the wavs as input to compute the fbanks. Then I want to do some stuff with the fbanks and then I want to recreate a wav file associated to the new fbank....
0
votes
1answer
23 views

Remove audio signal component under certain frequency in python

I want to remove all signal components under 10KHz in one audio file. Below is my code ...
2
votes
1answer
52 views

Exponential Swept Sine Distortion

I was able to get passable results on fundamental measurements using and exponential swept sine. Now I am trying to get distortion information from the same measurement but am puzzled by the results. ...
2
votes
2answers
121 views

Does chirp have constant magnitude frequency response?

Pg. 223 claims so, yet my results via DFT differ: Is the textbook wrong? My attempted explanations: (code) DFT vs DTFT: "frequency response" is computed via latter. Still, DFT should ...
0
votes
0answers
13 views

How do I extract n-dimensional cepstral coefficients with a sliding Hamming window in PyTorch?

I am trying to replicate the features from this paper, described as follows: MFCCs of speech frames are computed using a mel-scale filterbank. We extract 20-dimensional cepstral coefficients with a ...
0
votes
0answers
24 views

Interpolationg phase and magnitudes, Transformation function

I am trying to filter signal x(n), n = 150. I made a filter with few frequency points on the x axis , [-11., -9., -3., -2., -1., 1., 2., 3., 9., 11.]) ...
0
votes
0answers
33 views

Is it possible to apply a fractional delay to even-length signals using the frequency-domain phase shift method?

Suppose I have the following Python function to apply any real-valued circular delay to a signal by multiplying by a phase factor in the frequency domain: ...
0
votes
0answers
17 views

Better way to turn time series spikes/high frequencies into discrete signals?

I am just wondering if there is a better way to transform time series data spikes/high frequencies into discrete signals? Currently, I have time series data that I am applying a median filter to loop ...
1
vote
1answer
33 views

Change the melody of human speech using FFT and polynomial interpolation

I'm trying to do the following: Extract the melody of me asking a question (word "Hey?" recorded to wav) so I get a melody pattern that I can apply to any other recorded/synthesized speech (...
3
votes
2answers
225 views

Are IIR filters (and specifically Butterworth filter) causal?

I am new to signal processing. I am learning now about filtering and I am trying to implement high pass filter (HPF),and later band-pass filter (BPF). I implement the filters in ...
2
votes
0answers
52 views

Filtering a square signal with a median filtering to preserve the edges

If needed, you can find my first post for this problem here. I am trying to clean the following signal: As proposed in the comment, I tried to use this post proposing 2 methods: median filtering and ...
0
votes
1answer
42 views

Applying a lowpass filter to a noisy square signal leads to a shift of the signal

My knowledge of analog and digital signal analysis is behind me.. thus I do not have enough confidence in my procedure to analyze my signal, and I do not know which direction to pursue to improve. I'm ...
1
vote
1answer
15 views

Calculating the peak power of a signal on python

As far as I've researched, the energy and power of a given (discrete) signal are given by $$E = \sum_n \left|x_n \right|^2$$ $$P = \lim_{N\rightarrow\infty}\frac{1}{2N+1}\sum_n \left|x_n \right|^2$$ ...
0
votes
0answers
14 views

Discrete Fourier Transform on images using OpenCV

I applied DFT on an edge image (attached both). I expected the output image to not have very low frequencies (~0).[Refer this link for more info] But the output I got consisted of low and high ...
0
votes
1answer
24 views

Showing specific values in an STFT plot

I have a short term fourier transform plot that I plot using matplotlib's pcolormesh() function: If I zoom in the plot, I see this: Now, I want the plot to just ...
0
votes
0answers
12 views

Image processing with .HPG files

I have files with extension .hpg and I want to perform image processing on those file as they are hp plotter file. I tried googling but no luck there. hence hope someone can help me tackle this with ...
1
vote
0answers
48 views

Implementation of Cepstrum in Python

Actually I want to denoise a signal. I know how can I implement FFT in python to denoise it. This is the implementation which I use(From this Kaggle notebook): But I don't know : How can I use ...
0
votes
0answers
37 views

Reconstructing a signal from multiple filtered copies using overlapping tapered windows

I have an audio signal that I need to process and analyse in blocks. I've now decided to process it using overlapping non-symetric Hanning windows of length M = 9600 and a hopsize of R= M/2. I zero ...
0
votes
1answer
34 views

Equal probability quantizer in Python

I am trying to apply Haralick textures to a SAR image (float32). As far as I know, the image first needs to be quantized to a reasonable bit depth prior to calculate the co-ocurrence matrix. In the ...
0
votes
1answer
34 views

Side lobe reduction [closed]

How can side-lobes be reduced in an Level-1 SAR image in Spatial Domain?The input here in this problem is an complex SAR image?which parameters(like amplitude) of SAR image should be considered mainly ...
1
vote
1answer
30 views

brightest amplitude of an image pixel

How can amplitude of an image pixel be calculated?Do we need to perform any FFT on the image? and how to find the brightest value among the amplitudes in python or matlab?
1
vote
1answer
32 views

Filtering artefacts and filtering short signals

I have a signal from EEG sensors and I try to denoise it from AC frequencies. For that reason, I estimated PSD of my signal and found that 50 Hz and 100 Hz are likely to represent noise. I constructed ...
0
votes
0answers
24 views

How do I change the sampling rate without changing the speed and pitch in Python?

I am building a voice recognition algorithm, and the use case specifies that it should be able to identify the targeted speaker from various audio sources, which means that it must be able to process ...
0
votes
0answers
34 views

How can i get Celsius/kelvin temperature from a thermal image in python language?

How can I convert RGB values of the thermal image into Celsius or kelvin temperature in python? Here is the thermal image taken by a FLIR device: Here I am reading image using OpenCV and getting the ...
0
votes
1answer
24 views

Error introduced by smoothing filter at the end of a processing block

I'm running analysis on a multichannel audio signal and due to the size have decided to process it in blocks (my computer doesn't have enough memory to process it in one go). Some of the data produced ...
0
votes
2answers
46 views

My 3x3 Weighted Median Filter doesn't seem to be improving my image quality

In order to reduce noise in my training dataset,I attempted a WMF whose weights are shown in a 2-D array as follows(values finally get normalized by division by 15: ...
0
votes
1answer
37 views

Possible to get transfer function coefficients from window?

I am hoping to use scipy.signals.filtfilt() to smooth some signals in Python, and wanted to build the filter based on a window like a hanning window or whatever. E....
0
votes
1answer
28 views

Eroding noisy borders of polygons in an image

I am new to image processing, and this is the task at hand. I have a mask image of shape 500x500x1 that contains polygons. These polygons (=vector data: common term in remote sensing and GIS) are ...
0
votes
0answers
21 views

Comparing mechanical signals with different length

I couldn't find any solution for this that would work for me I'm working in python. I have two similar signals that I can plot Force x Angle. (problem simplified) One plot (angle x force) has length ...
1
vote
1answer
37 views

FFT shows systematic deviations from analytical result

I am calculating the numerical Fourier transform of an exponential decay exp(-|t|) and compare it to the analytically calculated result, a Lorentzian. I find that the numerically calculated spectrum ...
0
votes
0answers
24 views

Get displacement from acceleration with DFT

I looked at the already existing topics: here, here or matlab code, finally here I tried to create my python code but it is not working : ...
0
votes
0answers
43 views

Synchronization of tx and rx in sdr

I am implementing a FMCW radar using bladerf sdr: When reading the output from the vector sinks, the outputs are not synchronised.How should I synchronise them? is it possible to do so using gnuradio ...
0
votes
1answer
52 views

Faded line in spectrogram for a chirp

I've generated this spectrogram using wavelet convolution. The chirp is generated like so: ...
0
votes
0answers
36 views

Python equivalent code for Matlab bandpass function

I have used a bandpass filter function in Matlab as follows ...
0
votes
1answer
30 views

Plotting a Time Frequency contour/colormesh plot of a Discrete Wavelet Transform

I have a pressure vs time data of a noise on which I wish to perform discrete wavelet transform. I have divided my frequency range into 1/3rd Octave Bands and have calculated sound pressure level at ...
1
vote
0answers
18 views

Is my implementation of Generlized Pencil-of-Function correct?

I have a time-series data that should be of the form $$ f(t) = \sum_nA_n(e^{\alpha_n t}+e^{-\alpha_n(T-t)});\;\alpha_n=\eta_n+i\omega_n;\;i=\sqrt{-1} $$ and I want to find parameters $A_n$, $\eta_n$, ...
3
votes
1answer
63 views

Understanding Parseval's Theorem with Discrete Wavelet Transform

I have difficulty to understand the results I get with implementing Parseval's Theorem in Python to DWT. I have the good results getting the Energy with Fourier transform and the time series in python:...
0
votes
0answers
55 views

Filter a negative SNR signal whose frequency spectrum lies inside the noise frequency spectrum

I am a newbie in Signal Processing and need your suggestion in the following problem. My signal amplitude is 10 times weaker than the noise. Furthermore, the frequency spectrum of the noise and the ...
4
votes
1answer
138 views

A-weighted Digital Filter for 1/3rd Octave Band Analysis

I want to do a 1/3rd Octave band analysis on a noise signal. But the sound pressure levels should be in dB(A), i.e., and it should be A-weighted. For this, I am using the A-weight function from this ...
0
votes
0answers
34 views

How to correctly pass filter states from one processing block to the next

I'm processing a 4 channel audio signal and due to memory requirements need to process the signal in an arbritrary number of blocks. To ensure consistent filtering between blocks I've been told I need ...
0
votes
0answers
104 views

Using FFT for implementing a filter bank

I am trying to use Fast Fourier Transform (FFT) for decomposing an audio signal into 8 sub-bands according to this link but the problem is the frequency response of the result contains only the first ...
0
votes
1answer
39 views

Receiver function, frecuency domain deconvolution not giving logic results

I'm working on some code for receiver function method in seismology. For anyone one not into the topic, it's just a deconvolution of two time series (seismograms). This can be done in the time domain ...
1
vote
2answers
69 views

Decimation Question about using a low pass filter before downsampling

I have a bunch of audio files that have a sample rate of 380kHz, however I would like to reduce this sampling rate to 44.1kHz. From doing some research online, it seems like I will have to use a low ...
0
votes
1answer
46 views

Mulitplication in Frequency Domain as a Similarity Measure of Audio Clips

I have an audio clip and I copy a 256-point part satarting at 10th second. Then I create a 256-point frame on the original clip. At every itreation, I calculate the DFT of the frame, multiply it with ...
0
votes
1answer
38 views

Implementing a finite impulse respone (FIR) filter for computing the derivative of a discrete signal

I am trying to reimplement an algorithm on my own. In the description of the implementation, it's written that they compute the derivate of a series of value using a [-1/2, +1/2] finite impulse ...

1
2 3 4 5
16