diff --git a/code/introduction/introduction.ipynb b/code/introduction/introduction.ipynb index 8a86527f..08163fa3 100644 --- a/code/introduction/introduction.ipynb +++ b/code/introduction/introduction.ipynb @@ -29,14 +29,14 @@ "source": [ "## Dataset\n", "\n", - "For the rest of this tutorial, we will make use of a subset of publicly available dataset, ds000030, from [openneuro.org](https://openneuro.org/datasets/ds000030) The dataset is structured according to the Brain Imaging Data Structure ([BIDS](https://bids-specification.readthedocs.io/en/etable/)). " + "For the rest of this tutorial, we will make use of a subset of publicly available dataset, ds000030, from [openneuro.org](https://openneuro.org/datasets/ds000030) The dataset is structured according to the Brain Imaging Data Structure ([BIDS](https://bids-specification.readthedocs.io/en/etable/))." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Below is a tree diagram showing the folder structure of a single MR session within ds000030. This was obtained by using the bash command `tree`. \n", + "Below is a tree diagram showing the folder structure of a single MR session within ds000030. This was obtained by using the bash command `tree`.\n", "`!tree ../data/ds000030`\n", "\n", "```\n", @@ -46,14 +46,14 @@ "├── dataset_description.json\n", "├── README\n", "└── sub-10788/\n", - "    ├── anat\n", - "    │   ├── sub-10788_T1w.json\n", - "    │   └── sub-10788_T1w.nii.gz\n", - "    └── dwi\n", - "       ├── sub-10788_dwi.bval\n", - "       │── sub-10788_dwi.bvec\n", - "       │── sub-10788_dwi.json\n", - "       └── sub-10788_dwi.nii.gz\n", + " ├── anat\n", + " │ ├── sub-10788_T1w.json\n", + " │ └── sub-10788_T1w.nii.gz\n", + " └── dwi\n", + " ├── sub-10788_dwi.bval\n", + " │── sub-10788_dwi.bvec\n", + " │── sub-10788_dwi.json\n", + " └── sub-10788_dwi.nii.gz\n", "```" ] }, @@ -77,7 +77,7 @@ "source": [ "## Querying a BIDS Dataset\n", "\n", - "[`pybids`](https://bids-standard.github.io/pybids/) is a Python API for querying, summarizing and manipulating the BIDS folder structure. We will make use of `pybids` to query the necessary files. \n", + "[`pybids`](https://bids-standard.github.io/pybids/) is a Python API for querying, summarizing and manipulating the BIDS folder structure. We will make use of `pybids` to query the necessary files.\n", "\n", "Lets first pull the metadata from its associated JSON file using the `get_metadata()` function for the first run." ] @@ -214,7 +214,7 @@ "\n", "For this lesson, we will use the `Dipy` (Diffusion Imaging in Python) package for processing and analysing diffusion MRI.\n", "\n", - "### Why `dipy`? \n", + "### Why `dipy`?\n", "\n", "- Fully free and open source\n", "- Implemented in Python. Easy to understand, and easy to use.\n", @@ -425,7 +425,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will need this gradient table later on to process our data and generate diffusion tensor images (DTI)! \n", + "We will need this gradient table later on to process our data and generate diffusion tensor images (DTI)!\n", "\n", "There is also a built in function for gradient tables, `b0s_mask` that can be used to separate diffusion weighted measurements from non-diffusion weighted measurements (b=0s/mm^2). Try to extract the vector corresponding to diffusion weighted measurements in the following cell!" ] @@ -644,4 +644,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file diff --git a/code/introduction/solutions/introduction_solutions.ipynb b/code/introduction/solutions/introduction_solutions.ipynb index 3a69cd2d..9b328020 100644 --- a/code/introduction/solutions/introduction_solutions.ipynb +++ b/code/introduction/solutions/introduction_solutions.ipynb @@ -31,7 +31,7 @@ "source": [ "## Dataset\n", "\n", - "For the rest of this tutorial, we will make use of a subset of publicly available dataset, ds000030, from [openneuro.org](https://openneuro.org/datasets/ds000030) The dataset is structured according to the Brain Imaging Data Structure ([BIDS](https://bids-specification.readthedocs.io/en/etable/)). " + "For the rest of this tutorial, we will make use of a subset of publicly available dataset, ds000030, from [openneuro.org](https://openneuro.org/datasets/ds000030) The dataset is structured according to the Brain Imaging Data Structure ([BIDS](https://bids-specification.readthedocs.io/en/etable/))." ] }, { @@ -53,8 +53,8 @@ "├── sub-010001/\n", "└── sub-010002/\n", " ├── ses-01/\n", - " │    ├── anat\n", - "    │   │ ├── sub-010002_ses-01_acq-lowres_FLAIR.json\n", + " │ ├── anat\n", + " │ │ ├── sub-010002_ses-01_acq-lowres_FLAIR.json\n", " │ │ ├── sub-010002_ses-01_acq-lowres_FLAIR.nii.gz\n", " │ │ ├── sub-010002_ses-01_acq-mp2rage_defacemask.nii.gz\n", " │ │ ├── sub-010002_ses-01_acq-mp2rage_T1map.nii.gz\n", @@ -65,37 +65,37 @@ " │ │ ├── sub-010002_ses-01_inv-2_mp2rage.nii.gz\n", " │ │ ├── sub-010002_ses-01_T2w.json\n", " │ │ └── sub-010002_ses-01_T2w.nii.gz\n", - "    │ ├── dwi\n", - "    │    │ ├── sub-010002_ses-01_dwi.bval\n", - "    │    │ │── sub-010002_ses-01_dwi.bvec\n", - "    │    │ │── sub-010002_ses-01_dwi.json\n", - "    │    │ └── sub-010002_ses-01_dwi.nii.gz\n", - "   │ ├── fmap\n", - "    │    │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude1.json\n", - "   │    │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude1.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude2.json\n", - "   │    │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude2.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-GEfmap_run-01_phasediff.json\n", - "   │    │ ├── sub-010002_ses-01_acq-GEfmap_run-01_phasediff.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-AP_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-AP_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-PA_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-PA_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-SEfmapDWI_dir-AP_epi.json\n", - "   │    │ ├── sub-010002_ses-01_acq-SEfmapDWI_dir-AP_epi.nii.gz\n", - "    │    │ ├── sub-010002_ses-01_acq-SEfmapDWI_dir-PA_epi.json\n", - "   │    │ └── sub-010002_ses-01_acq-SEfmapDWI_dir-PA_epi.nii.gz\n", + " │ ├── dwi\n", + " │ │ ├── sub-010002_ses-01_dwi.bval\n", + " │ │ │── sub-010002_ses-01_dwi.bvec\n", + " │ │ │── sub-010002_ses-01_dwi.json\n", + " │ │ └── sub-010002_ses-01_dwi.nii.gz\n", + " │ ├── fmap\n", + " │ │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude1.json\n", + " │ │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude1.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude2.json\n", + " │ │ ├── sub-010002_ses-01_acq-GEfmap_run-01_magnitude2.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-GEfmap_run-01_phasediff.json\n", + " │ │ ├── sub-010002_ses-01_acq-GEfmap_run-01_phasediff.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-AP_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-AP_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-PA_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-sefmapBOLDpre_dir-PA_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-AP_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapBOLDpost_dir-PA_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapDWI_dir-AP_epi.json\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapDWI_dir-AP_epi.nii.gz\n", + " │ │ ├── sub-010002_ses-01_acq-SEfmapDWI_dir-PA_epi.json\n", + " │ │ └── sub-010002_ses-01_acq-SEfmapDWI_dir-PA_epi.nii.gz\n", " │ └── fmap\n", - "    │    │ ├── sub-010002_ses-01_task-rest_acq-AP_run-01_bold.json\n", - "   │    │ └── sub-010002_ses-01_task-rest_acq-AP_run-01_bold.nii.gz\n", + " │ │ ├── sub-010002_ses-01_task-rest_acq-AP_run-01_bold.json\n", + " │ │ └── sub-010002_ses-01_task-rest_acq-AP_run-01_bold.nii.gz\n", " └── ses-02/\n", " ```" ] @@ -106,7 +106,7 @@ "source": [ "## Querying a BIDS Dataset\n", "\n", - "[`pybids`](https://bids-standard.github.io/pybids/) is a Python API for querying, summarizing and manipulating the BIDS folder structure. We will make use of `pybids` to query the necessary files. \n", + "[`pybids`](https://bids-standard.github.io/pybids/) is a Python API for querying, summarizing and manipulating the BIDS folder structure. We will make use of `pybids` to query the necessary files.\n", "\n", "Lets first pull the metadata from its associated JSON file using the `get_metadata()` function for the first run." ] @@ -154,7 +154,7 @@ "\n", "For this lesson, we will use the `Dipy` (Diffusion Imaging in Python) package for processing and analysing diffusion MRI.\n", "\n", - "### Why `dipy`? \n", + "### Why `dipy`?\n", "\n", "- Fully free and open source\n", "- Implemented in Python. Easy to understand, and easy to use.\n", @@ -238,7 +238,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will need this gradient table later on to process our data and generate diffusion tensor images (DTI)! \n", + "We will need this gradient table later on to process our data and generate diffusion tensor images (DTI)!\n", "\n", "There is also a built in function for gradient tables, `b0s_mask` that can be used to separate difussion weighted measurements from non-diffusion weighted measurements (b=0s/mm^2). Try to extract the vector corresponding to diffusion weighted measurements in the following cell!" ]