2022 Developer Survey is open! Take survey.

Hot answers tagged

22 votes

When concatenating sine waves, how do I phase shift in order to prevent "pops" caused by sudden jumps in amplitude?

A simple solution is to implement the waveform in phase versus time instead of frequency versus time which can then facilitate phase continuous transitions. Frequency is the time derivative of phase, ...
user avatar
  • 36.2k
9 votes

Signal processing in Python vs C++ (band-pass filter)

Not really an answer but too long for a comment. Standard software development and debug techniques should solve this Don't use code on real data before it has passed all unit tests First write the ...
user avatar
  • 30.9k
7 votes
Accepted

Can the deconvolution Wiener filter reduce noise without having a blurred image?

For Salt and Pepper noise on medical or real world images using the Wiener Filter isn't recommended. The Wiener filter basically takes advantage only on the knowledge from the spectrum of the data. ...
user avatar
  • 39.5k
6 votes

Python vs Matlab? Which one better for image processing?

I have spent the first 20 years of my career working extensively in MATLAB for signal processing applications. Six years ago I gravitated over to Python out of curiosity and it has since completely ...
user avatar
  • 36.2k
4 votes

When concatenating sine waves, how do I phase shift in order to prevent "pops" caused by sudden jumps in amplitude?

IMO the best way to implement this is a rotating phasor. Recall that $$ e^{jx} = \cos(x) + j \cdot \sin(x) $$ and $$ e^{j\omega(n+1) } = e^{j\omega n } e^{j\omega}$$ That means we can calculate the a ...
user avatar
  • 30.9k
3 votes

When concatenating sine waves, how do I phase shift in order to prevent "pops" caused by sudden jumps in amplitude?

Use phase from the start, and do not just multiply by time t - this is vital For each sine wave, use a variable to hold the current phase. Then for each time step, multiply ...
user avatar
  • 291
3 votes

Can the deconvolution Wiener filter reduce noise without having a blurred image?

Can a deconvolution Wiener filter reduce noise without blurring? Maybe. Maybe not. There is not one Wiener filter. Any concrete "Wiener filter" is a plain old filter that has been ...
user avatar
  • 8,141
2 votes

Python vs Matlab? Which one better for image processing?

MATLAB's Image Processing toolbox is much richer than what you'd find on Python except OpenCV. OpenCV on Python doesn't feel natural yet still give you access to basically the largest library of image ...
user avatar
2 votes

FFT of a gaussian signal in Python

There are two issues: The time axis is not long enough to capture a sufficient length of the Gaussian. The FFT is not properly scaled. For the first item mentioned regarding the time axis, the ...
user avatar
  • 36.2k
1 vote

Impact of STFT window function and FFT length on computation time

Some prefer to use the minimum rather than the average compute time. The idea being that the core phenomenon is the «noiseless» compute time, and that noise only ever adds to that time, never ...
user avatar
  • 2,063
1 vote
Accepted

Impact of STFT window function and FFT length on computation time

I think this is just measurement noise. You would not expect the window to make any difference (if it's precomputed). However the window length should make a small but consistent difference and that's ...
user avatar
  • 30.9k
1 vote

When concatenating sine waves, how do I phase shift in order to prevent "pops" caused by sudden jumps in amplitude?

One solution I see is to concatenate the two, different amplitude sines at their zero crossings, making sure they have the same phase (e.g. if one goes up, the other has to go up, too). This way, the ...
user avatar
1 vote
Accepted

Butterworth filter cutoff attenuation is not exactly 0.707(-3dB)

Filter needs time to settle down. This settling process altered the beginning of time domain data and created the small difference. I took the second half of time domain filtered data and got a ratio ...
user avatar
  • 11
1 vote

Butterworth filter cutoff attenuation is not exactly 0.707(-3dB)

What you see there are margin issues. By not applying a window function to your signal before the FFT, you effectively convolute your spectrum with an $\text{si}$ function, which leads to artifacts ...
user avatar
  • 1,619
1 vote

How to achieve a periodized Mexican hat wavelet with period L by using Python?

This is quite straight forward, if you use Python's numpy library. It is capable of array operations and thus, this task is just a few lines. ...
user avatar
  • 1,619

Only top scored, non community-wiki answers of a minimum length are eligible