You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial.rst
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ The new ``bidscointutorial`` folder contains a ``raw`` source-data folder and a
52
52
Let's begin with inspecting this new raw data collection:
53
53
54
54
- Are the DICOM files for all the ``bids/sub-*`` folders organized in series-subfolders (e.g. ``sub-001/ses-01/003-T1MPRAGE/0001.dcm`` etc)? Use `dicomsort <./utilities.html#dicomsort>`__ if this is not the case (hint: it's not the case). A help text for all BIDScoin tools is available by running the tool with the ``-h`` or ``--help`` flag (e.g. ``dicomsort -h``)
55
-
- Use the `rawmapper <./utilities.html#rawmapper>`__ command to print out the values of the "EchoTime", "PatientSex" and "AcquisitionDate" DICOM fields (see ``rawmapper -h``. Hint: use ``-f``) of the "cmrr" fMRI series in the ``raw`` folder (hint: also use ``-w``). You should find this result (NB: unfortunately in this tutorial sub-001 and sub-002 are identical phantoms)::
55
+
- Use the `rawmapper <./utilities.html#rawmapper>`__ command to print out the values of the "EchoTime", "PatientSex" and "AcquisitionDate" DICOM fields (see ``rawmapper -h``. Hint: use ``-f``) of the CMRR fMRI series in the ``raw`` folder (hint: also use ``-w``). You should find this result (NB: unfortunately in this tutorial sub-001 and sub-002 are identical phantoms)::
sub-001 ses-01 047-cmrr_2p4iso_mb8_TR0700_SBRef 39 O 20200428
@@ -70,28 +70,28 @@ Now we can make a study bidsmap, i.e. the mapping from DICOM source-files to BID
70
70
Mapping DICOM data
71
71
^^^^^^^^^^^^^^^^^^
72
72
73
-
In the first tab of the bidseditor window that now opened, you see a particpant table (top) and a samples table with a list of DICOM run-items being mapped to BIDS (bottom). Edit these tables as follows:
73
+
In the first tab of the bidseditor window that now opened, you see a participant table (top) and a samples table with a list of DICOM run-items being mapped to BIDS (bottom). Edit these tables as follows:
74
74
75
-
- By default, the participant label is parsed from the filepath with a regular expression pattern that extracts the substring between ``/raw/sub-`` and the first ``/`` character. Change the pattern to extract the substring between ``/raw/s`` and the first ``/`` character. Can you understand why the subject label is now ``sub-ub001`` instead of ``sub-001`` (if not, ask it to your favourite AI-assistant)? Go back to the original settings by clicking the reset button.
75
+
- By default, the participant label is parsed from the filepath with a regular expression pattern that extracts the substring between ``/raw/sub-`` and the first ``/`` character. Change the pattern to extract the substring between ``/raw/s`` and the first ``/`` character. Can you understand why the subject label is now ``sub-ub001`` instead of ``sub-001`` (if not, ask it to your favorite AI-assistant)? Go back to the original settings by clicking the reset button.
76
76
- We only have one session per subject, so in the main GUI that appears (when all raw data has been scanned), remove the ``session_id`` label. Note how the output names simplify, omitting the session subfolders and labels.
77
-
- Edit the "anat" sample and change the datatype to ``extra_data``. Hoover with your mouse over the orange filename to see what it means. No change the datatype to exclude the data to see what happens. Go back to the original settings by clicking the reset button. Now make the name of the T1 scan more user friendly, e.g. by naming the acquisition label simply ``acq-mprage``. Clcik OK to approve your edits and to go back to the main window.
77
+
- Edit the "anat" sample and change the datatype to ``extra_data``. Hoover with your mouse over the orange filename to see what it means. No change the datatype to exclude the data to see what happens. Go back to the original settings by clicking the reset button. Now make the name of the T1 scan more user friendly, e.g. by naming the acquisition label simply ``acq-mprage``. Click OK to approve your edits and to go back to the main window.
78
78
- Next, edit the task and acquisition labels of the functional scans into something more readable, e.g. ``task-reward`` for the ``mb8`` scans and ``task-stop`` for the ``mb3me3`` scans. For the "reward" runs, add a tag of choice (e.g. "fmap1" or "fmap_reward") to the ``B0FieldSource`` field in the ``meta`` table. Likewise, add another tag to the "stop" runs (e.g. "fmap2" or "fmap_stop"). You also don't need the ``dir`` entity in the filenames, so remove these label values (and note how they disappear from the filename).
79
-
- Make the field map scans more user friendly, e.g. by simplifying the acquisition labels to ``acq-2p4iso`` and ``acq-2p5iso``. In both "2p4iso" fieldmap scans (magnitide and phasediff), add the same tag you used for the "reward" runs" to the ``B0FieldIdentifier`` field. If you like, you can also add a search pattern to the ``IntendedFor`` field such that it will select your ``reward`` runs (see the `field map notes <./bidsmap_features.html#field-maps>`__ for more details). Do the same for the "2p5iso" fieldmap scans, using the tag for the "stop" runs.
80
-
- Go back to the main window and check your edits by selecting all four "reward" func- and fmap-scans (use ctrl-or shift-click). Click with the right mouse button on a selected scan and choose ``Compare`` from the context menu that popped up. Are all your tags consistent?
79
+
- Make the field map scans more user friendly, e.g. by simplifying the acquisition labels to ``acq-2p4iso`` and ``acq-2p5iso``. In both "2p4iso" fieldmap scans (magnitude and phasediff), add the same tag you used for the "reward" runs" to the ``B0FieldIdentifier`` field. If you like, you can also add a search pattern to the ``IntendedFor`` field such that it will select your ``reward`` runs (see the `field map notes <./bidsmap_features.html#field-maps>`__ for more details). Do the same for the "2p5iso" fieldmap scans, using the tag for the "stop" runs.
80
+
- Go back to the main window and check your edits by selecting all four "reward" func- and fmap-scans (use control-or shift-click). Click with the right mouse button on a selected scan and choose ``Compare`` from the context menu that popped up. Are all your tags consistent?
81
81
- When all done, go to the ``Options`` tab and change the ``dcm2niix`` settings to get non-zipped NIfTI output data (i.e. ``*.nii`` instead of ``*.nii.gz``, see "dcm2niix -h" for help). Test the tool to see if it can run and, as a final step, save your bidsmap and close the editor. You can always go back later to change any of your edits by running the `bidseditor <./workflow.html#step-1b-running-the-bidseditor>`__ command-line tool directly. Try that.
82
82
83
83
Mapping Presentation log data
84
84
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
85
86
-
In the second tab of the bidseditor window, you see a similar particpant table (top) and samples table with Presentation run-items. If you are not going to work with Presentation data, then you may skip the next paragraph.
86
+
In the second tab of the bidseditor window, you see a similar participant table (top) and samples table with Presentation run-items. If you are not going to work with Presentation data, then you may skip the next paragraph.
87
87
88
88
.. dropdown:: Otherwise, click on the Presentation tab and continue as follows:
89
89
90
90
- In the samples table you can see a "Flanker" run-item. Open it and change the data type to "func". In the meta table, write something meaningful in the ``TaskName`` field.
91
-
- Clcik on the ``Edit`` button to tweak the events output data. You now get to see parsed input data on the left. Click on the ``Source`` button to inspect the raw text file. Scroll down and note that there are two tables in there -- the first one, which is the "events" table, is used as input (see the plugin `Options <./options.html#events2bids-plugin>`__). Close the inspection window.
91
+
- Click on the ``Edit`` button to tweak the events output data. You now get to see parsed input data on the left. Click on the ``Source`` button to inspect the raw text file. Scroll down and note that there are two tables in there -- the first one, which is the "events" table, is used as input (see the plugin `Options <./options.html#events2bids-plugin>`__). Close the inspection window.
92
92
- In the middle panel, remove the ``trial_nr`` output column. Note that the column disappeared from the ``Events data`` table on the right. Click on the ``Reset`` button to undo any edits.
93
93
- In ``Rows`` table of the middle panel, change the row condition ``Event_Type`` to include only "Picture" and "Response" rows, i.e. filter out the "Pulses": ``{'Event Type': '.*'}`` -> ``{'Event Type': 'Picture|Response'}``.
94
-
- Add a new output collumn named "condition" that is "congruent" for the ``con_left`` and ``con_right`` input codes, and "incongruent" for the ``inc_left`` and ``inc_right`` input codes. To do so, in the bottom empty condition field, enter: ``{'Code': 'con.*'}`` and in the output field next to that enter: ``{'condition': 'congruent'}``. Note how a new output column has appeared. Now add the incongruent condition to the same new output collumn, i.e. enter ``{'Code': 'inc.*'}`` and ``{'condition': 'incongruent'}``.
94
+
- Add a new output column named "condition" that is "congruent" for the ``con_left`` and ``con_right`` input codes, and "incongruent" for the ``inc_left`` and ``inc_right`` input codes. To do so, in the bottom empty condition field, enter: ``{'Code': 'con.*'}`` and in the output field next to that enter: ``{'condition': 'congruent'}``. Note how a new output column has appeared. Now add the incongruent condition to the same new output column, i.e. enter ``{'Code': 'inc.*'}`` and ``{'condition': 'incongruent'}``.
95
95
- In the timing table, set the clock to zero at the first scanner pulse, i.e. in the "start" field, change the value ``{'Code': 10}`` to ``{'Event Type': 'Pulse'}``. Did anything change in the output table? Why not? What if you change the value to ``{'Event Type': 'Response'}``?
0 commit comments