소스 검색

增加注释

dk 1 년 전
부모
커밋
561661ff94
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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)