dk 1 éve
szülő
commit
561661ff94
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      backend/dataloaders/neo.py

+ 1 - 0
backend/dataloaders/neo.py

@@ -82,6 +82,7 @@ def preprocessing(raw, reref_method='monopolar'):
     annotation_onset, annotation_offset = raw.annotations.onset[0], raw.annotations.onset[-1]
     tmin, tmax = max(annotation_onset - 5., raw.times[0]), min(annotation_offset + 5, raw.times[-1])
     # rebuilt the raw
+    # MNE的crop函数会导致annotation错乱,只能重建raw object
     new_annotations = mne.Annotations(onset=raw.annotations.onset - tmin,
                                   duration=raw.annotations.duration,
                                   description=raw.annotations.description)