Hot answers tagged

14 votes
Accepted

Which order to perform downsampling and filtering?

You need to filter first and then downsample. Otherwise, you will run into aliasing problems. I.e. frequencies that are above 30 Hz will create images within your frequencies of interest. You can ...
8 votes
Accepted

How does averaging increase the Signal to Noise ratio?

Intuitively this is true, because averaging a zero mean noise processes approximates its expectation value - which is zero. More rigorously: If the signal $x$ that you want to observe (estimate, ...
  • 4,061
5 votes
Accepted

Cross correlate a 2D array

What you have (conceptually) is not a 2D array but a collection of 1D arrays. correlate2D is designed to perform a 2D correlation calculation, so that's not what ...
  • 1,329
4 votes

How does averaging increase the Signal to Noise ratio?

averaging only increases S/N if the "S" component of the items being averaged is correlated and the "N" component is not correlated. when adding perfectly correlated values, then the overall "voltage"...
4 votes

Which order to perform downsampling and filtering?

Since I can't comment on this particular site I'd say this, consider the following before you do what you're trying to do. Due to the Nyquist law you want your sampling frequency to be that of the ...
  • 141
4 votes
Accepted

Bandpass filter to get EEG frequency bands?

As the frequency bands are simple frequency ranges, I wonder if I can use several bandpass filters to get them (instead of using WPT / FFT)? Sure! That's how it's usually done! Is there any ...
4 votes
Accepted

What do certain terms mean in EEG processing describing frequency bands?

The short answer: The brain is a huge set of neurons that produce electrical activity as part of their function. We can sense this electrical activity and correlate it with brain states (alert, asleep,...
  • 10.1k
4 votes

How to correctly compute the EEG Frequency Bands with Python?

I believe there is a much simpler way to do this with numpy.fft.rfft and numpy.fft.rfftfreq. In the below example, I have two ...
4 votes

Learning the Coefficients of Auto Regressive (AR) Model Using Least Mean Squares (LMS) Filter for Signal Prediction

In order to use the LMS to learn an AR Model one should use the predictor variant of the Least Mean Squares (LMS) filter. Basically we predict the $ x \left[ n \right] $ sample using past samples: $ \...
  • 42.4k
4 votes
Accepted

What Is Meant by Clustering of ICA (Independent Component Analysis) Components?

Since ICA is a generalization of PCA (Principal Component Analysis) one could use it for intuition about the process. In PCA we create a new coordinate system where we can represent each data sample. ...
  • 42.4k
4 votes

How does SciPy's Welch function change the shape of the data?

Assuming that "6041" is a typo and it's actually "6401" that would be expected behavior. The result of welch() is a frequency domain vector the ...
  • 33.8k
3 votes

Phase locking value / phase synchronization

There can be several ways to calculate the Phase locking value (PLV). For relatively mono-component and high SNR (well filtered)-Time domain signal can be converted into analytical signal using ...
3 votes
Accepted

direct Frequency domain FIR filtering vs Overlap-add method

An FFT of twice the filter order is kind of short. Take a look at the "Choice of FFT size" section from this article I wrote a while back. Also your whole signal will fit into a reasonable ...
3 votes
Accepted

What does "real time" signal processing mean?

'Real time' is a concept from computer engineering. A real time system is one that is guaranteed, by design, to execute a function or routine in a certain time T, or less. For example, a real-time ...
  • 13.9k
3 votes

What does epoch mean in EEG?

EEG epoching is a procedure in which specific time-windows are extracted from the continuous EEG signal. These time windows are called “epochs”, and usually are time-locked with respect an event e.g. ...
3 votes
Accepted

What is the meaning of negative second for a Morlet wavelet?

Continuous wavelets with symmetric envelope are often described, by convention, on a symmetric time interval: $[-T,T]$. The Gaussian being of infinite support, this means it is truncated. This is ...
3 votes

Can an EEG be re-sampled to fix a poor voltage resolution?

The bit depth basically indicates how accurately your analog-to-digital converter records and reproduces the signal (Fig. 1). A higher bit depth means that more subtle fluctuations in the waveform are ...
  • 288
3 votes

Can Kalman filter remove 50 Hz noise?

With your edit it becomes clear that you've modeled your problem incorrectly: While the offending signal appears shortly with a frequency of 50 Hz, that is by no means the frequency content of the ...
3 votes

Difference between bandpass filter and using fast fourier transform to extract power of frequency bands

An FFT extracts frequency bands, similar to a bank of (mediocre) bandpass filters. An FFT is just a bank of bandpass FIR filters, all of equal length, that because they are in default form ...
  • 34.1k
3 votes
Accepted

Doing the inverse of the fourier on EEG data?

I am assuming the original EEG data was real (which seems reasonable) and therefore can conclude that the result given represents just the positive frequencies; since the complete spectrum would be ...
  • 38.3k
2 votes
Accepted

Epoched data to a continuous signal

You may have problems related to discontinuity and this can give small glitches in your signal, if you hear your signal you will notice pops/clicks artifacts at every 100 epoches edge, one way to try ...
  • 1,943
2 votes

How do you apply Kalman Filter to track a signal?

The power of the Kalman filter lies in the effect that it predicts the next "state" of the signal/object by using an internal model of the process. That why it is very effective for physical processes,...
  • 41
2 votes
Accepted

Why use Wavelet Denosing instead of Band pass Filtering

If you use frequency selective filters for denoising you implicitly assume that the desired signal and the noise occupy different frequency bands. You only remove noise in frequency regions where ...
  • 80.9k
2 votes
Accepted

Why is this MATLAB butterworth filter giving me wrong results

Your filter is passing only between 1 and 63 Hz, assuming that you meant to say that the sampling rate is 128Hz. Since you are removing everything below 1Hz, the plot you have looks reasonable. The ...
  • 2,180
2 votes
Accepted

Pre-processing EEG signals

The advantage to using FIR-filters here is that you can (relatively easily) account for the delay. Assuming filters with constant group delay (see examples here,) - which seems likely given that your ...
  • 2,180
2 votes

Phase locking value / phase synchronization

If you have two numpy arrays of phase data theta1 and theta2 (in radians), you can calculate phase locking value in numpy without too much effort: ...
2 votes
Accepted

What could be causing these humps every 10 Hz on my PSD estimate data?

These are indeed artefacts from the stimulation ...
  • 3,569
2 votes
Accepted

How is the topo / scalp map from an EEG Signal with ICA created?

In general, the topographic map describes the distribution of electrical activity across the brain as measured in a number of well known "stations" (electrodes whose position is known) on the scalp. ...
  • 10.1k
2 votes

What does epoch mean in EEG?

In order to answer your question in a simple way, imagine we have a signal x with length of 60-s and our sampling frequency is 1 Hz. The matrix representation of your EEG signal would be 1*60 array ...
  • 145
2 votes
Accepted

How to compute the power bands of an eeg signal using python?

Here is some code that may solve your problem: ...

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