Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
  • Loading branch information
celprov and effigies committed May 27, 2022
1 parent 1df3244 commit 00ab8f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/_static/SampleReport/sample_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3 class="run-title">Variance explained by a/crown/tCompCor components</h3><p c

</div>
<div id="datatype-figures_desc-carpetplot_run-1_suffix-bold_task-mixedgamblestask">
<h3 class="run-title">BOLD Summary</h3><p class="elem-caption">Summary statistics are plotted, which may reveal trends or artifacts in the BOLD data. Global signals calculated within the whole-brain (GS), within the white-matter (WM) and within cerebro-spinal fluid (CSF) show the mean BOLD signal in their corresponding masks. DVARS and FD show the standardized DVARS and framewise-displacement measures for each time point.<br /> A carpet plot shows the time series for all voxels within the brain mask, or if <code>--cifti-output</code> was enabled, all grayordinates. Voxels are grouped into cortical (dark/light blue), and subcortical (orange) gray matter, cerebellum (green) and white matter and CSF (red), indicated by the color map on the left-hand side.</p> <img class="svg-reportlet" src="./figures/sub-10_task-mixedgamblestask_run-1_desc-carpetplot_bold.svg" style="width: 100%" />
<h3 class="run-title">BOLD Summary</h3><p class="elem-caption">Summary statistics are plotted, which may reveal trends or artifacts in the BOLD data. Global signals calculated within the whole-brain (GS), within the white-matter (WM) and within cerebro-spinal fluid (CSF) show the mean BOLD signal in their corresponding masks. DVARS and FD show the standardized DVARS and framewise-displacement measures for each time point.<br /> A carpet plot shows the time series for all voxels within the brain mask, or if <code>--cifti-output</code> was enabled, all grayordinates. Voxels are grouped into cortical (Ctx GM), subcortical/deep (dGM) gray matter, deep white matter and CSF (dWM+dCSF), shallow white matter and CSF (sWM+sCSF), and cerebellum (Cb).</p> <img class="svg-reportlet" src="./figures/sub-10_task-mixedgamblestask_run-1_desc-carpetplot_bold.svg" style="width: 100%" />
</div>
<div class="elem-filename">
Get figure file: <a href="./figures/sub-10_task-mixedgamblestask_run-1_desc-carpetplot_bold.svg" target="_blank">figures/sub-10_task-mixedgamblestask_run-1_desc-carpetplot_bold.svg</a>
Expand Down
2 changes: 1 addition & 1 deletion fmriprep/interfaces/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def _run_interface(self, runtime):
remap_rois=False,
labels=(
("WM+CSF", "Edge") if has_cifti else
("Ctx GM", "dGM", "shallow WM+CSF", "deep WM+CSF", "Cb", "Edge")
("Ctx GM", "dGM", "sWM+sCSF", "dWM+dCSF", "Cb", "Edge")
),
)

Expand Down
6 changes: 3 additions & 3 deletions fmriprep/workflows/bold/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,10 +1086,10 @@ def _carpet_parcellation(segmentation, crown_mask, acompcor_mask, nifti=False):
lut[1:11] = 3 if nifti else 1 # WM+CSF
lut[255] = 5 if nifti else 0 # Cerebellum
# Apply lookup table
seg = lut[np.asanyarray(img.dataobj, dtype="uint16")]
seg[np.asanyarray(nb.load(crown_mask).dataobj, dtype=int) > 0] = 6 if nifti else 2
seg = lut[np.uint16(img.dataobj)]
seg[np.bool(nb.load(crown_mask).dataobj)] = 6 if nifti else 2
# Separate deep from shallow WM+CSF
seg[np.asanyarray(nb.load(acompcor_mask).dataobj, dtype=int) > 0] = 4 if nifti else 1
seg[np.bool(nb.load(acompcor_mask).dataobj)] = 4 if nifti else 1

outimg = img.__class__(seg.astype("uint8"), img.affine, img.header)
outimg.set_data_dtype("uint8")
Expand Down

0 comments on commit 00ab8f0

Please sign in to comment.