# Tag Info

14

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 consider the little script below to compare both methods: Fs = 128.0 t = np.arange(0, 10, 1/Fs) signal = np.sin(2*np.pi*10*t) + np.sin(2*np.pi*50*t) sigma2 = 0.5 ...

8

So the issue is that your filter order is too high. There are 2 problems with this: SciPy has a bug that generates inaccurate filters at high orders. On any platform, higher-order filters cannot be done in a single stage. SciPy bug: SciPy was previously generating prototype filters as a list of poles and zeros, then converting them to transfer functions, ...

8

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, actually) is constant for all observations $y$ we can write the $n\text{th}$ observation as $$y_n = x + r_n$$ where $r_n$ is the noise which is different for ...

4

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" metrics are added and the values team up. so adding the same thing to itself $N$ times increases that value by a factor of $N$ and the power (the mean square)...

4

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 you need. Iterating through all pairs is not a big ask really - you can still use numpy to perform the cross correlation, you'll just need to have two loops (nested) to determine which signals to ...

4

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 DOUBLE of the maximum frequency your analog signal has. If you downsample to 64 hz that means you'll only be able to see signal data up to 32 Hz. EEG contains the ...

4

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 reason not to do it (performance)? diabolical laugther as it happens, I've prepared just the blog post for you… TL;DR: If you don't have to process more than 20 ...

4

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, awake, meditating, etc). The passing of the brain between states (e.g. alert to asleep) is marked by modifications to the patterns of electrical activity. ...

3

'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 avionics system is proven to react to signals coming from certain instruments in a time below a given threshold. In your case, a more precise description (IMHO) ...

3

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. a visual stimulus. If your EEG data are in a matrix [channel x time] where time is the complete continuous EEG signal, after the epoching procedure you should ...

3

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 only a matter of convention, as the wavelet shape is translated and dilated over the whole time axis. One could thus specify as well the same wavelet on the ...

3

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 seconds of random data between 0.0 and 100.0 sampled at 512 Hz. I'm plotting the band amplitude below, but if you wanted power, it would just be the square of the values. I think the reason you saw overly large values for Gamma, ...

3

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 more faithfully reproduced in the digitized signal (source: Presonus) As the answer from Bryan alludes to, data cannot be generated de novo, unfortunately. ...

3

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 interference! (also, your filter isn't well-designed, probably too short, judging from the impulse response it displays, to filter out 50 Hz) You'll find that ...

2

The best is to calculate Hurst for stationary data (as then you can somehow find out if there are long range dependency signals which are not part of AR or MAs) but you can do non stationary as well. You can calculated froma fractal or wavelet transforms. Results are different In calculating Hurst you have to divide the data in short windows and average ...

2

Your application is not something that can be done very easily. The project would be well-suited for a PhD topic to be done over 4-5 years. If you really want to work towards it, learn 1) Signal processing. Knowing just one technique (like the DWT) will not get you anywhere. Get a thick book on the basics. 2) Machine learning (supervised and unsupervised)....

2

It is one way to do it, yes. You will get frequencies between 8 an 12 Hz less attenuated compared to others, but both the 8 and 12 Hz components will be attenuated 3 dB ($\frac{1}{\sqrt{2}}$ the original magnitude) and frequencies just outside the band will be attenuated only slightly more. The way depends on how much you would like to attenuate and so on. ...

2

Edge effects due to circular convolution can occur if you don't zero pad the data sufficiently before FFT/IFFT filtering. Fast convolution filtering using shorter sequential segments or windows from a longer data stream requires both padding of the FFT and overlap add/save processing of the overlapping IFFT results. Just naively zeroing FFT bins instead of ...

2

Laplacian It is a 2nd derivative of the recorded voltage for each electrode. Suppose the recordings at position $(i,j)$ is $V(i,j)$, then Laplacian operation at $(i,j)$ is $(V(i,j)-2V(i-1,j)+V(i-2,j))^2 + (V(i,j)-2V(i,j-1)+V(i,j-2))^2$ And it serves as a high-pass filter that enhances localized activity while suppresses the diffusion activity. The ...

2

You might simply use soft/hard thresholding. This operation is quite standard and called Wavelet Denoising. Here are some resources: http://www.stthomas.edu/mathematics/pdfs/MSAD/Denoising%20via%20Wavele.pdf http://scholar.lib.vt.edu/theses/available/etd-12062002-152858/unrestricted/Chapter4.pdf http://www.ee.iitb.ac.in/~icvgip/PAPERS/202.pdf An overview ...

2

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 there is no desired signal, whereas in the passbands of the filter the noise is left unchanged. For some applications the assumption that noise and signal occupy ...

2

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 size FFT, so I think the single FFT approach is fine in this case.

2

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 range of values in your original signal is relatively small (4395 to 4420,) and the range of values in the output plot is also relatively small (cannot tell ...

2

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 avoid this problem is apply one window function in a overlapped segments between your Epoches. When you apply a window like a Hann window this reduces the ...

2

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, because they can (often) be modelled with quite large precision. The fact that you point out that it is impossible to derive a model for your signal renders ...

2

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 filters have an odd number of taps - all you have to do is to remove (n-1)/2 samples (where n is the filter order) from the beginning of your data after it has ...

2

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 Hilbert transform to calculate the phase difference. For the right signal it is a very powerful technique as is shown in the tutorial you have referenced. Here is a ...

2

These are indeed artefacts from the stimulation x = zeros(1,10*4000) x(1) = 1; x(401) = 1; [power,f]=periodogram(x,hamming(length(x)),[],4000); scatter(f,log(power),1); xlim([0 200]);

2

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. This electrical activity is the combined result of millions of neurons firing below the skull. The strength of the electrical signal they create is measured ...

2

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 or matrix, so if you divide your main signal to some 2-s signals, you would have 30 epoch(each 2s of your main signal would be an epoch). You could done this ...

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