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 ...
Maximilian Matthé's user avatar
6 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 ...
lxop's user avatar
  • 1,369
6 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. ...
Learthgz's user avatar
  • 132
5 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 ...
Hilmar's user avatar
  • 44.7k
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,...
A_A's user avatar
  • 10.7k
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 ...
Marcus Müller's user avatar
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 ...
launchpadmcquack's user avatar
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 ...
eco's user avatar
  • 141
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 ...
Laurent Duval's user avatar
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 ...
Perscitius's user avatar
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 ...
AliceD's user avatar
  • 298
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 ...
Marcus Müller's user avatar
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 ...
hotpaw2's user avatar
  • 35.3k
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 ...
Dan Boschen's user avatar
  • 51.3k
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: ...
blublublue's user avatar
2 votes
Accepted

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

These are indeed artefacts from the stimulation ...
geometrikal's user avatar
  • 3,616
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. ...
A_A's user avatar
  • 10.7k
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 ...
maia's user avatar
  • 143
2 votes
Accepted

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

Here is some code that may solve your problem: ...
Filipe Pinto's user avatar
2 votes

How to apply Hamming Window and compute FFT?

Three possible issues: The Discrete Fourier Transform definition that the MATLAB fft uses does not preserve the energy of the vector. Multiply it by $1/\sqrt{N}$, ...
Ill-Conditioned Matrix's user avatar
2 votes
Accepted

Filtering artefacts and filtering short signals

All real-time filtering (as opposed to post processing) wirh FIR and IIR filters will have start up transitions based on the state of the filter at start up. For optimum rejection of AC noise , ...
Dan Boschen's user avatar
  • 51.3k
2 votes
Accepted

MATLAB's designfilt vs butter function

The function butter, as the name indicates, is used to construct the Butterworth IIR filter. The function designfilt can be used ...
V.V.T's user avatar
  • 1,729
2 votes

Should I be using FFT

According to the scipy.fft doc page, if you don't specify the FFT size it will use FFT size equal to the length of the input. At sampling rate of 256 Hz and input size of 100 samples, each frequency ...
Engineer's user avatar
  • 3,032
2 votes
Accepted

What's actually inside these EEG values?

Accessing the data requires a login that I don't have, so here is a wild guess. It looks like the Matlab data is indeed in $\mu V$ but with a very large DC bias (which is fairly common for EEG signals)...
Hilmar's user avatar
  • 44.7k
2 votes
Accepted

How to feed multi-channel spectrograms to Deep Neural Network?

Concatenation is how this is usually handled, but usually you view your data a as a stack of spectrograms. If you have C channels each with, then for each channel ...
Bob's user avatar
  • 2,373
2 votes
Accepted

What factors could affect the scale of PSD estimation?

I think the issue here is scaling. Possibly contrary to popular belief, there is not a singular method of scaling that works generically for all PSD estimates, as each PSD type estimates the spectrum ...
Baddioes's user avatar
  • 788
1 vote

Common Spatial Pattern for EEG Signals

I am not sure I understand your question, but for the particular question How are features of the EEG Signal extracted then? CSP gives you a matrix $W$ that represents a spatial transformation of ...
YuppieNetworking's user avatar
1 vote

Spatial spectrum of EEG data: non-uniform DFT?

QUESTION 1: Do you think an nonuniform DFT makes sense for such an electrode grid? The answer to that specific question is yes. QUESTION 2: The reason I would like to used the nonuniform DFT is ...
A_A's user avatar
  • 10.7k
1 vote

How do I know if my EEG signal need denoising?

It primarily relies on, what are you looking for in the EEG: define the frequency band that relates with the phenomena you are interested to investigate and filter out the rest (e.g. for sleep events ...
hH1sG0n3's user avatar
1 vote

How to correctly compute the EEG Frequency Bands with Python?

I would use scipy.signal.welch for that: ...
Noam Peled's user avatar

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