mne-tools / mne-tools/mne-python

support negative times for CTF files

Aperta
#9,653 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

BUG
Lingua principale
Python
Stelle
3.5k
Fork
1.6k
Merge medio
1g 6h
PR unite (30g)
100

Descrizione

So I didn't know this but it seems like CTF has the ability to start its recordings with negative times by using a sync trigger and asking the scanner to include a baseline period.

Other packages Brainstorm (and presumably fieldtrip) respect this field and adjust their time arrays accordingly.

MNE reads in the required field
https://github.com/mne-tools/mne-python/blob/855edbf48835bcee80e773eb7047d0a4caa14a1c/mne/io/ctf/res4.py#L126

and adjusts annotations and bad_segments to account for it.
https://github.com/mne-tools/mne-python/blob/855edbf48835bcee80e773eb7047d0a4caa14a1c/mne/io/ctf/ctf.py#L147-L156

That MNE shifts other stuff and not the time array leads me to believe that MNE can't have negative time values in raw objects. Is that true?

This cropped up because I was doing some custom event marking for an experiment using mne and the resulting events were read into brainstorm and were all shifted by 1 second. In this particular case, I'm time shifting the events before I save them out, solving my immediate issue but it still seems a bit like a bug?

-Luke

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla gestione del campo CTF in mne/io/ctf/res4.py nel punto collegato, quindi esamina gli aggiustamenti di annotations e bad_segments in mne/io/ctf/ctf.py. Traccia in che modo il periodo di baseline influisce sui valori temporali dei dati raw e sull’allineamento degli eventi. Il lavoro è completato quando le registrazioni CTF con tempi di inizio negativi mantengono array temporali, annotations, bad_segments ed eventi coerenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
data
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.