Skip to content

Commit 3d50bad

Browse files
Merge pull request #24 from robertoostenveld/mne_sample_data
include example BIDS dataset from MNE
2 parents 43094b1 + b4a4bde commit 3d50bad

20 files changed

Lines changed: 1175 additions & 0 deletions

mne_sample_data/acq-epi_T1w.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"RepetitionTime": 2,
3+
"EchoTime": 0.095,
4+
"FlipAngle": 90,
5+
"Manufacturer": "Siemens",
6+
"ManufacturersModelName": "TIM TRIO",
7+
"MagneticFieldStrength": 3,
8+
"PulseSequenceType": "EPI"
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"RepetitionTime": 0.020,
3+
"FlipAngle": 5,
4+
"EchoTime": 0.00185
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"RepetitionTime": 0.020,
3+
"FlipAngle": 30,
4+
"EchoTime": 0.00185
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"BIDSVersion": "1.0.0rc4",
3+
"License": "This dataset is made available under the Creative Commons Attribution 4.0 International Public License, whose full text can be found at https://www.creativecommons.org/licenses/by/4.0/legalcode",
4+
"Name": "Audio visual paradigm known as the MNE software sample dataset"
5+
}

mne_sample_data/sub-01/anat/sub-01_acq-epi_T1w.nii.gz

Whitespace-only changes.

mne_sample_data/sub-01/anat/sub-01_acq-flipangle05_run-01_MEFLASH.nii.gz

Whitespace-only changes.

mne_sample_data/sub-01/anat/sub-01_acq-flipangle30_run-01_MEFLASH.nii.gz

Whitespace-only changes.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# These are comments
3+
#
4+
average {
5+
#
6+
# Output files
7+
#
8+
# outfile sample_audvis-ave.fif
9+
# logfile sample_audvis-ave.log
10+
# eventfile sample_audvis.eve
11+
#
12+
# Rejection values
13+
#
14+
gradReject 2000e-13
15+
magReject 4e-12
16+
eegReject 0e-6
17+
eogReject 150e-6
18+
#
19+
# Category specifications
20+
#
21+
category {
22+
name "Left Auditory"
23+
event 1
24+
tmin -0.2
25+
tmax 0.5
26+
color 1 1 0
27+
}
28+
category {
29+
name "Right Auditory"
30+
event 2
31+
tmin -0.2
32+
tmax 0.5
33+
color 1 0 0
34+
}
35+
category {
36+
name "Left visual"
37+
event 3
38+
tmin -0.2
39+
tmax 0.5
40+
color 0 1 0
41+
}
42+
category {
43+
name "Right visual"
44+
event 4
45+
tmin -0.2
46+
tmax 0.5
47+
color 0.5 0.8 1
48+
}
49+
}

mne_sample_data/sub-01/meg/ct_sparse_mgh.fif

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import pandas as pd
2+
import mne
3+
4+
events_fname = "/Users/alex/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw-eve.fif"
5+
raw_fname = "sub-01_task-audiovisual_run-01_meg.fif"
6+
7+
events = mne.read_events(events_fname).astype(int)
8+
raw = mne.io.read_raw_fif(raw_fname)
9+
10+
event_id = {'Auditory/Left': 1, 'Auditory/Right': 2, 'Visual/Left': 3,
11+
'Visual/Right': 4, 'Smiley': 5, 'Button': 32}
12+
events[:, 0] -= raw.first_samp
13+
14+
event_id_map = {v: k for k, v in event_id.items()}
15+
16+
df = pd.DataFrame(events[:, [0, 2]], columns=['Sample', 'Condition'])
17+
df.Condition = df.Condition.map(event_id_map)
18+
19+
print(df.head())
20+
21+
df.to_csv('sub-01_task-audiovisual_run-01_events.tsv', sep='\t', index=False)

0 commit comments

Comments
 (0)