buckets
tit.opt.ex.buckets ¶
EEG-cap helpers for exhaustive search: electrode positions, the bundled 2-D template coordinates of a known net, and each electrode's left/right mirror.
:func:build_electrode_mirror_map drives the symmetric bucket search
(:mod:tit.opt.ex.symmetry); :func:_read_eeg_positions also feeds the
ex-search cap figures (:mod:tit.plotting.ti_metrics).
canonical_template_coord_path ¶
Return a canonical 2D EEG-template coordinate file for known net names.
Source code in tit/opt/ex/buckets.py
build_electrode_mirror_map ¶
Map each electrode to its left/right mirror in an EEG CSV.
The mirror plane is estimated from the cap (:func:_midsagittal_plane),
so off-centre and slightly rotated subject-space caps and 2-D templates in
pixel units mirror correctly. Electrodes are then matched greedily, best
first: a left/right pair costs the distance between one electrode's image
and the other; a midline electrode (closer to the plane than half the gap to
its nearest neighbour) may pair with itself at the cost of the distance to
its own image. The map is therefore an involution; an electrode left
without a partner on the other side is not in it. Downstream channel-pair
validation still prevents self-pairs from being evaluated.