Skip to content

Commit

Permalink
Neiry Dataset: bugfix with integer index
Browse files Browse the repository at this point in the history
  • Loading branch information
v-goncharenko committed Mar 30, 2021
1 parent 6c81ca8 commit b849ede
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions moabb/datasets/neiry.py
Expand Up @@ -63,7 +63,6 @@ class DemonsP300(BaseDataset):
года. Прикладные математика и информатика. — Москва : МФТИ, 2020. – 334 с.
ISBN 978-5-7417-0757-9
https://mipt.ru/science/5top100/education/courseproposal/%D0%A4%D0%9F%D0%9C%D0%98%20%D1%84%D0%B8%D0%BD%D0%B0%D0%BB-compressed2.pdf
.. [4] Impulse Neiry website: https://impulse-neiry.com/
"""

ch_names = ["Cz", "P3", "Pz", "P4", "PO3", "PO4", "O1", "O2"]
Expand Down Expand Up @@ -151,7 +150,8 @@ def _get_single_subject_data(self, subject: int):
target = act["target"] + 1
run_data = []
for eeg, starts, stims in act["sessions"]:
starts *= self.sampling_rate / self._ms_in_sec
starts = starts * self.sampling_rate / self._ms_in_sec
starts = starts.round().astype(np.int)
stims = stims + 1
stims_channel = np.zeros(eeg.shape[1])
target_channel = np.zeros(eeg.shape[1])
Expand All @@ -168,7 +168,7 @@ def _get_single_subject_data(self, subject: int):
raw = RawArray(np.hstack(run_data), info)
raw.set_montage(montage)
runs_raw[f"run_{i}"] = raw
return {"session_1": runs_raw}
return {"session_0": runs_raw}

def data_path(
self, subject: int, path=None, force_update=False, update_path=None, verbose=None
Expand Down

0 comments on commit b849ede

Please sign in to comment.