matlab(tdcs): data loading + curated group map

This commit is contained in:
Experiments DB Dev
2026-07-20 07:29:31 -04:00
parent 808040a522
commit 33121e3a8f
5 changed files with 316 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
function cfg = tdcs_config()
%TDCS_CONFIG Curated group map and merge maps for the tDCS reaching study.
% CFG = TDCS_CONFIG() returns a struct with:
% .groups containers.Map, subject name (char) -> curated group name
% (char), for the 12 curated animals only. All other
% animals present in the raw export are not in this map
% and must be dropped by callers.
% .ref reference group used to code the GLME group factor,
% 'Electrode-Box-B2'.
% .mergeA2 containers.Map collapsing the two UNKNOWN conditions
% toward the weaker anchor: Electrode-Box-A ->
% Electrode-Box-A2, Right-Electrode -> Electrode-Box-B2.
% .mergeB2 containers.Map collapsing both UNKNOWN conditions onto
% the stronger anchor: Electrode-Box-A -> Electrode-Box-B2,
% Right-Electrode -> Electrode-Box-B2.
% .anchorLow 'Electrode-Box-A2', the weaker of the two known anchors.
% .anchorHigh 'Electrode-Box-B2', the stronger known anchor (== ref).
% .unknowns cell array of the two ungrouped conditions that get
% classified against the two anchors: {'Electrode-Box-A',
% 'Right-Electrode'}.
%
% See docs/superpowers/plans/2026-07-20-matlab-tdcs-analysis.md (Global
% Constraints) for the source of these values.
% Curated 12-animal group map (by animal name).
subjectGroup = {
'Vu-vuong', 'Naive'
'Khoai-lang-2', 'Naive'
'Khoai-tay-2', 'Naive'
'OM-2', 'Naive'
'Khoai-tay-1', 'Electrode-Box-A'
'Banh-mi-2', 'Electrode-Box-A2'
'Egg-tart-2', 'Electrode-Box-A2'
'Root-beer-2', 'Electrode-Box-A2'
'Banh-mi-1', 'Electrode-Box-B2'
'Egg-tart-1', 'Electrode-Box-B2'
'Root-beer-1', 'Electrode-Box-B2'
'Khoai-lang-1', 'Right-Electrode'
};
cfg = struct();
cfg.groups = containers.Map(subjectGroup(:, 1), subjectGroup(:, 2));
cfg.ref = 'Electrode-Box-B2';
cfg.anchorLow = 'Electrode-Box-A2';
cfg.anchorHigh = 'Electrode-Box-B2';
cfg.unknowns = {'Electrode-Box-A', 'Right-Electrode'};
cfg.mergeA2 = containers.Map( ...
{'Electrode-Box-A', 'Right-Electrode'}, ...
{'Electrode-Box-A2', 'Electrode-Box-B2'});
cfg.mergeB2 = containers.Map( ...
{'Electrode-Box-A', 'Right-Electrode'}, ...
{'Electrode-Box-B2', 'Electrode-Box-B2'});
end