ex_search
tit.reporting.generators.ex_search ¶
Ex-search report: one self-contained HTML record per exhaustive montage search.
Built on :mod:tit.reporting.html.components (ARCHITECTURE.md §14). Everything is read from the
run folder: run_config.json (buckets, current sweep, ROI name and radius, leadfield),
final_output.csv (one row per montage and current split), the ROI confirmation
(roi.tetravox.json) and the leadfield's SimNIBS log (electrode geometry, conductivity).
The goal definition and dose record come from tit.reporting.qc_rules.RULES["opt"]; the page
has no checks.
The default view is the winner (ranked by composite = ROI mean × focality) with its electrodes and dose, one chart of every montage's ROI mean against focality, the top 25 as a sortable table, and the ROI and ranking in words; methods and the run record are collapsed.
tit.opt.ex and tit.opt.mex write one when a search finishes (an mEx page lists four
channels at its one current). Rebuild one (nothing is re-searched)::
simnibs_python -m tit.reporting.generators.ex_search <project> <subject> <run name> [--out DIR]
read_results ¶
final_output.csv rows with numbers as floats, ranked by composite (best first).
top_distinct ¶
The best top rows that are different stimulations.
A row is the set of its channels, each an unordered electrode pair at its current: the TI envelope ignores channel polarity and order, so runs written before pool mode evaluated each montage once list one montage up to eight times. Rows are ranked best first.
Source code in tit/reporting/generators/ex_search.py
channel_currents ¶
The current of each channel of row (mA), in pair order: two for ex, four for mEx.
leadfield_facts ¶
Electrode geometry and conductivity the leadfield was computed with (its SimNIBS log).
Source code in tit/reporting/generators/ex_search.py
leadfield_log ¶
The text of the SimNIBS log that built this run's leadfield, or None.
A subject's leadfields/ keeps one log per attempt, for every net. A log whose
EEG Cap: line names another net is never used; among the rest, one that names the run's
HDF5 file (written when the leadfield finished) beats one that only names its net, which
beats one that names no net (an attempt that died first); the newest breaks ties.
Source code in tit/reporting/generators/ex_search.py
collect ¶
Everything the report shows, from one ex-search run folder.
Source code in tit/reporting/generators/ex_search.py
target_description ¶
The ROI as run_config.json defines it, for a run without a ROI plate.
Spheres around the centres in roi_names (or roi_name), in subject or MNI
coordinates, joined with any roi_atlas labels or masks. A run written before these
fields were recorded is named, not described: its roi_name may be only a label.
Source code in tit/reporting/generators/ex_search.py
density_chart ¶
Every montage as ROI mean against focality: a log-shaded density grid, the top top as rings, the winner filled, and three curves of equal composite (ROI mean × focality).
Source code in tit/reporting/generators/ex_search.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
create_ex_search_report ¶
create_ex_search_report(project_dir: str | Path, subject_id: str, run_dir: str | Path, out_dir: str | Path | None = None) -> Path
Write the report for one ex- or mEx-search run folder; into the project's reports unless out_dir.