Skip to content

Commit d8b6ac4

Browse files
committed
Organize learning materials
1 parent 84f3cae commit d8b6ac4

File tree

177 files changed

+15
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+15
-19
lines changed
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
# Project: BIDSInspec
2-
## Objective: Create a function that can query the BIDS directory
2+
# Objective: Create a function that can query the BIDS directory
33
# Modified: August 8, 2024 @ 9:08 PM by N.O.
4-
54
# Implementation via pybids
6-
## Complete pybids tutorial
7-
5+
# Complete pybids tutorial
86
# Install pybids via conda
9-
## pip install pybids
10-
7+
# pip install pybids
118
# Loading BIDS datasets
9+
import os
10+
1211
from bids import BIDSLayout
1312
from bids.tests import get_test_data_path
14-
import os
1513

1614
# Here we're using an example BIDS dataset that's bundled with the pybids tests
17-
data_path = os.path.join(get_test_data_path(), '7t_trt')
15+
data_path = os.path.join(get_test_data_path(), "7t_trt")
1816

1917
# Initialize the layout
2018
layout = BIDSLayout(data_path)
2119

2220
# Print some basic information about the layout
2321
layout
24-
25-

bids_pybids_tutorial.py renamed to learning_materials/bids_pybids_tutorial.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
# Project: BIDSInspec
2-
## Objective: Complete the pybids tutorial
2+
# Objective: Complete the pybids tutorial
33
# Modified: August 8, 2024 @ 9:08 PM by N.O.
4-
54
# Implementation via pybids
6-
## Must first complete pybids tutorial to understand the package
7-
5+
# Must first complete pybids tutorial to understand the package
86
# Install bids
97
# pip install bids
108
# Install pybids
11-
## pip install pybids
12-
9+
# pip install pybids
1310
# Import
1411
from os.path import join
12+
1513
from bids import BIDSLayout
1614
from bids.tests import get_test_data_path
17-
layout = BIDSLayout(join(get_test_data_path(), 'synthetic'))
15+
16+
layout = BIDSLayout(join(get_test_data_path(), "synthetic"))
1817

1918
# View data
2019
print(layout)
@@ -26,9 +25,10 @@
2625
print(layout.get_tasks())
2726

2827
# Extract metadata
29-
# get task timing information for a given fMRI scan # cannot run since bids-dataset does not have NIfTI files
28+
# get task timing information for a given fMRI scan
29+
# cannot run since bids-dataset does not have NIfTI files
3030
# f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename
31-
#print(layout.get_events(f))
31+
# print(layout.get_events(f))
3232

3333
# get metadata from json files # cannot run since bids-dataset does not have NIfTI files
3434
# f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)