|
8 | 8 | "# Importing XDF files in HyPyP\n", |
9 | 9 | "@Author : [@jonasmago](https://github.com/jonasmago) & [@FranckPrts](https://github.com/FranckPrts).\n", |
10 | 10 | "\n", |
11 | | - "Updated by : Patrice Fortin\n", |
| 11 | + "Updated by : [@patricefortin](https://github.com/patricefortin) \n", |
12 | 12 | "\n", |
13 | | - "Last updated: \n", |
| 13 | + "Last updated: 2025/6/6\n", |
14 | 14 | "\n", |
15 | 15 | "This tutorial guides you in using the `XDFImport` class provided by [HyPyP](https://github.com/ppsp-team/HyPyP/blob/master/hypyp/xdf/).\n", |
16 | 16 | "\n", |
|
28 | 28 | }, |
29 | 29 | { |
30 | 30 | "cell_type": "code", |
31 | | - "execution_count": 1, |
| 31 | + "execution_count": null, |
32 | 32 | "metadata": {}, |
33 | 33 | "outputs": [], |
34 | 34 | "source": [ |
35 | 35 | "from hypyp.xdf import XDFImport\n", |
36 | 36 | "\n", |
| 37 | + "# This file has been generated using 2 starstim-32 and recorded by LabRecorder.\n", |
| 38 | + "# No participant were wearing the starstim so we only have noise\n", |
37 | 39 | "path_xdf = \"../data/XDF/dyad-example-noise.xdf\"\n", |
| 40 | + "\n", |
| 41 | + "# This file has been generated from synthetic noise\n", |
38 | 42 | "path_xdf_with_markers = \"../data/XDF/dyad-example-with-markers.xdf\"" |
39 | 43 | ] |
40 | 44 | }, |
|
171 | 175 | "execution_count": 4, |
172 | 176 | "metadata": {}, |
173 | 177 | "outputs": [ |
| 178 | + { |
| 179 | + "name": "stderr", |
| 180 | + "output_type": "stream", |
| 181 | + "text": [ |
| 182 | + "Error reading chunk length\n", |
| 183 | + "Traceback (most recent call last):\n", |
| 184 | + " File \"/home/patrice/.cache/pypoetry/virtualenvs/hypyp-9w4TS9uv-py3.12/lib/python3.12/site-packages/pyxdf/pyxdf.py\", line 230, in load_xdf\n", |
| 185 | + " chunklen = _read_varlen_int(f)\n", |
| 186 | + " ^^^^^^^^^^^^^^^^^^^\n", |
| 187 | + " File \"/home/patrice/.cache/pypoetry/virtualenvs/hypyp-9w4TS9uv-py3.12/lib/python3.12/site-packages/pyxdf/pyxdf.py\", line 489, in _read_varlen_int\n", |
| 188 | + " raise RuntimeError(\"invalid variable-length integer encountered.\")\n", |
| 189 | + "RuntimeError: invalid variable-length integer encountered.\n" |
| 190 | + ] |
| 191 | + }, |
174 | 192 | { |
175 | 193 | "name": "stdout", |
176 | 194 | "output_type": "stream", |
|
189 | 207 | " Channel types: [stim]\n", |
190 | 208 | " Stream id 3 of type 'EEG' with name 'EEG_subject_1'\n", |
191 | 209 | " Sampling Rate: 1000.0\n", |
192 | | - " Channel names: [foo,bar,baz]\n", |
| 210 | + " Channel names: [Ch1,Ch2,Ch3]\n", |
193 | 211 | " Channel types: [eeg,eeg,eeg]\n", |
194 | 212 | " Stream id 1 of type 'EEG' with name 'EEG_subject_2'\n", |
195 | 213 | " Sampling Rate: 1000.0\n", |
196 | | - " Channel names: [foo,bar,baz]\n", |
| 214 | + " Channel names: [Ch1,Ch2,Ch3]\n", |
197 | 215 | " Channel types: [eeg,eeg,eeg]\n", |
198 | 216 | "Selected streams: [RandomStrStream,EEG_subject_1,EEG_subject_2]\n", |
199 | 217 | "\n", |
|
538 | 556 | "name": "stdout", |
539 | 557 | "output_type": "stream", |
540 | 558 | "text": [ |
541 | | - "Writing /tmp/tmpnbmrtr9u/LSLOutletHS1-EEG_raw.fif\n", |
542 | | - "Closing /tmp/tmpnbmrtr9u/LSLOutletHS1-EEG_raw.fif\n", |
| 559 | + "Writing /tmp/tmp0k1yas12/LSLOutletHS1-EEG_raw.fif\n", |
| 560 | + "Closing /tmp/tmp0k1yas12/LSLOutletHS1-EEG_raw.fif\n", |
543 | 561 | "[done]\n", |
544 | | - "Writing /tmp/tmpnbmrtr9u/LSLOutletHS2-EEG_raw.fif\n", |
545 | | - "Closing /tmp/tmpnbmrtr9u/LSLOutletHS2-EEG_raw.fif\n", |
| 562 | + "Writing /tmp/tmp0k1yas12/LSLOutletHS2-EEG_raw.fif\n", |
| 563 | + "Closing /tmp/tmp0k1yas12/LSLOutletHS2-EEG_raw.fif\n", |
546 | 564 | "[done]\n", |
547 | | - "Files: ['/tmp/tmpnbmrtr9u/LSLOutletHS1-EEG_raw.fif', '/tmp/tmpnbmrtr9u/LSLOutletHS2-EEG_raw.fif']\n" |
| 565 | + "Files: ['/tmp/tmp0k1yas12/LSLOutletHS1-EEG_raw.fif', '/tmp/tmp0k1yas12/LSLOutletHS2-EEG_raw.fif']\n" |
548 | 566 | ] |
549 | 567 | } |
550 | 568 | ], |
|
624 | 642 | }, |
625 | 643 | { |
626 | 644 | "cell_type": "code", |
627 | | - "execution_count": 18, |
| 645 | + "execution_count": 17, |
628 | 646 | "metadata": {}, |
629 | 647 | "outputs": [ |
630 | 648 | { |
|
730 | 748 | "\n", |
731 | 749 | "xdf_misc.mne_raws[0].plot(duration=1, start=14)" |
732 | 750 | ] |
733 | | - }, |
734 | | - { |
735 | | - "cell_type": "code", |
736 | | - "execution_count": null, |
737 | | - "metadata": {}, |
738 | | - "outputs": [], |
739 | | - "source": [ |
740 | | - "\n" |
741 | | - ] |
742 | 751 | } |
743 | 752 | ], |
744 | 753 | "metadata": { |
|
0 commit comments