Giter VIP home page Giter VIP logo

eeg-flow's Introduction

eeg-flow's People

Contributors

arthurnguyen avatar dependabot[bot] avatar mscheltienne avatar pre-commit-ci[bot] avatar

Watchers

 avatar  avatar

eeg-flow's Issues

ICA on Raw vs Epochs

@ArthurNguyen Quick thoughts about the ICA on Raw vs Epochs; it's probably better to keep fitting on the entire Raw because the epochs are very short and might not yield enough data points to fit good components.

Thus, to keep a standardize approach, the function to "merge" annotations should be modified to mark as bad the selected bad segments + any oddball annotation overlapping partially or fully with this bad segment (effectively changing the boundaries of the bad segment annotation to an oddball annotation onset and to an oddball annotation offset).

def merge_bad_annotations(raw: BaseRaw) -> Annotations:
"""Merge bad_ and other annotations.
Parameters
----------
raw : Raw
Raw object with annotations.
Returns
-------
annotations : Annotations
Created annotations where the bad annotations have been removed and
annotations overlapping with a bad annotation have been prefixed with
bad_.
"""
annotations = raw.annotations.copy()
offset_ = None
annotation2remove = list()
onsets2edit = list()
description2edit = list()
for k, annotation in enumerate(annotations):
if annotation["description"].lower().startswith("bad"):
offset_ = annotation["onset"] + annotation["duration"]
annotation2remove.append(k)
continue
if offset_ is None:
continue
if annotation["onset"] <= offset_:
annotation2remove.append(k)
onsets2edit.append(annotation["onset"])
description2edit.append(annotation["description"])
for idx in annotation2remove[::-1]:
annotations.delete(idx)
description2edit = ["bad_" + elt for elt in description2edit]
new_annotations = Annotations(onsets2edit, 0.1, description2edit)
annotations += new_annotations
return annotations

Response locked, mismatch number of responses and actual correct responses,

metadata_reponse = pd.DataFrame.from_dict(metadata_reponse)

Hello,
Dans un exemple ou un enregistrement contient des falses alarms (le participant a appuyé alors qu'il n'aurait pas du),

  • metadata_reponse["event_name"] va contenir strictement les evenements "responses" dont les faut
  • metadata_reponse["response_time"] ne contient que les bonnes reponses (== Hits)
    Donc il y aura par exemple 36 event_name et 35 response_time

Tu arriverais a voir comment filtrer facilement la premiere partie pour retirer ces mauvaises reponses?
Merci

Arthur

https://we.tl/t-Pisv83JNjC

Step 5 does not stop if file not exist

https://github.com/mscheltienne/eeg-flow/blob/806dcc199e809dc65001897621445f5276b36af2/eeg_flow/tasks/ica_decomposition.py#L343C5-L343C30

Hello,
There's an error here in the step 5, inside of eeg_flow.tasks.label_components

If attempting to open a file where the deratives of step 4 does not exist we expect this behavior:

  • output: "error, this file does not exist"

What we have instead:

  • The code seems to continue until it is stuck with this error "Channel CPz already specified in inst."

WhatsApp Image 2023-09-01 at 13 28 06
WhatsApp Image 2023-09-01 at 13 28 07

Annotations stored in raw.fif already?

greetings

https://github.com/mscheltienne/eeg-flow/blame/c13148b7ef9c33d7c3dfe99df0e0f746c01777b4/scripts/tasks/2_annotate_bad_channels_and_segments.ipynb#L89

_oddball_with_bads_annot.fif of step 2 is actually not loaded in step 3. Can you confirm that the _bads annotations are already stored in step2_raw.fif? in which case no eed to save an annot.fif file?

# The raw saved after interpolation of bridges already contains bad channels and

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.