nirspipe.qc.boilerplate.notes

nirspipe.qc.boilerplate.notes#

Section prose for the QC reports, so a paragraph is written once and read anywhere.

The per-metric hover text is next door in vocabulary; this is the layer above it, the paragraphs that introduce a section or say how to read the panel under it, and the caveats a run attaches to them from Python (caveats). One module per report family, merged into one table here.

Every paragraph a report prints lives here. A template keeps the {% if %} that picks which paragraph to say, never the sentence itself: a paragraph that differs between two runs is split into one key per variant, and a clause that comes and goes is a key of its own (hyper_post.selector_order) or a slot filled by one (hyper_raw.onset_residuals). Headings, table headers and the short hints beside a <summary> are labels and stay in the template.

The strings carry HTML (<code>, <b>, &nbsp;) and reach the page unescaped, which is what render() does with every other variable; a report environment that turned autoescaping on would have to wrap these.

Submodules#

Package Contents#

Functions#

section_note

One section’s paragraph, with any value slots filled.

Data#

API#

nirspipe.qc.boilerplate.notes.SECTION_NOTES = '_merge(...)'#
nirspipe.qc.boilerplate.notes.section_note(key: str, **values: object) → str#

One section’s paragraph, with any value slots filled.

section_note("trial_qc", window="-5 to 25 s")

Returns ‘’ for a key nothing is written for, the way metric_summary() does: a renamed key leaves a missing paragraph rather than stopping the render half way down a report.