Filtering and/or denoising EEG data
Hi all!,
I am trying to obtain EEG measurements, and for this purpose, I have written a Python code using the brainflow library to obtain data.
However, I am experiencing some difficulties. When I plot the data, it does not resemble EEG data at all and appears to be mostly noise. Even after applying some filters (and scaling since the data contains very low values), I am still unable to find any useful information data.
Also find below the plots:

I am wondering if you have any Python code available that utilizes the correct filtering and/or denoising techniques to visualize EEG data as accurately as it is displayed in the OpenBCI software. Any guidance or resources you could provide would be greatly appreciated.
Thank you in advance!
Comments
I don't know why I cannot modify my post
This is the code used for filtering and scaling:

Any idea of what the problem could be?
@wjcroft @retiutut @evaesteban
If your original posts with the plots are still happening, then you STILL have tons of mains noise. That is not being filtered out. So suspect your usage of the filter functions. FYI, Brainflow also has filtering available.
https://brainflow.readthedocs.io/en/stable/Examples.html#python-signal-filtering
Thanks for your quick reply @wjcroft.

Does this measurement look any better?:
If the Y axis is microvolts, you are NOT filtering off the DC offset. A typical bandpass would be say from 0.5 Hz to 45 Hz, then your notch filter.
Sorry for my bunch of question but my knowledge in plotting EEG and how EEG should be looking is quite limited.

Now I applied first a bandpass from 0.5 Hz to 45 Hz and then the notch filter that I applied in the previous plot. Does this look good to you @wjcroft ?
Thanks a lot for your help!
You don't need to ask for approval of your EEG time series graphs.
Simply compare what you are seeing in the GUI with the proper filters applied, to the graph you make with the same filtering.
Generally EEG stays below 100 uV. So unless you were touching the electrode, the above graph still is not good looking. I cannot tell for certain but it still looks like you have high frequency (mains) artifact.