Skip to content

Revise the external regressor and task analysis chapters - #102

Merged
tsalo merged 1 commit into
mainfrom
book-figures-and-chapter-revisions
Nov 15, 2026
Merged

tsalo merged 1 commit into
mainfrom
book-figures-and-chapter-revisions

Conversation

@tsalo

@tsalo tsalo commented Nov 15, 2026

Copy link
Copy Markdown
Member

Addresses feedback on the built book after #101.

Book-wide

  • Inline code uses the same monospace font as code blocks.
  • Figures open full-size on click (_static/figure-zoom.js); click or Escape closes them.

Multi-echo denoising with tedana (ch03)

  • The output folder is emptied before the run, so the file list shows only one report and one log.

External regressors (ch09)

  • New figures: RETROICOR phases and regressors, RV and HR before and after convolution, fMRIPrep motion parameters and FD, task regressors.
  • Time-series axes are cropped to the data.
  • The ROI section uses only a ventricle mask, with a note that it demonstrates how ROIs can be used in a decision tree, not that this ROI is worth adding (fMRIPrep's csf column is similar). The mask figure uses a black background and no colorbar.
  • The decision trees are JSON files in content/decision_trees/. The page shows their contents (excerpts plus the full trees in dropdowns) instead of building them in code.
  • The component figure shows the components the external regressors changed (nuisance fit) and the top task-fitting accepted components (task fit).
  • Code is hidden where it isn't the point (plotting, tables, helper functions).

Task analysis (ch10)

  • No motion regressors in the GLM, since components were already selected on their fit to motion.
  • Rejected components are orthogonalized to the accepted ones before they go into the design matrix.
  • ROIs are defined a priori from the Juelich atlas (M1 hand knob, A1, V1) and warped to the run. The text explains that z-statistics are averaged in these ROIs rather than in suprathreshold clusters, to avoid double dipping.
  • One figure per contrast, with large stacked rows, a black background and one shared colorbar.
  • The ROI violin plot is long-form.

Notes

  • The execution cache hashes only code cells, so editing a tree JSON file alone does not trigger re-execution of ch09. Change a code cell (or clear the cache entry) after editing a tree.
  • Built locally with make book; make check-cache reports 22 of 22 notebooks cached. The cache has not been published for this branch yet.

🤖 Generated with Claude Code

- Add figures for the RETROICOR, RV/HR, motion, task, and ventricle
  regressors, and crop time-series axes to the data.
- Use a ventricle ROI only, as a demonstration of ROI regressors.
- Store the decision trees as JSON files and show their contents.
- Show task-fitting components alongside nuisance components.
- Task chapter: drop motion regressors, orthogonalize rejected
  components, average z in a priori ROIs, and redraw the brain figures.
- Start tedana runs from empty output folders.
- Use the code font for inline code and make figures zoom on click.
@tsalo
tsalo merged commit d35cac6 into main Nov 15, 2026
4 checks passed
@tsalo
tsalo deleted the book-figures-and-chapter-revisions branch November 15, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant