Comments (4)
By visual inspection I do not see any differences between my experimental data file and that of example data (except that I only recorded a single run of 120s, while example data had 6 runs all of longer duration).
@Maari13, ran through your file locally and this seems to be the reason why you're not getting events returned.
In the notebook, you'd notice that this snippet exists:
events = find_events(raw)
event_id = {'Non-Target': 1, 'Target': 2}
epochs = Epochs(raw, events=events, event_id=event_id,
tmin=-0.1, tmax=0.8, baseline=None,
reject={'eeg': 100e-6}, preload=True,
verbose=False, picks=[0,1,2,3])
print('sample drop %: ', (1 - len(epochs.events)/len(events)) * 100)
epochs
The reject
field determines the threshold for rejecting epochs based on peak-to-peak signal amplitude. See MNE docs here
Notice below how changing the reject
value to a much higher number keeps more events but potentially including more noisy results.
NB: EEG is quite noisy by default, even minor blinks & muscle movements can be responsible for spikes in data, causing the events to be filtered out when reject is applied
My recommendation here would be
- doing a much longer recording maybe 5mins
- ensure that electrodes are well placed to ensure good quality recording
- tweaking reject value iteratively
cc @JohnGriffiths & @ErikBjare if they have any other ideas that could help here
from eeg-expy.
Thank you @oreHGA - indeed this is not an uncommon issue. As Ore said, you can try tweaking the threshold iteratively; e.g. up/down a few percent. You will probably see as you do that more epochs are kept the more lenient you go, and concurrently that the average ERP trace gets noisier ('wigglier'), because more noisy data points are being included.
As Ore said, the fundamental issue here is a noisy recording set up.
Try using the muselsl signal viewer to confirm you have good signal before running the experiment
muselsl view -v 2
(you may have to also pip install vispy
first )
And make sure the numbers on the right are <20. Then kill the viewer and run the eegnb expt.
We have nearly finished a simple signal quality check function for eeg notebooks that will help with this part of the setup process. Watch this space (or watch the PRs if you're very interested).
Let us know if this helps!
from eeg-expy.
Thank you so much for the explanation and advice. It did not occur to me that an automatic quality check was applied to the epoch data. I was going to do longer recordings, but first wanted to make sure I got things to work and then was puzzled ... I will definitely need to check the contact of the electrodes with the scalp and preview the signal before acquiring data next time. And then tweek the reject value
from eeg-expy.
Hi @Maari13 , hope you were able to get more sample in after adjusting the "reject" threshold. I'll go ahead and close this now but feel free to reply to the thread if you still have any issues. Cheers
from eeg-expy.
Related Issues (20)
- Installing eeg notebooks on Mac M1 HOT 1
- Idea to implement for EEG decoding the option to convert it to DFT? HOT 1
- Hello, I have a basic question about another project HOT 1
- N170 experiment doesn't work HOT 1
- N170 Load and Visualize Data HOT 5
- Research showing the influence of the used SSVEP pattern image HOT 2
- Error with installing dukpy HOT 3
- Can't run experiments from CLI interface HOT 4
- pyglet version incompatibility mac HOT 4
- Implement version + release schedule HOT 2
- aux channel with muse2_bfn device
- P300 experiment explanation: "...high or low probability..."
- Legend items order when using diff_waveform in plot_conditions HOT 1
- Support for Oculus/Meta Quest VR for N170 and other experiments
- is it possible to save the PPG data from Muse 2 (with bluemuse and/or brainflow)? HOT 2
- Problems with saving data file using brainflow HOT 2
- AttributeError: module 'eegnb.experiments.visual_ssvep.ssvep' has no attribute 'present' HOT 3
- Incomplete outputfile SSAEP_onefreq with Bluemuse HOT 1
- `eeg-notebook` => `eeg-expy` rename
- Neurosity crown supported in code, not yet listed in doc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eeg-expy.