[
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/AVGCAAD2024/removeBadChannels.m",
    "bytes": 5372,
    "functions": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 99,
        "text": "function warnOnceNoCoords()"
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      }
    ],
    "interesting_lines": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 42,
        "text": "if nargin < 2, chanlocs = []; end"
      },
      {
        "line": 61,
        "text": "if hasFullCoords(chanlocs, nbChan)"
      },
      {
        "line": 63,
        "text": "EEG   = buildEeglabStruct(eegCT, chanlocs);"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 88,
        "text": "if isempty(chanlocs) || ~isstruct(chanlocs) || numel(chanlocs) ~= nChan"
      },
      {
        "line": 91,
        "text": "if ~all(isfield(chanlocs, {'X', 'Y', 'Z'}))"
      },
      {
        "line": 95,
        "text": "tf = all(arrayfun(@(s) isok(s.X) && isok(s.Y) && isok(s.Z), chanlocs));"
      },
      {
        "line": 104,
        "text": "warning('removeBadChannels:noCoords', ..."
      },
      {
        "line": 105,
        "text": "['chanlocs coordinates missing/incomplete; using non-spatial fallback ' ..."
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      },
      {
        "line": 117,
        "text": "EEG.chanlocs = chanlocs;"
      },
      {
        "line": 118,
        "text": "EEG.nbchan   = numel(chanlocs);"
      },
      {
        "line": 121,
        "text": "EEG.srate    = 1;"
      },
      {
        "line": 135,
        "text": "EEG.event       = [];"
      }
    ],
    "dataset": "AVGCAAD2024",
    "relative_path": "removeBadChannels.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/AVGCAAD2024/preprocessCND.m",
    "bytes": 12791,
    "functions": [
      {
        "line": 166,
        "text": "function subjects = resolveSubjects(dataDir, requested)"
      },
      {
        "line": 183,
        "text": "function [applyBandpass, applyDownsample, finalFs] = buildSignalOps(cfg, fsOrig)"
      },
      {
        "line": 213,
        "text": "function pipeline = buildPipelineLog(cfg, fsOrig, finalFs)"
      },
      {
        "line": 234,
        "text": "function [eeg, pctRemoved] = repairBadSegments(eeg, fs, winSec, overlapFrac, zThresh, maxFrac)"
      },
      {
        "line": 283,
        "text": "function y = resampleHold(x, Lnew)"
      }
    ],
    "interesting_lines": [
      {
        "line": 43,
        "text": "cfg.bandpass    = true;   % 1. band-pass filter"
      },
      {
        "line": 45,
        "text": "cfg.badChannels = false;   % 3. bad-channel replacement (needs removeBadChannels on path)"
      },
      {
        "line": 54,
        "text": "cfg.downFs    = 32;   % target rate (Hz); integer fs/downFs uses downsample(), else resample()"
      },
      {
        "line": 77,
        "text": "Sn = load(fullfile(cfg.dataDir, sprintf('dataSub%d.mat',  sub)), 'neural');"
      },
      {
        "line": 78,
        "text": "St = load(fullfile(cfg.dataDir, sprintf('dataStim%d.mat', sub)), 'stim');"
      },
      {
        "line": 102,
        "text": "[eeg, badChannels] = removeBadChannels(eeg, neural.chanlocs, cfg.badChanArgs{:});"
      },
      {
        "line": 147,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataSub%d.mat',  cfg.outPrefix, sub)), 'neural');"
      },
      {
        "line": 148,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataStim%d.mat', cfg.outPrefix, sub)), 'stim');"
      },
      {
        "line": 203,
        "text": "applyDownsample = @(x) resample(x, cfg.downFs, fsOrig);"
      }
    ],
    "dataset": "AVGCAAD2024",
    "relative_path": "preprocessCND.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/DTU2018/removeBadChannels.m",
    "bytes": 5372,
    "functions": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 99,
        "text": "function warnOnceNoCoords()"
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      }
    ],
    "interesting_lines": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 42,
        "text": "if nargin < 2, chanlocs = []; end"
      },
      {
        "line": 61,
        "text": "if hasFullCoords(chanlocs, nbChan)"
      },
      {
        "line": 63,
        "text": "EEG   = buildEeglabStruct(eegCT, chanlocs);"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 88,
        "text": "if isempty(chanlocs) || ~isstruct(chanlocs) || numel(chanlocs) ~= nChan"
      },
      {
        "line": 91,
        "text": "if ~all(isfield(chanlocs, {'X', 'Y', 'Z'}))"
      },
      {
        "line": 95,
        "text": "tf = all(arrayfun(@(s) isok(s.X) && isok(s.Y) && isok(s.Z), chanlocs));"
      },
      {
        "line": 104,
        "text": "warning('removeBadChannels:noCoords', ..."
      },
      {
        "line": 105,
        "text": "['chanlocs coordinates missing/incomplete; using non-spatial fallback ' ..."
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      },
      {
        "line": 117,
        "text": "EEG.chanlocs = chanlocs;"
      },
      {
        "line": 118,
        "text": "EEG.nbchan   = numel(chanlocs);"
      },
      {
        "line": 121,
        "text": "EEG.srate    = 1;"
      },
      {
        "line": 135,
        "text": "EEG.event       = [];"
      }
    ],
    "dataset": "DTU2018",
    "relative_path": "removeBadChannels.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/DTU2018/preprocessCND.m",
    "bytes": 12848,
    "functions": [
      {
        "line": 168,
        "text": "function subjects = resolveSubjects(dataDir, requested)"
      },
      {
        "line": 185,
        "text": "function [applyBandpass, applyDownsample, finalFs] = buildSignalOps(cfg, fsOrig)"
      },
      {
        "line": 215,
        "text": "function pipeline = buildPipelineLog(cfg, fsOrig, finalFs)"
      },
      {
        "line": 236,
        "text": "function [eeg, pctRemoved] = repairBadSegments(eeg, fs, winSec, overlapFrac, zThresh, maxFrac)"
      },
      {
        "line": 285,
        "text": "function y = resampleHold(x, Lnew)"
      }
    ],
    "interesting_lines": [
      {
        "line": 43,
        "text": "cfg.bandpass    = true;   % 1. band-pass filter"
      },
      {
        "line": 45,
        "text": "cfg.badChannels = true;   % 3. bad-channel replacement (needs removeBadChannels on path)"
      },
      {
        "line": 54,
        "text": "cfg.downFs    = 32;   % target rate (Hz); integer fs/downFs uses downsample(), else resample()"
      },
      {
        "line": 78,
        "text": "Sn = load(fullfile(cfg.dataDir, sprintf('dataSub%d.mat',  sub)), 'neural');"
      },
      {
        "line": 79,
        "text": "St = load(fullfile(cfg.dataDir, sprintf('dataStim%d.mat', sub)), 'stim');"
      },
      {
        "line": 111,
        "text": "[eeg, badChannels] = removeBadChannels(eeg, neural.chanlocs, cfg.badChanArgs{:});"
      },
      {
        "line": 149,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataSub%d.mat',  cfg.outPrefix, sub)), 'neural');"
      },
      {
        "line": 150,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataStim%d.mat', cfg.outPrefix, sub)), 'stim');"
      },
      {
        "line": 205,
        "text": "applyDownsample = @(x) resample(x, cfg.downFs, fsOrig);"
      }
    ],
    "dataset": "DTU2018",
    "relative_path": "preprocessCND.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/KUL2016/removeBadChannels.m",
    "bytes": 5372,
    "functions": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 99,
        "text": "function warnOnceNoCoords()"
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      }
    ],
    "interesting_lines": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 42,
        "text": "if nargin < 2, chanlocs = []; end"
      },
      {
        "line": 61,
        "text": "if hasFullCoords(chanlocs, nbChan)"
      },
      {
        "line": 63,
        "text": "EEG   = buildEeglabStruct(eegCT, chanlocs);"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 88,
        "text": "if isempty(chanlocs) || ~isstruct(chanlocs) || numel(chanlocs) ~= nChan"
      },
      {
        "line": 91,
        "text": "if ~all(isfield(chanlocs, {'X', 'Y', 'Z'}))"
      },
      {
        "line": 95,
        "text": "tf = all(arrayfun(@(s) isok(s.X) && isok(s.Y) && isok(s.Z), chanlocs));"
      },
      {
        "line": 104,
        "text": "warning('removeBadChannels:noCoords', ..."
      },
      {
        "line": 105,
        "text": "['chanlocs coordinates missing/incomplete; using non-spatial fallback ' ..."
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      },
      {
        "line": 117,
        "text": "EEG.chanlocs = chanlocs;"
      },
      {
        "line": 118,
        "text": "EEG.nbchan   = numel(chanlocs);"
      },
      {
        "line": 121,
        "text": "EEG.srate    = 1;"
      },
      {
        "line": 135,
        "text": "EEG.event       = [];"
      }
    ],
    "dataset": "KUL2016",
    "relative_path": "removeBadChannels.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/KUL2016/preprocessCND.m",
    "bytes": 12790,
    "functions": [
      {
        "line": 166,
        "text": "function subjects = resolveSubjects(dataDir, requested)"
      },
      {
        "line": 183,
        "text": "function [applyBandpass, applyDownsample, finalFs] = buildSignalOps(cfg, fsOrig)"
      },
      {
        "line": 213,
        "text": "function pipeline = buildPipelineLog(cfg, fsOrig, finalFs)"
      },
      {
        "line": 234,
        "text": "function [eeg, pctRemoved] = repairBadSegments(eeg, fs, winSec, overlapFrac, zThresh, maxFrac)"
      },
      {
        "line": 283,
        "text": "function y = resampleHold(x, Lnew)"
      }
    ],
    "interesting_lines": [
      {
        "line": 43,
        "text": "cfg.bandpass    = true;   % 1. band-pass filter"
      },
      {
        "line": 45,
        "text": "cfg.badChannels = true;   % 3. bad-channel replacement (needs removeBadChannels on path)"
      },
      {
        "line": 54,
        "text": "cfg.downFs    = 32;   % target rate (Hz); integer fs/downFs uses downsample(), else resample()"
      },
      {
        "line": 77,
        "text": "Sn = load(fullfile(cfg.dataDir, sprintf('dataSub%d.mat',  sub)), 'neural');"
      },
      {
        "line": 78,
        "text": "St = load(fullfile(cfg.dataDir, sprintf('dataStim%d.mat', sub)), 'stim');"
      },
      {
        "line": 102,
        "text": "[eeg, badChannels] = removeBadChannels(eeg, neural.chanlocs, cfg.badChanArgs{:});"
      },
      {
        "line": 147,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataSub%d.mat',  cfg.outPrefix, sub)), 'neural');"
      },
      {
        "line": 148,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataStim%d.mat', cfg.outPrefix, sub)), 'stim');"
      },
      {
        "line": 203,
        "text": "applyDownsample = @(x) resample(x, cfg.downFs, fsOrig);"
      }
    ],
    "dataset": "KUL2016",
    "relative_path": "preprocessCND.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/KUL_AAD_UltraHD2021/removeBadChannels.m",
    "bytes": 5372,
    "functions": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 99,
        "text": "function warnOnceNoCoords()"
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      }
    ],
    "interesting_lines": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 42,
        "text": "if nargin < 2, chanlocs = []; end"
      },
      {
        "line": 61,
        "text": "if hasFullCoords(chanlocs, nbChan)"
      },
      {
        "line": 63,
        "text": "EEG   = buildEeglabStruct(eegCT, chanlocs);"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 88,
        "text": "if isempty(chanlocs) || ~isstruct(chanlocs) || numel(chanlocs) ~= nChan"
      },
      {
        "line": 91,
        "text": "if ~all(isfield(chanlocs, {'X', 'Y', 'Z'}))"
      },
      {
        "line": 95,
        "text": "tf = all(arrayfun(@(s) isok(s.X) && isok(s.Y) && isok(s.Z), chanlocs));"
      },
      {
        "line": 104,
        "text": "warning('removeBadChannels:noCoords', ..."
      },
      {
        "line": 105,
        "text": "['chanlocs coordinates missing/incomplete; using non-spatial fallback ' ..."
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      },
      {
        "line": 117,
        "text": "EEG.chanlocs = chanlocs;"
      },
      {
        "line": 118,
        "text": "EEG.nbchan   = numel(chanlocs);"
      },
      {
        "line": 121,
        "text": "EEG.srate    = 1;"
      },
      {
        "line": 135,
        "text": "EEG.event       = [];"
      }
    ],
    "dataset": "KUL_AAD_UltraHD2021",
    "relative_path": "removeBadChannels.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/KUL_AAD_UltraHD2021/preprocessCND.m",
    "bytes": 12910,
    "functions": [
      {
        "line": 171,
        "text": "function subjects = resolveSubjects(dataDir, requested)"
      },
      {
        "line": 188,
        "text": "function [applyBandpass, applyDownsample, finalFs] = buildSignalOps(cfg, fsOrig)"
      },
      {
        "line": 218,
        "text": "function pipeline = buildPipelineLog(cfg, fsOrig, finalFs)"
      },
      {
        "line": 239,
        "text": "function [eeg, pctRemoved] = repairBadSegments(eeg, fs, winSec, overlapFrac, zThresh, maxFrac)"
      },
      {
        "line": 288,
        "text": "function y = resampleHold(x, Lnew)"
      }
    ],
    "interesting_lines": [
      {
        "line": 43,
        "text": "cfg.bandpass    = true;   % 1. band-pass filter"
      },
      {
        "line": 45,
        "text": "cfg.badChannels = true;   % 3. bad-channel replacement (needs removeBadChannels on path)"
      },
      {
        "line": 54,
        "text": "cfg.downFs    = 32;   % target rate (Hz); integer fs/downFs uses downsample(), else resample()"
      },
      {
        "line": 73,
        "text": "St = load(fullfile(cfg.dataDir, sprintf('dataStim.mat')), 'stim');"
      },
      {
        "line": 80,
        "text": "Sn = load(fullfile(cfg.dataDir, sprintf('dataSub%d.mat',  sub)), 'neural');"
      },
      {
        "line": 104,
        "text": "[eeg, badChannels] = removeBadChannels(eeg, neural.chanlocs, cfg.badChanArgs{:});"
      },
      {
        "line": 152,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataSub%d.mat',  cfg.outPrefix, sub)), 'neural');"
      },
      {
        "line": 153,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataStim%d.mat', cfg.outPrefix, sub)), 'stim');"
      },
      {
        "line": 208,
        "text": "applyDownsample = @(x) resample(x, cfg.downFs, fsOrig);"
      }
    ],
    "dataset": "KUL_AAD_UltraHD2021",
    "relative_path": "preprocessCND.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/USTC2026/removeBadChannels.m",
    "bytes": 5372,
    "functions": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 99,
        "text": "function warnOnceNoCoords()"
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      }
    ],
    "interesting_lines": [
      {
        "line": 1,
        "text": "function [eegClean, badChannels] = removeBadChannels(eeg, chanlocs, highThreshold, lowThreshold)"
      },
      {
        "line": 42,
        "text": "if nargin < 2, chanlocs = []; end"
      },
      {
        "line": 61,
        "text": "if hasFullCoords(chanlocs, nbChan)"
      },
      {
        "line": 63,
        "text": "EEG   = buildEeglabStruct(eegCT, chanlocs);"
      },
      {
        "line": 84,
        "text": "function tf = hasFullCoords(chanlocs, nChan)"
      },
      {
        "line": 88,
        "text": "if isempty(chanlocs) || ~isstruct(chanlocs) || numel(chanlocs) ~= nChan"
      },
      {
        "line": 91,
        "text": "if ~all(isfield(chanlocs, {'X', 'Y', 'Z'}))"
      },
      {
        "line": 95,
        "text": "tf = all(arrayfun(@(s) isok(s.X) && isok(s.Y) && isok(s.Z), chanlocs));"
      },
      {
        "line": 104,
        "text": "warning('removeBadChannels:noCoords', ..."
      },
      {
        "line": 105,
        "text": "['chanlocs coordinates missing/incomplete; using non-spatial fallback ' ..."
      },
      {
        "line": 112,
        "text": "function EEG = buildEeglabStruct(data, chanlocs)"
      },
      {
        "line": 117,
        "text": "EEG.chanlocs = chanlocs;"
      },
      {
        "line": 118,
        "text": "EEG.nbchan   = numel(chanlocs);"
      },
      {
        "line": 121,
        "text": "EEG.srate    = 1;"
      },
      {
        "line": 135,
        "text": "EEG.event       = [];"
      }
    ],
    "dataset": "USTC2026",
    "relative_path": "removeBadChannels.m"
  },
  {
    "path": "/root/disk_3tb/EEG-sAAD-Grand-Challenge-Training-Dataset/data/cnd/USTC2026/preprocessCND.m",
    "bytes": 12790,
    "functions": [
      {
        "line": 166,
        "text": "function subjects = resolveSubjects(dataDir, requested)"
      },
      {
        "line": 183,
        "text": "function [applyBandpass, applyDownsample, finalFs] = buildSignalOps(cfg, fsOrig)"
      },
      {
        "line": 213,
        "text": "function pipeline = buildPipelineLog(cfg, fsOrig, finalFs)"
      },
      {
        "line": 234,
        "text": "function [eeg, pctRemoved] = repairBadSegments(eeg, fs, winSec, overlapFrac, zThresh, maxFrac)"
      },
      {
        "line": 283,
        "text": "function y = resampleHold(x, Lnew)"
      }
    ],
    "interesting_lines": [
      {
        "line": 43,
        "text": "cfg.bandpass    = true;   % 1. band-pass filter"
      },
      {
        "line": 45,
        "text": "cfg.badChannels = false;   % 3. bad-channel replacement (needs removeBadChannels on path)"
      },
      {
        "line": 54,
        "text": "cfg.downFs    = 32;   % target rate (Hz); integer fs/downFs uses downsample(), else resample()"
      },
      {
        "line": 77,
        "text": "Sn = load(fullfile(cfg.dataDir, sprintf('dataSub%d.mat',  sub)), 'neural');"
      },
      {
        "line": 78,
        "text": "St = load(fullfile(cfg.dataDir, sprintf('dataStim%d.mat', sub)), 'stim');"
      },
      {
        "line": 102,
        "text": "[eeg, badChannels] = removeBadChannels(eeg, neural.chanlocs, cfg.badChanArgs{:});"
      },
      {
        "line": 147,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataSub%d.mat',  cfg.outPrefix, sub)), 'neural');"
      },
      {
        "line": 148,
        "text": "save(fullfile(cfg.dataDir, sprintf('%sdataStim%d.mat', cfg.outPrefix, sub)), 'stim');"
      },
      {
        "line": 203,
        "text": "applyDownsample = @(x) resample(x, cfg.downFs, fsOrig);"
      }
    ],
    "dataset": "USTC2026",
    "relative_path": "preprocessCND.m"
  }
]