GithubHelp home page GithubHelp logo

Number of events 0 about eeg-expy HOT 4 CLOSED

Maari13 avatar Maari13 commented on July 29, 2024
Number of events 0

from eeg-expy.

Comments (4)

oreHGA avatar oreHGA commented on July 29, 2024

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.

image

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.

JohnGriffiths avatar JohnGriffiths commented on July 29, 2024

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.

Maari13 avatar Maari13 commented on July 29, 2024

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.

oreHGA avatar oreHGA commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.