OSCR

Stress-related hypofrontality in depression and its relation to altered activation prior to the stress response.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [1] § Methods › Neural measurements ↔ 2026_04_09_fNIRSpreprocessing_TSST_Anticipation.m, lines 1612–1641 · score 0.65 · 0–40 s, Event related, baseline corrected, exported, anticipatory, TSST
  2. [2] § Methods › Data analysis ↔ Plots.R, lines 294–362 · score 0.60 · multivariate outliers, Mahalanobis distance, fNIRS, window, anticipation
  3. [3] § Methods › Neural measurements ↔ 2026_04_09_fNIRSpreprocessing_TSST_Anticipation.m, lines 568–587 · score 0.55 · signal improvement, TDDR, bandpass, CBSI, Correlation

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 2,838 lines · 130 KB · no license · 2 matches

  1. %% Skript zur Auswertung von TSST Anticipation
  2. % data: TSST session of CPT-TSST study (study 1) and first TSST of ERT study (study 2)
  3. % last edited 2026_04_09 by Isabell Int-Veen
  4. % add paths with subfolders:
  5. % Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Matlab Code und Workspaces\EigeneFunktionen
  6. % Q:\NAS\Ehlis_Auswertung\Laufwerk_S\routines\2017-04-27
  7. clear all
  8. clc
  9. pfade = { ...
  10. 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Matlab Code und Workspaces\EigeneFunktionen', ...
  11. 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\routines\2017-04-27',...
  12. '\\nacl2svm1.ukt.ad.local\psint1i1\UserProfile\Documents\MATLAB'};
  13. for i = 1:numel(pfade)
  14. if isfolder(pfade{i})
  15. addpath(genpath(pfade{i}));
  16. fprintf('Pfad hinzugefuegt: %s\n', pfade{i});
  17. else
  18. warning('Pfad nicht gefunden: %s', pfade{i});
  19. end
  20. end
  21. clear i pfade
  22. initroutines('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\routines\2017-04-27')
  23. %% read data
  24. S = NirsSubjectData();
  25. S = S.setProperty('read_directory','Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\Daten_gesamt');
  26. S = S.setProperty('subject_keyword','VP');
  27. S = S.setProperty('read_type','etg4000');
  28. % CTRL1
  29. S = S.setProperty('read_type','etg4000');
  30. S = S.setProperty('file_name_filter',{'VP','_ctrl1_Probe1_Oxy','.csv'});
  31. S = S.readSubjectData('CTL1.Oxy1');
  32. S = S.setProperty('file_name_filter',{'VP','_ctrl1_Probe1_Deoxy','.csv'});
  33. S = S.readSubjectData('CTL1.Deoxy1');
  34. S = S.setProperty('read_type','etg4000_trigger');
  35. S = S.readSubjectData('CTL1.trigger');
  36. S = S.setProperty('read_type','etg4000');
  37. S = S.setProperty('file_name_filter',{'VP','_ctrl1_Probe2_Oxy','.csv'});
  38. S = S.readSubjectData('CTL1.Oxy2');
  39. S = S.setProperty('file_name_filter',{'VP','_ctrl1_Probe2_Deoxy','.csv'});
  40. S = S.readSubjectData('CTL1.Deoxy2');
  41. % CTRL2
  42. S = S.setProperty('read_type','etg4000');
  43. S = S.setProperty('file_name_filter',{'VP','_ctrl2_Probe1_Oxy','.csv'});
  44. S = S.readSubjectData('CTL2.Oxy1');
  45. S = S.setProperty('file_name_filter',{'VP','_ctrl2_Probe1_Deoxy','.csv'});
  46. S = S.readSubjectData('CTL2.Deoxy1');
  47. S = S.setProperty('read_type','etg4000_trigger');
  48. S = S.readSubjectData('CTL2.trigger');
  49. S = S.setProperty('read_type','etg4000');
  50. S = S.setProperty('file_name_filter',{'VP','_ctrl2_Probe2_Oxy','.csv'});
  51. S = S.readSubjectData('CTL2.Oxy2');
  52. S = S.setProperty('file_name_filter',{'VP','_ctrl2_Probe2_Deoxy','.csv'});
  53. S = S.readSubjectData('CTL2.Deoxy2');
  54. % Arith
  55. S = S.setProperty('read_type','etg4000');
  56. S = S.setProperty('file_name_filter',{'VP','_arit_Probe1_Oxy','.csv'});
  57. S = S.readSubjectData('Arith.Oxy1');
  58. S = S.setProperty('file_name_filter',{'VP','_arit_Probe1_Deoxy','.csv'});
  59. S = S.readSubjectData('Arith.Deoxy1');
  60. S = S.setProperty('read_type','etg4000_trigger');
  61. S = S.readSubjectData('Stress.trigger');
  62. S = S.setProperty('read_type','etg4000');
  63. S = S.setProperty('file_name_filter',{'VP','_arit_Probe2_Oxy','.csv'});
  64. S = S.readSubjectData('Arith.Oxy2');
  65. S = S.setProperty('file_name_filter',{'VP','_arit_Probe2_Deoxy','.csv'});
  66. S = S.readSubjectData('Arith.Deoxy2');
  67. % probeset configuration
  68. % CTRL1
  69. F = NirsDataFunctor();
  70. F = F.setProperty('function_handle',@separateProbeset34Stress);
  71. F = F.setProperty('input_names', {'CTL1.Oxy1','CTL1.Deoxy1'});
  72. F = F.setProperty('output_names',{'CTL1.Oxy3','CTL1.Deoxy3';...
  73. 'CTL1.Oxy4','CTL1.Deoxy4'});
  74. S = S.processData(F);
  75. F = NirsDataFunctor();
  76. F = F.setProperty('function_handle',@separateProbeset56Stress);
  77. F = F.setProperty('input_names', {'CTL1.Oxy2','CTL1.Deoxy2'});
  78. F = F.setProperty('output_names',{'CTL1.Oxy5','CTL1.Deoxy5';...
  79. 'CTL1.Oxy6','CTL1.Deoxy6'});
  80. S = S.processData(F);
  81. % CTRL2
  82. F = NirsDataFunctor();
  83. F = F.setProperty('function_handle',@separateProbeset34Stress);
  84. F = F.setProperty('input_names', {'CTL2.Oxy1','CTL2.Deoxy1'});
  85. F = F.setProperty('output_names',{'CTL2.Oxy3','CTL2.Deoxy3';...
  86. 'CTL2.Oxy4','CTL2.Deoxy4'});
  87. S = S.processData(F);
  88. F = NirsDataFunctor();
  89. F = F.setProperty('function_handle',@separateProbeset56Stress);
  90. F = F.setProperty('input_names', {'CTL2.Oxy2','CTL2.Deoxy2'});
  91. F = F.setProperty('output_names',{'CTL2.Oxy5','CTL2.Deoxy5';...
  92. 'CTL2.Oxy6','CTL2.Deoxy6'});
  93. S = S.processData(F);
  94. % Arith
  95. F = NirsDataFunctor();
  96. F = F.setProperty('function_handle',@separateProbeset34Stress);
  97. F = F.setProperty('input_names', {'Arith.Oxy1','Arith.Deoxy1'});
  98. F = F.setProperty('output_names',{'Arith.Oxy3','Arith.Deoxy3';...
  99. 'Arith.Oxy4','Arith.Deoxy4'});
  100. S = S.processData(F);
  101. F = NirsDataFunctor();
  102. F = F.setProperty('function_handle',@separateProbeset56Stress);
  103. F = F.setProperty('input_names', {'Arith.Oxy2','Arith.Deoxy2'});
  104. F = F.setProperty('output_names',{'Arith.Oxy5','Arith.Deoxy5';...
  105. 'Arith.Oxy6','Arith.Deoxy6'});
  106. S = S.processData(F);
  107. % merge probesets
  108. S = S.processData(NirsDataFunctor('function_handle',@ merge, 'input_names',{'CTL1.Oxy3';'CTL1.Oxy4';'CTL1.Oxy5';'CTL1.Oxy6'},'output_names',{'CTL1.Oxy'}));
  109. S = S.processData(NirsDataFunctor('function_handle',@ merge, 'input_names',{'CTL1.Deoxy3';'CTL1.Deoxy4';'CTL1.Deoxy5';'CTL1.Deoxy6'},'output_names',{'CTL1.Deoxy'}));
  110. S = S.processData(NirsDataFunctor('function_handle',@ merge, 'input_names',{'CTL2.Oxy3';'CTL2.Oxy4';'CTL2.Oxy5';'CTL2.Oxy6'},'output_names',{'CTL2.Oxy'}));
  111. S = S.processData(NirsDataFunctor('function_handle',@ merge, 'input_names',{'CTL2.Deoxy3';'CTL2.Deoxy4';'CTL2.Deoxy5';'CTL2.Deoxy6'},'output_names',{'CTL2.Deoxy'}));
  112. S = S.processData(NirsDataFunctor('function_handle',@ merge, 'input_names',{'Arith.Oxy3';'Arith.Oxy4';'Arith.Oxy5';'Arith.Oxy6'},'output_names',{'Arith.Oxy'}));
  113. S = S.processData(NirsDataFunctor('function_handle',@ merge, 'input_names',{'Arith.Deoxy3';'Arith.Deoxy4';'Arith.Deoxy5';'Arith.Deoxy6'},'output_names',{'Arith.Deoxy'}));
  114. % settings
  115. clear settings P PS;
  116. P = NirsPlotTool();
  117. settings.experiment.time_series{1} = {'name','CTL1.cui','sample_rate',10,'trigger_name','CTL1.trigger'};
  118. settings.experiment.time_series{2} = {'name','CTL2.cui','sample_rate',10,'trigger_name','CTL2.trigger'};
  119. settings.experiment.time_series{3} = {'name','Arith.cui','sample_rate',10,'trigger_name','Stress.trigger'};
  120. settings.experiment.time_series{4} = {'name','CTL1.Oxy','sample_rate',10,'trigger_name','CTL1.trigger'};
  121. settings.experiment.time_series{5} = {'name','CTL1.Deoxy','sample_rate',10,'trigger_name','CTL1.trigger'};
  122. settings.experiment.time_series{6} = {'name','CTL2.Oxy','sample_rate',10,'trigger_name','CTL2.trigger'};
  123. settings.experiment.time_series{7} = {'name','CTL2.Deoxy','sample_rate',10,'trigger_name','CTL2.trigger'};
  124. settings.experiment.time_series{8} = {'name','Arith.Oxy','sample_rate',10,'trigger_name','Stress.trigger'};
  125. settings.experiment.time_series{9} = {'name','Arith.Deoxy','sample_rate',10,'trigger_name','Stress.trigger'};
  126. settings.experiment.category{1} = {'name','TriggerA','trigger_token',1}; % for analysis of window 3
  127. % settings.experiment.category{1} = {'name','TriggerA','trigger_token',9}; % for analysis of window 1 and 2
  128. P = P.setProperties(settings);
  129. P = NirsPlotTool();
  130. P = P.setProperty('show_probeset','on');
  131. P = P.setProperties(settings);
  132. PS = NirsProbeset('brain_coord_file','Q:\NAS\Ehlis_Auswertung\Laufwerk_S\\AG-Mitglieder\David\Studie Stress Rumination\Koords\NIRS-probesetXYZ_Alle2.txt');
  133. settings.plot_tool.probesets{1} = {'name','Gesamt','probeset',PS};
  134. P = P.setProperties(settings);
  135. P = P.setProperty('probesets',{'name','Gesamt','probeset',PS});
  136. P = P.setProperties(settings);
  137. P = P.setProperty('show_probeset','on');
  138. P = P.setProperties(settings);
  139. Subject=S.tags(1);
  140. Bedingungen={'CTL1.Oxy';'CTL2.Oxy';'Arith.Oxy'};
  141. Bedingungen2={'CTL1cui';'CTL2cui';'Arithcui'};
  142. %% find NaNs
  143. clear NaNOut
  144. for x=1:size(Bedingungen,1)
  145. clear dCui DataRS DataVar Out
  146. Subject=S.tags(1);
  147. for k=1:length(Subject)
  148. dCui = S.getSubjectData(Subject{k},Bedingungen{x});
  149. DataRS{k,1}(:,:)=dCui(:,:);
  150. end
  151. clear dCui
  152. for k=1:length(Subject)
  153. for i=1:size(DataRS{k,1}(:,:),2)
  154. DataVar(k,i) = var(DataRS{k,1}(:,i));
  155. end
  156. end
  157. for k=1:size(DataVar,1)
  158. for i=1:size(DataVar,2)
  159. if isnan(DataVar(k,i))==1
  160. Out(k,i)=1;
  161. else
  162. Out(k,i)=0;
  163. end
  164. end
  165. end
  166. NaNOut.(Bedingungen2{x}).percent=mean(Out,2)*100;
  167. for k=1:size(Out,1)
  168. a=Out(k,:)'
  169. NaNOut.(Bedingungen2{x}).Channel{k,1}(:)=find(a);
  170. sid=Subject{k};
  171. NaNOut.(Bedingungen2{x}).Channel{k,2}(:)=sid;
  172. clear a sid
  173. end
  174. end
  175. %% interpolate NaN
  176. % template:
  177. % F = NirsDataFunctor(); % clears output
  178. % F = F.setProperty('parameters',{*Channel*,{[* * * *]}});S = S.processData(F,*ID*);
  179. % ctrl1
  180. F = NirsDataFunctor(); % clears output
  181. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  182. F = F.setProperty('input_names',{'CTL1.Oxy','CTL1.Deoxy'});
  183. F = F.setProperty('parameters',{8,{[3 6 9]}});S = S.processData(F,1006);
  184. F = F.setProperty('parameters',{11,{[6 9 12]}});S = S.processData(F,1006);
  185. F = F.setProperty('parameters',{30,{[25 26 35]}});S = S.processData(F,1008);
  186. F = F.setProperty('parameters',{31,{[26 27 35]}});S = S.processData(F,1008);
  187. F = F.setProperty('parameters',{32,{[27 28 37]}});S = S.processData(F,1008);
  188. F = F.setProperty('parameters',{34,{[29 38 39]}});S = S.processData(F,1008);
  189. F = F.setProperty('parameters',{36,{[35 37 40 41]}});S = S.processData(F,1008);
  190. F = F.setProperty('parameters',{25,{[26 29]}});S = S.processData(F,1015);
  191. F = F.setProperty('parameters',{30,{[26 34 35]}});S = S.processData(F,1015);
  192. F = F.setProperty('parameters',{29,{[25 34 38]}});S = S.processData(F,1016);
  193. F = F.setProperty('parameters',{37,{[32 33 41 42]}});S = S.processData(F,1016);
  194. F = F.setProperty('parameters',{45,{[40 41 44 46]}});S = S.processData(F,1018);
  195. F = F.setProperty('parameters',{1,{[2 3 4]}});S = S.processData(F,1020);
  196. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1025);
  197. F = F.setProperty('parameters',{10,{[5 7 9]}});S = S.processData(F,1029);
  198. F = F.setProperty('parameters',{12,{[7 9 11]}});S = S.processData(F,1029);
  199. F = F.setProperty('parameters',{44,{[39 40 43 45]}});S = S.processData(F,1034);
  200. F = F.setProperty('parameters',{29,{[25 34 38]}});S = S.processData(F,1046);
  201. F = F.setProperty('parameters',{26,{[25 27 35]}});S = S.processData(F,1051);
  202. F = F.setProperty('parameters',{30,{[25 34 35]}});S = S.processData(F,1051);
  203. F = F.setProperty('parameters',{31,{[27 35 36]}});S = S.processData(F,1051);
  204. F = F.setProperty('parameters',{32,{[27 28 36]}});S = S.processData(F,1051);
  205. F = F.setProperty('parameters',{37,{[33 41 42]}});S = S.processData(F,1051);
  206. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1054);
  207. F = F.setProperty('parameters',{30,{[25 26 29 31 35 34]}});S = S.processData(F,1102);
  208. F = F.setProperty('parameters',{2,{[4 1]}});S = S.processData(F,1104);
  209. F = F.setProperty('parameters',{5,{[4 10]}});S = S.processData(F,1104);
  210. F = F.setProperty('parameters',{7,{[4 6 9 10]}});S = S.processData(F,1104);
  211. F = F.setProperty('parameters',{22,{[17 19 24 21]}});S = S.processData(F,1109);
  212. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1109);
  213. F = F.setProperty('parameters',{32,{[27 28 31 33 36]}});S = S.processData(F,1109);
  214. F = F.setProperty('parameters',{37,{[33 36 42 41]}});S = S.processData(F,1109);
  215. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1111);
  216. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1112);
  217. F = F.setProperty('parameters',{4,{[2 5 7 1 6 3]}});S = S.processData(F,1117);
  218. F = F.setProperty('parameters',{4,{[2 5 7 1 6 3]}});S = S.processData(F,1118);
  219. F = F.setProperty('parameters',{40,{[35 36 39 41 44 45]}});S = S.processData(F,1120);
  220. F = F.setProperty('parameters',{11,{[6 8 9]}});S = S.processData(F,1121);
  221. F = F.setProperty('parameters',{12,{[10 7 9]}});S = S.processData(F,1121);
  222. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1122);
  223. F = F.setProperty('parameters',{41,{[36 37 40 42 45 46]}});S = S.processData(F,1122);
  224. F = F.setProperty('parameters',{15,{[13 16]}});S = S.processData(F,1123);
  225. F = F.setProperty('parameters',{18,{[13 16 21]}});S = S.processData(F,1123);
  226. F = F.setProperty('parameters',{20,{[24 21 13]}});S = S.processData(F,1123);
  227. F = F.setProperty('parameters',{23,{[21 24]}});S = S.processData(F,1123);
  228. F = F.setProperty('parameters',{28,{[27 33 37]}});S = S.processData(F,1124);
  229. F = F.setProperty('parameters',{32,{[27 31 33 36 37]}});S = S.processData(F,1124);
  230. F = F.setProperty('parameters',{15,{[13 16]}});S = S.processData(F,1130);
  231. F = F.setProperty('parameters',{18,{[13 16 21]}});S = S.processData(F,1130);
  232. F = F.setProperty('parameters',{20,{[24 21 13]}});S = S.processData(F,1130);
  233. F = F.setProperty('parameters',{23,{[21 24]}});S = S.processData(F,1130);
  234. F = F.setProperty('parameters',{36,{[27 31 32 40 41 45]}});S = S.processData(F,1135);
  235. F = F.setProperty('parameters',{18,{[20 15 23 13 21 16]}});S = S.processData(F,1143);
  236. F = F.setProperty('parameters',{22,{[24 21 19]}});S = S.processData(F,1143);
  237. F = F.setProperty('parameters',{8,{[3 6 9]}});S = S.processData(F,2017);
  238. F = F.setProperty('parameters',{11,{[9 12]}});S = S.processData(F,2017);
  239. F = F.setProperty('parameters',{30,{[35 34 25 26]}});S = S.processData(F,2024);
  240. F = F.setProperty('parameters',{29,{[25 30 34 38]}});S = S.processData(F,2030);
  241. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,2021);
  242. F = F.setProperty('parameters',{31,{[26 27 30 32]}});S = S.processData(F,2029);
  243. F = F.setProperty('parameters',{36,{[32 37 41 40]}});S = S.processData(F,2029);
  244. F = F.setProperty('parameters',{45,{[40 41 46]}});S = S.processData(F,2029);
  245. F = F.setProperty('parameters',{29,{[38 34 25]}});S = S.processData(F,2032);
  246. F = F.setProperty('parameters',{21,{[18 16 19]}});S = S.processData(F,2033);
  247. F = F.setProperty('parameters',{23,{[20 18]}});S = S.processData(F,2033);
  248. F = F.setProperty('parameters',{24,{[22 19]}});S = S.processData(F,2033);
  249. F = F.setProperty('parameters',{29,{[38 34 ]}});S = S.processData(F,2034);
  250. F = F.setProperty('parameters',{31,{[30 26 27 32]}});S = S.processData(F,2034);
  251. F = F.setProperty('parameters',{35,{[30 34 39]}});S = S.processData(F,2034);
  252. F = F.setProperty('parameters',{36,{[27 32 41 45]}});S = S.processData(F,2034);
  253. F = F.setProperty('parameters',{40,{[39 44 45 41]}});S = S.processData(F,2034);
  254. F = F.setProperty('parameters',{42,{[46 41 37 33]}});S = S.processData(F,2034);
  255. % ctrl2
  256. F = NirsDataFunctor(); % clears output
  257. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  258. F = F.setProperty('input_names',{'CTL2.Oxy','CTL2.Deoxy'});
  259. F = F.setProperty('parameters',{8,{[3 6 9]}});S = S.processData(F,1006);
  260. F = F.setProperty('parameters',{11,{[6 9 12]}});S = S.processData(F,1006);
  261. F = F.setProperty('parameters',{30,{[25 26 35]}});S = S.processData(F,1008);
  262. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1008);
  263. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1008);
  264. F = F.setProperty('parameters',{34,{[29 38 39]}});S = S.processData(F,1008);
  265. F = F.setProperty('parameters',{25,{[26 29]}});S = S.processData(F,1015);
  266. F = F.setProperty('parameters',{30,{[26 34 35]}});S = S.processData(F,1015);
  267. F = F.setProperty('parameters',{33,{[28 37 42]}});S = S.processData(F,1015);
  268. F = F.setProperty('parameters',{45,{[40 41 44 46]}});S = S.processData(F,1015);
  269. F = F.setProperty('parameters',{29,{[25 34 38]}});S = S.processData(F,1016);
  270. F = F.setProperty('parameters',{37,{[32 33 41 42]}});S = S.processData(F,1016);
  271. F = F.setProperty('parameters',{45,{[40 41 44 46]}});S = S.processData(F,1018);
  272. F = F.setProperty('parameters',{28,{[27 32 37]}});S = S.processData(F,1024);
  273. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1024);
  274. F = F.setProperty('parameters',{33,{[32 37 42]}});S = S.processData(F,1024);
  275. F = F.setProperty('parameters',{46,{[41 42 45]}});S = S.processData(F,1024);
  276. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1025);
  277. F = F.setProperty('parameters',{10,{[5 7 9]}});S = S.processData(F,1029);
  278. F = F.setProperty('parameters',{12,{[7 9 11]}});S = S.processData(F,1029);
  279. F = F.setProperty('parameters',{44,{[39 40 43 45]}});S = S.processData(F,1034);
  280. F = F.setProperty('parameters',{39,{[34 35 44]}});S = S.processData(F,1048);
  281. F = F.setProperty('parameters',{43,{[34 38 44]}});S = S.processData(F,1048);
  282. F = F.setProperty('parameters',{26,{[25 27 35]}});S = S.processData(F,1051);
  283. F = F.setProperty('parameters',{30,{[25 34 35]}});S = S.processData(F,1051);
  284. F = F.setProperty('parameters',{31,{[27 35 36]}});S = S.processData(F,1051);
  285. F = F.setProperty('parameters',{32,{[27 28 36]}});S = S.processData(F,1051);
  286. F = F.setProperty('parameters',{37,{[33 41 42]}});S = S.processData(F,1051);
  287. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1054);
  288. F = F.setProperty('parameters',{30,{[25 26 29 31 34]}});S = S.processData(F,1102);
  289. F = F.setProperty('parameters',{35,{[26 31 40 44]}});S = S.processData(F,1102);
  290. F = F.setProperty('parameters',{39,{[38 34 35 40 43 44]}});S = S.processData(F,1102);
  291. F = F.setProperty('parameters',{45,{[40 36 41]}});S = S.processData(F,1102);
  292. F = F.setProperty('parameters',{2,{[4 7]}});S = S.processData(F,1104);
  293. F = F.setProperty('parameters',{5,{[4 7]}});S = S.processData(F,1104);
  294. F = F.setProperty('parameters',{3,{[1 2 6 7]}});S = S.processData(F,1108);
  295. F = F.setProperty('parameters',{22,{[24 21 19]}});S = S.processData(F,1109);
  296. F = F.setProperty('parameters',{29,{[25 34]}});S = S.processData(F,1109);
  297. F = F.setProperty('parameters',{30,{[25 26 31 34 35]}});S = S.processData(F,1109);
  298. F = F.setProperty('parameters',{32,{[27 28 31 36]}});S = S.processData(F,1109);
  299. F = F.setProperty('parameters',{33,{[28 42]}});S = S.processData(F,1109);
  300. F = F.setProperty('parameters',{37,{[36 41 42]}});S = S.processData(F,1109);
  301. F = F.setProperty('parameters',{46,{[41 42 45]}});S = S.processData(F,1109);
  302. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1111);
  303. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1112);
  304. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1120);
  305. F = F.setProperty('parameters',{40,{[35 36 39 41 44 45]}});S = S.processData(F,1120);
  306. F = F.setProperty('parameters',{11,{[6 8 9 12]}});S = S.processData(F,1121);
  307. F = F.setProperty('parameters',{6,{[4 9 1 11 3 8]}});S = S.processData(F,1122);
  308. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1122);
  309. F = F.setProperty('parameters',{41,{[36 37 40 42 45 46]}});S = S.processData(F,1122);
  310. F = F.setProperty('parameters',{28,{[27 33 37]}});S = S.processData(F,1124);
  311. F = F.setProperty('parameters',{32,{[27 31 33 36 37]}});S = S.processData(F,1124);
  312. F = F.setProperty('parameters',{36,{[27 31 32 40 41 45]}});S = S.processData(F,1135);
  313. F = F.setProperty('parameters',{32,{[27 28 31 33 37]}});S = S.processData(F,1140);
  314. F = F.setProperty('parameters',{36,{[27 31 41 45]}});S = S.processData(F,1140);
  315. F = F.setProperty('parameters',{40,{[35 39 41 44 45]}});S = S.processData(F,1140);
  316. F = F.setProperty('parameters',{15,{[13 16]}});S = S.processData(F,1143);
  317. F = F.setProperty('parameters',{18,{[13 16 21]}});S = S.processData(F,1143);
  318. F = F.setProperty('parameters',{20,{[24 21 13]}});S = S.processData(F,1143);
  319. F = F.setProperty('parameters',{22,{[21 24 19]}});S = S.processData(F,1143);
  320. F = F.setProperty('parameters',{23,{[21 24]}});S = S.processData(F,1143);
  321. F = F.setProperty('parameters',{38,{[34 39 43]}});S = S.processData(F,1143);
  322. F = F.setProperty('parameters',{13,{[15 18]}});S = S.processData(F,2011);
  323. F = F.setProperty('parameters',{14,{[17 19]}});S = S.processData(F,2011);
  324. F = F.setProperty('parameters',{16,{[18 19 ]}});S = S.processData(F,2011);
  325. F = F.setProperty('parameters',{37,{[36 41 32 33 42]}});S = S.processData(F,2013);
  326. F = F.setProperty('parameters',{8,{[3 6 9]}});S = S.processData(F,2017);
  327. F = F.setProperty('parameters',{11,{[9 12]}});S = S.processData(F,2017);
  328. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,2021);
  329. F = F.setProperty('parameters',{30,{[35 34 25 26]}});S = S.processData(F,2024);
  330. F = F.setProperty('parameters',{29,{[25 30 34 38]}});S = S.processData(F,2030);
  331. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,2021);
  332. F = F.setProperty('parameters',{4,{[1 3 2 5]}});S = S.processData(F,2029);
  333. F = F.setProperty('parameters',{6,{[1 3 8 11]}});S = S.processData(F,2029);
  334. F = F.setProperty('parameters',{7,{[2 5 10 12]}});S = S.processData(F,2029);
  335. F = F.setProperty('parameters',{9,{[8 11 12 10]}});S = S.processData(F,2029);
  336. F = F.setProperty('parameters',{31,{[26 27 30 32]}});S = S.processData(F,2029);
  337. F = F.setProperty('parameters',{39,{[38 34 35 40]}});S = S.processData(F,2029);
  338. F = F.setProperty('parameters',{43,{[38 34]}});S = S.processData(F,2029);
  339. F = F.setProperty('parameters',{44,{[35 40]}});S = S.processData(F,2029);
  340. F = F.setProperty('parameters',{45,{[40 41 46]}});S = S.processData(F,2029);
  341. F = F.setProperty('parameters',{29,{[38 34 25]}});S = S.processData(F,2032);
  342. F = F.setProperty('parameters',{21,{[18 16 19]}});S = S.processData(F,2033);
  343. F = F.setProperty('parameters',{23,{[20 18]}});S = S.processData(F,2033);
  344. F = F.setProperty('parameters',{24,{[22 19]}});S = S.processData(F,2033);
  345. F = F.setProperty('parameters',{29,{[38 34 ]}});S = S.processData(F,2034);
  346. F = F.setProperty('parameters',{31,{[30 26 27 32]}});S = S.processData(F,2034);
  347. F = F.setProperty('parameters',{35,{[30 34 39]}});S = S.processData(F,2034);
  348. F = F.setProperty('parameters',{36,{[27 32 41 45]}});S = S.processData(F,2034);
  349. F = F.setProperty('parameters',{40,{[39 44 45 41]}});S = S.processData(F,2034);
  350. F = F.setProperty('parameters',{42,{[46 41 37 33]}});S = S.processData(F,2034);
  351. % arith
  352. F = NirsDataFunctor(); % clears output
  353. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  354. F = F.setProperty('input_names',{'Arith.Oxy','Arith.Deoxy'});
  355. F = F.setProperty('parameters',{30,{[25 26 35]}});S = S.processData(F,1008);
  356. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1008);
  357. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1008);
  358. F = F.setProperty('parameters',{34,{[29 38 39]}});S = S.processData(F,1008);
  359. F = F.setProperty('parameters',{39,{[34 35 38 40]}});S = S.processData(F,1013);
  360. F = F.setProperty('parameters',{43,{[34 38]}});S = S.processData(F,1013);
  361. F = F.setProperty('parameters',{44,{[35 40 45]}});S = S.processData(F,1013);
  362. F = F.setProperty('parameters',{34,{[29 30 39]}});S = S.processData(F,1014);
  363. F = F.setProperty('parameters',{37,{[32 33 41 42]}});S = S.processData(F,1014);
  364. F = F.setProperty('parameters',{38,{[29 43]}});S = S.processData(F,1014);
  365. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1015);
  366. F = F.setProperty('parameters',{29,{[25 34 38]}});S = S.processData(F,1016);
  367. F = F.setProperty('parameters',{45,{[40 41 44 46]}});S = S.processData(F,1018);
  368. F = F.setProperty('parameters',{1,{[2 3 4]}});S = S.processData(F,1029);
  369. F = F.setProperty('parameters',{12,{[9 10 11]}});S = S.processData(F,1029);
  370. F = F.setProperty('parameters',{44,{[39 40 43 45]}});S = S.processData(F,1034);
  371. F = F.setProperty('parameters',{26,{[25 27 35]}});S = S.processData(F,1051);
  372. F = F.setProperty('parameters',{30,{[25 34 35]}});S = S.processData(F,1051);
  373. F = F.setProperty('parameters',{31,{[27 35 36]}});S = S.processData(F,1051);
  374. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1051);
  375. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1054);
  376. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1102);
  377. F = F.setProperty('parameters',{2,{[1 4]}});S = S.processData(F,1104);
  378. F = F.setProperty('parameters',{5,{[4 10]}});S = S.processData(F,1104);
  379. F = F.setProperty('parameters',{7,{[4 9 10 12]}});S = S.processData(F,1104);
  380. F = F.setProperty('parameters',{22,{[19 21 24]}});S = S.processData(F,1109);
  381. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1109);
  382. F = F.setProperty('parameters',{32,{[27 28 31 33 36]}});S = S.processData(F,1109);
  383. F = F.setProperty('parameters',{37,{[33 36 41 42 46]}});S = S.processData(F,1109);
  384. F = F.setProperty('parameters',{39,{[34 35 38 40 43 44]}});S = S.processData(F,1109);
  385. F = F.setProperty('parameters',{40,{[35 36 39 41 44 45]}});S = S.processData(F,1120);
  386. F = F.setProperty('parameters',{11,{[6 8 9]}});S = S.processData(F,1121);
  387. F = F.setProperty('parameters',{12,{[7 9 10]}});S = S.processData(F,1121);
  388. F = F.setProperty('parameters',{4,{[1 2 3 5 7]}});S = S.processData(F,1122);
  389. F = F.setProperty('parameters',{6,{[1 3 8 9 11]}});S = S.processData(F,1122);
  390. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1122);
  391. F = F.setProperty('parameters',{32,{[27 28 31 33]}});S = S.processData(F,1122);
  392. F = F.setProperty('parameters',{36,{[31 40 45]}});S = S.processData(F,1122);
  393. F = F.setProperty('parameters',{37,{[33 42 46]}});S = S.processData(F,1122);
  394. F = F.setProperty('parameters',{41,{[40 42 45 46]}});S = S.processData(F,1122);
  395. F = F.setProperty('parameters',{28,{[27 33 37]}});S = S.processData(F,1124);
  396. F = F.setProperty('parameters',{32,{[27 31 33 36 37]}});S = S.processData(F,1124);
  397. F = F.setProperty('parameters',{15,{[13 16]}});S = S.processData(F,1130);
  398. F = F.setProperty('parameters',{18,{[13 16 21 23]}});S = S.processData(F,1130);
  399. F = F.setProperty('parameters',{20,{[21 23]}});S = S.processData(F,1130);
  400. F = F.setProperty('parameters',{26,{[25 30 35]}});S = S.processData(F,1131);
  401. F = F.setProperty('parameters',{27,{[28 36]}});S = S.processData(F,1131);
  402. F = F.setProperty('parameters',{31,{[30 35 36]}});S = S.processData(F,1131);
  403. F = F.setProperty('parameters',{32,{[28 33 36]}});S = S.processData(F,1131);
  404. F = F.setProperty('parameters',{37,{[33 36 42 46]}});S = S.processData(F,1131);
  405. F = F.setProperty('parameters',{41,{[36 40 42 45 46]}});S = S.processData(F,1131);
  406. F = F.setProperty('parameters',{20,{[15 18 21 23]}});S = S.processData(F,1137);
  407. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,1140);
  408. F = F.setProperty('parameters',{29,{[25 30 34 38]}});S = S.processData(F,1143);
  409. F = F.setProperty('parameters',{4,{[2 1]}});S = S.processData(F,2002);
  410. F = F.setProperty('parameters',{6,{[3 8]}});S = S.processData(F,2002);
  411. F = F.setProperty('parameters',{7,{[2 5 10 12]}});S = S.processData(F,2002);
  412. F = F.setProperty('parameters',{9,{[8 11 12 10]}});S = S.processData(F,2002);
  413. F = F.setProperty('parameters',{14,{[17 16 13]}});S = S.processData(F,2011);
  414. F = F.setProperty('parameters',{8,{[3 6 9]}});S = S.processData(F,2017);
  415. F = F.setProperty('parameters',{11,{[9 12]}});S = S.processData(F,2017);
  416. F = F.setProperty('parameters',{25,{[30 26]}});S = S.processData(F,2017);
  417. F = F.setProperty('parameters',{29,{[38 34 30]}});S = S.processData(F,2017);
  418. F = F.setProperty('parameters',{30,{[35 34 25 26]}});S = S.processData(F,2024);
  419. F = F.setProperty('parameters',{20,{[21 18 15 23]}});S = S.processData(F,2026);
  420. F = F.setProperty('parameters',{29,{[25 30 34 38]}});S = S.processData(F,2030);
  421. F = F.setProperty('parameters',{4,{[1 6 2 7]}});S = S.processData(F,2029);
  422. F = F.setProperty('parameters',{5,{[2 7 4 10]}});S = S.processData(F,2029);
  423. F = F.setProperty('parameters',{45,{[44 40 41 46]}});S = S.processData(F,2029);
  424. F = F.setProperty('parameters',{29,{[38 34 25]}});S = S.processData(F,2032);
  425. F = F.setProperty('parameters',{25,{[26 30]}});S = S.processData(F,2034);
  426. F = F.setProperty('parameters',{29,{[38 34 ]}});S = S.processData(F,2034);
  427. F = F.setProperty('parameters',{31,{[30 26 27 32]}});S = S.processData(F,2034);
  428. F = F.setProperty('parameters',{35,{[30 34 39]}});S = S.processData(F,2034);
  429. F = F.setProperty('parameters',{36,{[27 32 41 45]}});S = S.processData(F,2034);
  430. F = F.setProperty('parameters',{40,{[39 44 45 41]}});S = S.processData(F,2034);
  431. F = F.setProperty('parameters',{42,{[46 41 37 33]}});S = S.processData(F,2034);
  432. %% corrections
  433. %T DDR
  434. S = S.processData(NirsDataFunctor('function_handle',@(X) TDDR(X,10),'input_names',{'CTL1.Oxy','CTL1.Deoxy','CTL2.Oxy','CTL2.Deoxy','Arith.Oxy','Arith.Deoxy'}));
  435. % Bandpass
  436. F = NirsDataFunctor('function_handle',@bandpass,...
  437. 'parameters',{[0.01 0.1],10,'new'},...
  438. 'input_names', {'CTL1.Oxy','CTL1.Deoxy','CTL2.Oxy','CTL2.Deoxy','Arith.Oxy','Arith.Deoxy'});
  439. S = S.processData(F);
  440. % Correlation Based Signal Improvement (CBSI)
  441. F = NirsDataFunctor();
  442. F = F.setProperty('function_handle',@NAfilt.correlationBasedSignalImprovement);
  443. F = F.setProperty('input_names', {'CTL1.Oxy','CTL2.Oxy','Arith.Oxy';...
  444. 'CTL1.Deoxy','CTL2.Deoxy','Arith.Deoxy'});
  445. F = F.setProperty('output_names',{'CTL1.cui','CTL2.cui','Arith.cui'});
  446. S = S.processData(F);
  447. %% OXY conditions
  448. Subject=S.tags(1)
  449. Bedingungen={'CTL1.cui';'CTL2.cui';'Arith.cui'}
  450. Bedingungen2={'CTL1cui';'CTL2cui';'Arithcui'}
  451. %% DEOXY conditions
  452. Subject=S.tags(1)
  453. Bedingungen={'CTL1.Deoxy';'CTL2.Deoxy';'Arith.Deoxy'}
  454. Bedingungen2={'CTL1deoxy';'CTL2deoxy';'Arithdeoxy'}
  455. %% find NaNs (in case they are created by CBSI)
  456. clear NaNOut
  457. for x=1:size(Bedingungen,1)
  458. clear dCui DataRS DataVar Out
  459. Subject=S.tags(1);
  460. for k=1:length(Subject)
  461. dCui = S.getSubjectData(Subject{k},Bedingungen{x});
  462. DataRS{k,1}(:,:)=dCui(:,:);
  463. end
  464. clear dCui
  465. for k=1:length(Subject)
  466. for i=1:size(DataRS{k,1}(:,:),2)
  467. DataVar(k,i) = var(DataRS{k,1}(:,i));
  468. end
  469. end
  470. for k=1:size(DataVar,1)
  471. for i=1:size(DataVar,2)
  472. if isnan(DataVar(k,i))==1
  473. Out(k,i)=1;
  474. else
  475. Out(k,i)=0;
  476. end
  477. end
  478. end
  479. NaNOut.(Bedingungen2{x}).percent=mean(Out,2)*100;
  480. for k=1:size(Out,1)
  481. a=Out(k,:)'
  482. NaNOut.(Bedingungen2{x}).Channel{k,1}(:)=find(a);
  483. sid=Subject{k};
  484. NaNOut.(Bedingungen2{x}).Channel{k,2}(:)=sid;
  485. clear a sid
  486. end
  487. end
  488. %% NaN Interpolieren (nochmal)
  489. % hier weichen die VPN ab von ERT Skript
  490. % Vorlage:
  491. % F = NirsDataFunctor(); % macht den output wieder leer
  492. % F = F.setProperty('parameters',{*Channel*,{[* * * *]}});S = S.processData(F,*ID*);
  493. % control task 1
  494. F = NirsDataFunctor(); % macht den output wieder leer
  495. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  496. F = F.setProperty('input_names',{'CTL1.cui','CTL1.Deoxy'});
  497. F = F.setProperty('parameters',{11,{[8 9 12]}});S = S.processData(F,1050);
  498. F = F.setProperty('parameters',{1,{[3 4 6]}});S = S.processData(F,1118);
  499. F = F.setProperty('parameters',{20,{[18 15 ]}});S = S.processData(F,2029);
  500. F = F.setProperty('parameters',{23,{[24 21]}});S = S.processData(F,2029);
  501. % control task 2
  502. F = NirsDataFunctor(); % macht den output wieder leer
  503. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  504. F = F.setProperty('input_names',{'CTL2.cui', 'CTL2.Deoxy'});
  505. F = F.setProperty('parameters',{28,{[27 32 37]}});S = S.processData(F,1009);
  506. F = F.setProperty('parameters',{33,{[32 37 42]}});S = S.processData(F,1009);
  507. F = F.setProperty('parameters',{11,{[8 9 12]}});S = S.processData(F,1050);
  508. F = F.setProperty('parameters',{3,{[1 4 6]}});S = S.processData(F,1108);
  509. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,1109);
  510. F = F.setProperty('parameters',{1,{[2 3 6]}});S = S.processData(F,1118);
  511. F = F.setProperty('parameters',{4,{[2 3 6 7]}});S = S.processData(F,1118);
  512. F = F.setProperty('parameters',{16,{[13 14 15 17 18 19]}});S = S.processData(F,1120);
  513. F = F.setProperty('parameters',{23,{[18 20 21]}});S = S.processData(F,1123);
  514. F = F.setProperty('parameters',{14,{[13 16 19]}});S = S.processData(F,1130);
  515. F = F.setProperty('parameters',{17,{[16 19 22]}});S = S.processData(F,1130);
  516. F = F.setProperty('parameters',{21,{[18 19]}});S = S.processData(F,2029);
  517. F = F.setProperty('parameters',{23,{[24 20]}});S = S.processData(F,2029);
  518. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,2053);
  519. % arith
  520. F = NirsDataFunctor(); % macht den output wieder leer
  521. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  522. F = F.setProperty('input_names',{'Arith.cui', 'Arith.Deoxy'});
  523. F = F.setProperty('parameters',{11,{[8 9 12]}});S = S.processData(F,1050);
  524. F = F.setProperty('parameters',{1,{[2 4 6]}});S = S.processData(F,1108);
  525. F = F.setProperty('parameters',{3,{[4 6 8]}});S = S.processData(F,1108);
  526. F = F.setProperty('parameters',{14,{[16 17 19]}});S = S.processData(F,1112);
  527. F = F.setProperty('parameters',{1,{[2 3 6]}});S = S.processData(F,1118);
  528. F = F.setProperty('parameters',{4,{[2 3 6 7]}});S = S.processData(F,1118);
  529. F = F.setProperty('parameters',{30,{[25 26 29 31 34]}});S = S.processData(F,1118);
  530. F = F.setProperty('parameters',{35,{[31 39 40]}});S = S.processData(F,1118);
  531. F = F.setProperty('parameters',{16,{[13 14 18 19]}});S = S.processData(F,1120);
  532. F = F.setProperty('parameters',{13,{[14 15]}});S = S.processData(F,1123);
  533. F = F.setProperty('parameters',{15,{[13 16 18]}});S = S.processData(F,1143);
  534. F = F.setProperty('parameters',{20,{[18 21 23]}});S = S.processData(F,1143);
  535. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,2001);
  536. %% define ROIs
  537. lIFG=[7 9 6]
  538. lDLPFC=[10 12 11]
  539. rIFG=[18 21 19]
  540. rDLPFC=[20 23 24]
  541. SAC=[27 26 25 28 30 31 32 35 36]
  542. close all
  543. %% Plot ROI channels for visual inspection for each subjects: control task 1
  544. close all
  545. s = Subject{2};
  546. P = P.plotChannels(S,s,[rIFG,lIFG,rDLPFC,lDLPFC,SAC],{'CTL1.Deoxy'},{'b'},{'-'});
  547. P = P.showTrigger(S,s,'CTL1.Deoxy',4);
  548. %% Plot ROI channels for visual inspection for each subjects: control task 2
  549. close all
  550. s = Subject{97};
  551. P = P.plotChannels(S,s,[rIFG,lIFG,rDLPFC,lDLPFC,SAC],{'CTL2.cui'},{'b'},{'-'});
  552. P = P.showTrigger(S,s,'CTL2.cui',4);
  553. %% Plot ROI channels for visual inspection for each subjects: artihmetic task of the TSST
  554. close all
  555. s = Subject{97};
  556. P = P.plotChannels(S,s,[rIFG,lIFG,rDLPFC,lDLPFC,SAC],{'Arith.cui'},{'b'},{'-'});
  557. P = P.showTrigger(S,s,'Arith.cui',4);
  558. %% show Brodman areas
  559. % showBrodmann([5 7 9 19 44 45 46 47],'show_legend',true,'color_map',lines,'channel_style','ids', 'probeset',[PS]);
  560. %% create new triggers 9 for window 2 and window 1 export
  561. cd('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Matlab Code und Workspaces\EigeneFunktionen')
  562. fs = 10; % sampling frequency in Hz
  563. marker = 1; % trigger before new trigger should be created
  564. newTrigger = 9; % new trigger
  565. for i = 1:size(Subject, 1)
  566. trigger_CTL1 = S.getSubjectData(Subject{i}, 'CTL1.trigger');
  567. trigger_CTL2 = S.getSubjectData(Subject{i}, 'CTL2.trigger');
  568. trigger_Stress = S.getSubjectData(Subject{i}, 'Stress.trigger');
  569. trigger_CTL1 = NewTrigger_Isa(trigger_CTL1, marker, newTrigger, fs);
  570. trigger_CTL2 = NewTrigger_Isa(trigger_CTL2, marker, newTrigger, fs);
  571. trigger_Stress = NewTrigger_Isa(trigger_Stress, marker, newTrigger, fs);
  572. S = S.addSubjectData(Subject{i}, 'CTL1.trigger', trigger_CTL1);
  573. S = S.addSubjectData(Subject{i}, 'CTL2.trigger', trigger_CTL2);
  574. S = S.addSubjectData(Subject{i}, 'Stress.trigger', trigger_Stress);
  575. fprintf('Subject %d: New trigger created for CTL1: %d, CTL2: %d, Stress: %d\n', ...
  576. Subject{i}, sum(trigger_CTL1==newTrigger), sum(trigger_CTL2==newTrigger), sum(trigger_Stress==newTrigger));
  577. end
  578. %% check how many triggers there are for each subject and condition
  579. tasks = {'CTL1','CTL2','Stress'};
  580. for t = 1:numel(tasks)
  581. taskName = tasks{t};
  582. trigger_new = S.getSubjectData(Subject{1}, [taskName '.trigger']);
  583. uniqueTriggers = unique(trigger_new(trigger_new~=0));
  584. fprintf('%s neue Triggerwerte: ', taskName);
  585. fprintf('%d ', uniqueTriggers);
  586. fprintf('\n');
  587. end
  588. %% check whether new trigger 9 is actrually 15 s before trigger 1
  589. fs = 10; % sampling frequency in Hz
  590. for i = 1:size(Subject,1)
  591. tasks = {'CTL1','CTL2','Stress'};
  592. for t = 1:numel(tasks)
  593. test = S.getSubjectData(Subject{i}, [tasks{t} '.trigger']);
  594. trigger_idx = find(test);
  595. TriggerDaten.trigger{t,i} = test(trigger_idx);
  596. TriggerDaten.AnzahlTrigger{t,i} = numel(trigger_idx); % number of triggers
  597. TriggerDaten.Zeitpunkt{t,i} = trigger_idx / fs; % time point in seconds
  598. end
  599. end
  600. %% delete all trigger "4" = endtrigger of the trials
  601. cd('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Matlab Code und Workspaces\EigeneFunktionen')
  602. deleteTrigger = 4; % trigger to be deleted
  603. for i = 1:size(Subject, 1)
  604. trigger_CTL1 = S.getSubjectData(Subject{i}, 'CTL1.trigger');
  605. trigger_CTL2 = S.getSubjectData(Subject{i}, 'CTL2.trigger');
  606. trigger_Stress = S.getSubjectData(Subject{i}, 'Stress.trigger');
  607. trigger_CTL1(trigger_CTL1 == deleteTrigger) = 0;
  608. trigger_CTL2(trigger_CTL2 == deleteTrigger) = 0;
  609. trigger_Stress(trigger_Stress == deleteTrigger) = 0;
  610. S = S.addSubjectData(Subject{i}, 'CTL1.trigger', trigger_CTL1);
  611. S = S.addSubjectData(Subject{i}, 'CTL2.trigger', trigger_CTL2);
  612. S = S.addSubjectData(Subject{i}, 'Stress.trigger', trigger_Stress);
  613. fprintf('Subject %d: Number of trigger 4 → CTL1: %d, CTL2: %d, Stress: %d\n', ...
  614. Subject{i}, ...
  615. sum(trigger_CTL1 == deleteTrigger), ...
  616. sum(trigger_CTL2 == deleteTrigger), ...
  617. sum(trigger_Stress == deleteTrigger));
  618. end
  619. %% delete all trigger "1" = trigger indicating the beginning of each trial
  620. cd('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Matlab Code und Workspaces\EigeneFunktionen')
  621. deleteTrigger = 1; % trigger to be deleted
  622. for i = 1:size(Subject, 1)
  623. trigger_CTL1 = S.getSubjectData(Subject{i}, 'CTL1.trigger');
  624. trigger_CTL2 = S.getSubjectData(Subject{i}, 'CTL2.trigger');
  625. trigger_Stress = S.getSubjectData(Subject{i}, 'Stress.trigger');
  626. trigger_CTL1(trigger_CTL1 == deleteTrigger) = 0;
  627. trigger_CTL2(trigger_CTL2 == deleteTrigger) = 0;
  628. trigger_Stress(trigger_Stress == deleteTrigger) = 0;
  629. S = S.addSubjectData(Subject{i}, 'CTL1.trigger', trigger_CTL1);
  630. S = S.addSubjectData(Subject{i}, 'CTL2.trigger', trigger_CTL2);
  631. S = S.addSubjectData(Subject{i}, 'Stress.trigger', trigger_Stress);
  632. fprintf('Subject %d: Number of trigger 1 → CTL1: %d, CTL2: %d, Stress: %d\n', ...
  633. Subject{i}, ...
  634. sum(trigger_CTL1 == deleteTrigger), ...
  635. sum(trigger_CTL2 == deleteTrigger), ...
  636. sum(trigger_Stress == deleteTrigger));
  637. end
  638. %% interpolation of single channels identified by visual inspection
  639. % ctrl1
  640. F = NirsDataFunctor(); % clear output
  641. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  642. F = F.setProperty('input_names',{'CTL1.cui', 'CTL1.Deoxy'});
  643. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1002);
  644. F = F.setProperty('parameters',{21,{[18 19 23 24]}});S = S.processData(F,1002);
  645. F = F.setProperty('parameters',{6,{[3 4 9]}});S = S.processData(F,1003);
  646. F = F.setProperty('parameters',{8,{[3 11]}});S = S.processData(F,1003);
  647. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1005);
  648. F = F.setProperty('parameters',{10,{[5 7 12]}});S = S.processData(F,1006);
  649. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1006);
  650. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1007);
  651. F = F.setProperty('parameters',{26,{[25 30 31]}});S = S.processData(F,1008);
  652. F = F.setProperty('parameters',{27,{[28 31 32]}});S = S.processData(F,1008);
  653. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1011);
  654. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1013);
  655. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1014);
  656. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1014);
  657. F = F.setProperty('parameters',{26,{[25 27 30 31]}});S = S.processData(F,1015);
  658. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1016);
  659. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1016);
  660. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1016);
  661. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1017);
  662. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1017);
  663. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1017);
  664. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1018);
  665. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1019);
  666. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1019);
  667. F = F.setProperty('parameters',{9,{[6 7 11]}});S = S.processData(F,1020);
  668. F = F.setProperty('parameters',{12,{[10 11]}});S = S.processData(F,1020);
  669. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1020);
  670. F = F.setProperty('parameters',{28,{[27 32 33]}});S = S.processData(F,1021);
  671. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1021);
  672. F = F.setProperty('parameters',{11,{[8 9 12]}});S = S.processData(F,1024);
  673. F = F.setProperty('parameters',{24,{[21 22 23]}});S = S.processData(F,1024);
  674. F = F.setProperty('parameters',{28,{[27 33 37]}});S = S.processData(F,1024);
  675. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1024);
  676. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1024);
  677. F = F.setProperty('parameters',{32,{[27 36 37]}});S = S.processData(F,1024);
  678. F = F.setProperty('parameters',{21,{[18 19 23 24]}});S = S.processData(F,1025);
  679. F = F.setProperty('parameters',{27,{[26 28 31]}});S = S.processData(F,1025);
  680. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1025);
  681. F = F.setProperty('parameters',{32,{[28 36 37]}});S = S.processData(F,1025);
  682. F = F.setProperty('parameters',{32,{[27 28 36 32]}});S = S.processData(F,1026);
  683. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1029);
  684. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1029);
  685. F = F.setProperty('parameters',{32,{[27 28 37]}});S = S.processData(F,1029);
  686. F = F.setProperty('parameters',{36,{[35 37 40 41]}});S = S.processData(F,1029);
  687. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1030);
  688. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1030);
  689. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1030);
  690. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1030);
  691. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1032);
  692. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1033);
  693. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1034);
  694. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1034);
  695. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1035);
  696. F = F.setProperty('parameters',{11,{[8 9 12]}});S = S.processData(F,1037);
  697. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1038);
  698. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1039);
  699. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1039);
  700. F = F.setProperty('parameters',{18,{[15 16 21]}});S = S.processData(F,1041);
  701. F = F.setProperty('parameters',{18,{[15 16 21]}});S = S.processData(F,1042);
  702. F = F.setProperty('parameters',{20,{[15 21 23]}});S = S.processData(F,1042);
  703. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1042);
  704. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1043);
  705. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1043);
  706. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1043);
  707. F = F.setProperty('parameters',{6,{[3 4 8]}});S = S.processData(F,1044);
  708. F = F.setProperty('parameters',{7,{[4 5 10]}});S = S.processData(F,1044);
  709. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1044);
  710. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1046);
  711. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1046);
  712. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1048);
  713. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1048);
  714. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1048);
  715. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1048);
  716. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1048);
  717. F = F.setProperty('parameters',{28,{[27 32 33]}});S = S.processData(F,1050);
  718. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1052);
  719. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1052);
  720. F = F.setProperty('parameters',{36,{[31 32 40 41]}});S = S.processData(F,1053);
  721. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1055);
  722. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1055);
  723. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1055);
  724. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1056);
  725. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1056);
  726. F = F.setProperty('parameters',{20,{[15 18 21 23]}});S = S.processData(F,1102);
  727. F = F.setProperty('parameters',{35,{[30 31 39 40]}});S = S.processData(F,1102);
  728. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1103);
  729. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1103);
  730. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1103);
  731. F = F.setProperty('parameters',{18,{[15 16 21]}});S = S.processData(F,1107);
  732. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1107);
  733. F = F.setProperty('parameters',{20,{[15 21]}});S = S.processData(F,1107);
  734. F = F.setProperty('parameters',{23,{[21 24]}});S = S.processData(F,1107);
  735. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1109);
  736. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1109);
  737. F = F.setProperty('parameters',{24,{[21 22 23]}});S = S.processData(F,1109);
  738. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1112);
  739. F = F.setProperty('parameters',{10,{[5 7 9 12]}});S = S.processData(F,1113);
  740. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1113);
  741. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1113);
  742. F = F.setProperty('parameters',{23,{[18 20 21 24]}});S = S.processData(F,1114);
  743. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1115);
  744. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1115);
  745. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1116);
  746. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1116);
  747. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1117);
  748. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1117);
  749. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1118);
  750. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1120);
  751. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1120);
  752. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1122);
  753. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1122);
  754. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1122);
  755. F = F.setProperty('parameters',{28,{[27 32 33 37]}});S = S.processData(F,1123);
  756. F = F.setProperty('parameters',{36,{[31 32 40 41]}});S = S.processData(F,1123);
  757. F = F.setProperty('parameters',{18,{[15 16 21 23]}});S = S.processData(F,1124);
  758. F = F.setProperty('parameters',{20,{[15 21 23]}});S = S.processData(F,1124);
  759. F = F.setProperty('parameters',{24,{[19 21 22 23]}});S = S.processData(F,1124);
  760. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1125);
  761. F = F.setProperty('parameters',{28,{[27 32 33 37]}});S = S.processData(F,1127);
  762. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1128);
  763. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1129);
  764. F = F.setProperty('parameters',{28,{[27 33 37]}});S = S.processData(F,1131);
  765. F = F.setProperty('parameters',{32,{[27 31 33 36 37]}});S = S.processData(F,1131);
  766. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1132);
  767. F = F.setProperty('parameters',{21,{[18 19 23 24]}});S = S.processData(F,1133);
  768. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1133);
  769. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1135);
  770. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1135);
  771. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1135);
  772. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1136);
  773. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1136);
  774. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1136);
  775. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1136);
  776. F = F.setProperty('parameters',{6,{[1 3 4 8 11]}});S = S.processData(F,1137);
  777. F = F.setProperty('parameters',{7,{[2 4 5 10 12]}});S = S.processData(F,1137);
  778. F = F.setProperty('parameters',{9,{[8 10 11 12]}});S = S.processData(F,1137);
  779. F = F.setProperty('parameters',{24,{[19 21 22 23]}});S = S.processData(F,1137);
  780. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1138);
  781. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1139);
  782. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1139);
  783. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1140);
  784. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,1140);
  785. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1141);
  786. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1141);
  787. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1142);
  788. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1142);
  789. F = F.setProperty('parameters',{20,{[15 18 21 23]}});S = S.processData(F,1143);
  790. F = F.setProperty('parameters',{23,{[19 20 21 24]}});S = S.processData(F,1143);
  791. % ctrl2
  792. F = NirsDataFunctor(); % clear output
  793. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  794. F = F.setProperty('input_names',{'CTL2.cui', 'CTL2.Deoxy'});
  795. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1001);
  796. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1001);
  797. F = F.setProperty('parameters',{23,{[20 21 24]}});S = S.processData(F,1002);
  798. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1002);
  799. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1005);
  800. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1006);
  801. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1006);
  802. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1007);
  803. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1008);
  804. F = F.setProperty('parameters',{26,{[25 30 31]}});S = S.processData(F,1008);
  805. F = F.setProperty('parameters',{27,{[28 31 32]}});S = S.processData(F,1008);
  806. F = F.setProperty('parameters',{36,{[31 32 40 41]}});S = S.processData(F,1008);
  807. F = F.setProperty('parameters',{20,{[15 18 21]}});S = S.processData(F,1009);
  808. F = F.setProperty('parameters',{23,{[18 21 24]}});S = S.processData(F,1009);
  809. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1011);
  810. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1013);
  811. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1013);
  812. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1014);
  813. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1015);
  814. F = F.setProperty('parameters',{25,{[29 30 34]}});S = S.processData(F,1015);
  815. F = F.setProperty('parameters',{26,{[27 30]}});S = S.processData(F,1015);
  816. F = F.setProperty('parameters',{31,{[27 35 36]}});S = S.processData(F,1015);
  817. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1016);
  818. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1017);
  819. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1018);
  820. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1018);
  821. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1019);
  822. F = F.setProperty('parameters',{9,{[6 7 11]}});S = S.processData(F,1020);
  823. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1020);
  824. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1020);
  825. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1021);
  826. F = F.setProperty('parameters',{28,{[27 32 33]}});S = S.processData(F,1021);
  827. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1021);
  828. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1021);
  829. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1023);
  830. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1023);
  831. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1024);
  832. F = F.setProperty('parameters',{11,{[8 9 12]}});S = S.processData(F,1024);
  833. F = F.setProperty('parameters',{24,{[21 22 23]}});S = S.processData(F,1024);
  834. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1024);
  835. F = F.setProperty('parameters',{21,{[18 19 24]}});S = S.processData(F,1025);
  836. F = F.setProperty('parameters',{23,{[18 20 24]}});S = S.processData(F,1025);
  837. F = F.setProperty('parameters',{28,{[27 32 33]}});S = S.processData(F,1025);
  838. F = F.setProperty('parameters',{27,{[26 28 31 32]}});S = S.processData(F,1028);
  839. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1029);
  840. F = F.setProperty('parameters',{31,{[26 27 35]}});S = S.processData(F,1029);
  841. F = F.setProperty('parameters',{32,{[27 28 37]}});S = S.processData(F,1029);
  842. F = F.setProperty('parameters',{36,{[35 37 40 41]}});S = S.processData(F,1029);
  843. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1031);
  844. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1032);
  845. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1033);
  846. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1034);
  847. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1034);
  848. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1035);
  849. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1035);
  850. F = F.setProperty('parameters',{31,{[26 27 40]}});S = S.processData(F,1036);
  851. F = F.setProperty('parameters',{35,{[30 39 40]}});S = S.processData(F,1036);
  852. F = F.setProperty('parameters',{36,{[32 40 41]}});S = S.processData(F,1036);
  853. F = F.setProperty('parameters',{10,{[5 7 12]}});S = S.processData(F,1037);
  854. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1037);
  855. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1037);
  856. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1039);
  857. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1039);
  858. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1041);
  859. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1042);
  860. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1042);
  861. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1042);
  862. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1043);
  863. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1043);
  864. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1044);
  865. F = F.setProperty('parameters',{28,{[27 32 33]}});S = S.processData(F,1044);
  866. F = F.setProperty('parameters',{26,{[25 27 30]}});S = S.processData(F,1046);
  867. F = F.setProperty('parameters',{31,{[27 35 36]}});S = S.processData(F,1046);
  868. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1047);
  869. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1047);
  870. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1048);
  871. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1048);
  872. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1048);
  873. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1049);
  874. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1049);
  875. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1049);
  876. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1050);
  877. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1051);
  878. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1052);
  879. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1052);
  880. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1055);
  881. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1055);
  882. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1055);
  883. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1055);
  884. F = F.setProperty('parameters',{25,{[26 29 30]}});S = S.processData(F,1055);
  885. F = F.setProperty('parameters',{18,{[15 16 20]}});S = S.processData(F,1056);
  886. F = F.setProperty('parameters',{19,{[16 17 22]}});S = S.processData(F,1056);
  887. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1101);
  888. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1102);
  889. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1102);
  890. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1103);
  891. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1104);
  892. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1104);
  893. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1107);
  894. F = F.setProperty('parameters',{28,{[27 32 33 37]}});S = S.processData(F,1107);
  895. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1109);
  896. F = F.setProperty('parameters',{24,{[19 21 22 23]}});S = S.processData(F,1109);
  897. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1111);
  898. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1111);
  899. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1113);
  900. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1113);
  901. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1117);
  902. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1117);
  903. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1118);
  904. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1119);
  905. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1119);
  906. F = F.setProperty('parameters',{35,{[30 31 39 40]}});S = S.processData(F,1119);
  907. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1120);
  908. F = F.setProperty('parameters',{35,{[30 31 39 40]}});S = S.processData(F,1120);
  909. F = F.setProperty('parameters',{12,{[7 9 10 11]}});S = S.processData(F,1121);
  910. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1122);
  911. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1122);
  912. F = F.setProperty('parameters',{10,{[5 7 9 12]}});S = S.processData(F,1123);
  913. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1123);
  914. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1124);
  915. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1125);
  916. F = F.setProperty('parameters',{28,{[27 32 33 37]}});S = S.processData(F,1127);
  917. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1128);
  918. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1129);
  919. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1129);
  920. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1130);
  921. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1130);
  922. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1130);
  923. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1130);
  924. F = F.setProperty('parameters',{11,{[6 8 9 12]}});S = S.processData(F,1131);
  925. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1132);
  926. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1133);
  927. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1135);
  928. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1135);
  929. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1136);
  930. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1136);
  931. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1136);
  932. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1136);
  933. F = F.setProperty('parameters',{7,{[2 4 5 12]}});S = S.processData(F,1137);
  934. F = F.setProperty('parameters',{9,{[6 8 11 12]}});S = S.processData(F,1137);
  935. F = F.setProperty('parameters',{10,{[5 12]}});S = S.processData(F,1137);
  936. F = F.setProperty('parameters',{20,{[15 18 21 23]}});S = S.processData(F,1137);
  937. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1138);
  938. F = F.setProperty('parameters',{25,{[26 29 30 34]}});S = S.processData(F,1139);
  939. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1140);
  940. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1140);
  941. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1141);
  942. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1141);
  943. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1141);
  944. F = F.setProperty('parameters',{32,{[13 15 16 20 21 23]}});S = S.processData(F,1141);
  945. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1142);
  946. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1142);
  947. F = F.setProperty('parameters',{6,{[1 3 4 8 11]}});S = S.processData(F,1143);
  948. F = F.setProperty('parameters',{7,{[2 4 5 12]}});S = S.processData(F,1143);
  949. F = F.setProperty('parameters',{9,{[6 8 11 12]}});S = S.processData(F,1143);
  950. F = F.setProperty('parameters',{10,{[5 12]}});S = S.processData(F,1143);
  951. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1143);
  952. % arith
  953. F = NirsDataFunctor(); % clear output
  954. F = F.setProperty('function_handle',@NAfilt.interpolateChannel);
  955. F = F.setProperty('input_names',{'Arith.cui', 'Arith.Deoxy'});
  956. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1001);
  957. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1001);
  958. F = F.setProperty('parameters',{23,{[20 21 24]}});S = S.processData(F,1002);
  959. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1004);
  960. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1004);
  961. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1005);
  962. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1006);
  963. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1006);
  964. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1007);
  965. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1007);
  966. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1008);
  967. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1008);
  968. F = F.setProperty('parameters',{36,{[31 32 40 41]}});S = S.processData(F,1008);
  969. F = F.setProperty('parameters',{10,{[5 7 12]}});S = S.processData(F,1010);
  970. F = F.setProperty('parameters',{18,{[15 16 20]}});S = S.processData(F,1011);
  971. F = F.setProperty('parameters',{21,{[19 23 24]}});S = S.processData(F,1011);
  972. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1012);
  973. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1013);
  974. F = F.setProperty('parameters',{36,{[31 32 40 41]}});S = S.processData(F,1013);
  975. F = F.setProperty('parameters',{10,{[5 7 9]}});S = S.processData(F,1014);
  976. F = F.setProperty('parameters',{12,{[7 9 11]}});S = S.processData(F,1014);
  977. F = F.setProperty('parameters',{25,{[29 30 34]}});S = S.processData(F,1015);
  978. F = F.setProperty('parameters',{26,{[27 30 31]}});S = S.processData(F,1015);
  979. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1016);
  980. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1016);
  981. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1017);
  982. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1017);
  983. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1017);
  984. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1018);
  985. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1019);
  986. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1019);
  987. F = F.setProperty('parameters',{9,{[6 7 11 12]}});S = S.processData(F,1020);
  988. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1020);
  989. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1020);
  990. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1021);
  991. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1022);
  992. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1023);
  993. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1023);
  994. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1023);
  995. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1024);
  996. F = F.setProperty('parameters',{24,{[21 22 23]}});S = S.processData(F,1024);
  997. F = F.setProperty('parameters',{28,{[27 32 33]}});S = S.processData(F,1024);
  998. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1024);
  999. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1025);
  1000. F = F.setProperty('parameters',{27,{[26 28 31 32]}});S = S.processData(F,1028);
  1001. F = F.setProperty('parameters',{32,{[27 28 37]}});S = S.processData(F,1029);
  1002. F = F.setProperty('parameters',{36,{[35 37 40 41]}});S = S.processData(F,1029);
  1003. F = F.setProperty('parameters',{18,{[15 16 20]}});S = S.processData(F,1030);
  1004. F = F.setProperty('parameters',{19,{[16 17 22]}});S = S.processData(F,1030);
  1005. F = F.setProperty('parameters',{21,{[20 22 23 24]}});S = S.processData(F,1030);
  1006. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1032);
  1007. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1033);
  1008. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1033);
  1009. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1034);
  1010. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1034);
  1011. F = F.setProperty('parameters',{10,{[5 7 12]}});S = S.processData(F,1037);
  1012. F = F.setProperty('parameters',{18,{[15 16 21]}});S = S.processData(F,1037);
  1013. F = F.setProperty('parameters',{20,{[15 21]}});S = S.processData(F,1037);
  1014. F = F.setProperty('parameters',{23,{[21 24]}});S = S.processData(F,1037);
  1015. F = F.setProperty('parameters',{10,{[5 7 12]}});S = S.processData(F,1038);
  1016. F = F.setProperty('parameters',{20,{[15 18 23]}});S = S.processData(F,1038);
  1017. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1039);
  1018. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1041);
  1019. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1041);
  1020. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1042);
  1021. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1042);
  1022. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1042);
  1023. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1043);
  1024. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1043);
  1025. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1044);
  1026. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1044);
  1027. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1044);
  1028. F = F.setProperty('parameters',{32,{[27 28 36 37]}});S = S.processData(F,1044);
  1029. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1046);
  1030. F = F.setProperty('parameters',{31,{[26 27 35 36]}});S = S.processData(F,1046);
  1031. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1048);
  1032. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1048);
  1033. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1048);
  1034. F = F.setProperty('parameters',{19,{[16 17 21 22]}});S = S.processData(F,1048);
  1035. F = F.setProperty('parameters',{30,{[25 26 34 35]}});S = S.processData(F,1048);
  1036. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1051);
  1037. F = F.setProperty('parameters',{6,{[3 4 8 9]}});S = S.processData(F,1052);
  1038. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1052);
  1039. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1055);
  1040. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1055);
  1041. F = F.setProperty('parameters',{18,{[15 16 20]}});S = S.processData(F,1056);
  1042. F = F.setProperty('parameters',{19,{[16 17 22]}});S = S.processData(F,1056);
  1043. F = F.setProperty('parameters',{21,{[20 22 23 24]}});S = S.processData(F,1056);
  1044. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1101);
  1045. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1101);
  1046. F = F.setProperty('parameters',{7,{[2 4 5 9 12]}});S = S.processData(F,1102);
  1047. F = F.setProperty('parameters',{10,{[5 9 12]}});S = S.processData(F,1102);
  1048. F = F.setProperty('parameters',{21,{[18 19 20 22 23 24]}});S = S.processData(F,1102);
  1049. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1103);
  1050. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1103);
  1051. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1104);
  1052. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1106);
  1053. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1106);
  1054. F = F.setProperty('parameters',{20,{[15 18 21 23]}});S = S.processData(F,1107);
  1055. F = F.setProperty('parameters',{30,{[25 26 29 35 36]}});S = S.processData(F,1107);
  1056. F = F.setProperty('parameters',{31,{[26 27 32 35 36]}});S = S.processData(F,1107);
  1057. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1108);
  1058. F = F.setProperty('parameters',{18,{[15 16 20 21]}});S = S.processData(F,1109);
  1059. F = F.setProperty('parameters',{30,{[25 26 29 35 36]}});S = S.processData(F,1111);
  1060. F = F.setProperty('parameters',{31,{[26 27 32 35 36]}});S = S.processData(F,1111);
  1061. F = F.setProperty('parameters',{30,{[25 26 29 35 36]}});S = S.processData(F,1112);
  1062. F = F.setProperty('parameters',{31,{[26 27 32 35 36]}});S = S.processData(F,1112);
  1063. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1113);
  1064. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1113);
  1065. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1114);
  1066. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1116);
  1067. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1119);
  1068. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1119);
  1069. F = F.setProperty('parameters',{32,{[27 28 31 33 36 37]}});S = S.processData(F,1119);
  1070. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1120);
  1071. F = F.setProperty('parameters',{9,{[6 7 8 10 11 12]}});S = S.processData(F,1122);
  1072. F = F.setProperty('parameters',{26,{[25 27 30 31]}});S = S.processData(F,1122);
  1073. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1123);
  1074. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1124);
  1075. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1125);
  1076. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1128);
  1077. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1130);
  1078. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1131);
  1079. F = F.setProperty('parameters',{36,{[31 32 35 37 40 41]}});S = S.processData(F,1131);
  1080. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1132);
  1081. F = F.setProperty('parameters',{31,{[26 27 30 32 35 36]}});S = S.processData(F,1132);
  1082. F = F.setProperty('parameters',{18,{[13 15 16 20 23]}});S = S.processData(F,1133);
  1083. F = F.setProperty('parameters',{19,{[14 16 17 22 24]}});S = S.processData(F,1133);
  1084. F = F.setProperty('parameters',{21,{[20 22 23 24]}});S = S.processData(F,1133);
  1085. F = F.setProperty('parameters',{30,{[25 26 29 31 34 35]}});S = S.processData(F,1133);
  1086. F = F.setProperty('parameters',{18,{[13 15 16 20 23]}});S = S.processData(F,1135);
  1087. F = F.setProperty('parameters',{31,{[26 27 30 32 35]}});S = S.processData(F,1135);
  1088. F = F.setProperty('parameters',{36,{[32 35 37 40 41]}});S = S.processData(F,1135);
  1089. F = F.setProperty('parameters',{7,{[4 5 9 10]}});S = S.processData(F,1136);
  1090. F = F.setProperty('parameters',{24,{[19 21 22 23]}});S = S.processData(F,1137);
  1091. F = F.setProperty('parameters',{18,{[13 15 16 20 23]}});S = S.processData(F,1140);
  1092. F = F.setProperty('parameters',{6,{[1 3 4 8 9 11]}});S = S.processData(F,1141);
  1093. F = F.setProperty('parameters',{7,{[2 4 5 9 10 12]}});S = S.processData(F,1141);
  1094. F = F.setProperty('parameters',{18,{[13 15 16 20 23]}});S = S.processData(F,1141);
  1095. F = F.setProperty('parameters',{31,{[26 27 30 35 36]}});S = S.processData(F,1141);
  1096. F = F.setProperty('parameters',{32,{[27 28 33 36 37]}});S = S.processData(F,1141);
  1097. F = F.setProperty('parameters',{18,{[13 15 16 20 21 23]}});S = S.processData(F,1142);
  1098. F = F.setProperty('parameters',{19,{[14 16 17 21 22 24]}});S = S.processData(F,1142);
  1099. F = F.setProperty('parameters',{18,{[13 15 16 20 23]}});S = S.processData(F,1143);
  1100. F = F.setProperty('parameters',{21,{[20 22 23 24]}});S = S.processData(F,1143);
  1101. %% Kernelfilter to eliminate the global component (systemic physiological artifacts): PCAGLOBAL(X, sigma)
  1102. for x=1:size(Bedingungen,1)
  1103. S = S.processData(NirsDataFunctor('function_handle',@(X) pcaglobal2(X,46,[1:46]),'input_names',{(Bedingungen{x})}));
  1104. end
  1105. Bedingungen3={'CTL1.Deoxy';'CTL2.Deoxy';'Arith.Deoxy'};
  1106. for x=1:size(Bedingungen3,1)
  1107. S = S.processData(NirsDataFunctor('function_handle',@(X) pcaglobal2(X,46,[1:46]),'input_names',{(Bedingungen3{x})}));
  1108. end
  1109. % NIRS Data Z-Transform for comparison between subjects
  1110. for x=1:size(Bedingungen,1)
  1111. S = S.processData(NirsDataFunctor('function_handle',@(X)NIRSZStandard(X),'input_names',{(Bedingungen{x})}));
  1112. end
  1113. for x=1:size(Bedingungen3,1)
  1114. S = S.processData(NirsDataFunctor('function_handle',@(X)NIRSZStandard(X),'input_names',{(Bedingungen3{x})}));
  1115. end
  1116. %% settings
  1117. clear settings P PS;
  1118. P = NirsPlotTool();
  1119. settings.experiment.time_series{1} = {'name','CTL1.cui','sample_rate',10,'trigger_name','CTL1.trigger'};
  1120. settings.experiment.time_series{2} = {'name','CTL2.cui','sample_rate',10,'trigger_name','CTL2.trigger'};
  1121. settings.experiment.time_series{3} = {'name','Arith.cui','sample_rate',10,'trigger_name','Stress.trigger'};
  1122. settings.experiment.time_series{4} = {'name','CTL1.Deoxy','sample_rate',10,'trigger_name','CTL1.trigger'};
  1123. settings.experiment.time_series{5} = {'name','CTL2.Deoxy','sample_rate',10,'trigger_name','CTL2.trigger'};
  1124. settings.experiment.time_series{6} = {'name','Arith.Deoxy','sample_rate',10,'trigger_name','Stress.trigger'};
  1125. settings.experiment.category{1} = {'name','TriggerA','trigger_token',1}; % for analysis of window 3
  1126. % settings.experiment.category{1} = {'name','TriggerA','trigger_token',9}; % for analysis of window 1 and window 2
  1127. P = P.setProperties(settings);
  1128. P = NirsPlotTool();
  1129. P = P.setProperty('show_probeset','on');
  1130. P = P.setProperties(settings);
  1131. PS = NirsProbeset('brain_coord_file','Q:\NAS\Ehlis_Auswertung\Laufwerk_S\\AG-Mitglieder\David\Studie Stress Rumination\Koords\NIRS-probesetXYZ_Alle2.txt');
  1132. settings.plot_tool.probesets{1} = {'name','Gesamt','probeset',PS};
  1133. P = P.setProperties(settings);
  1134. P = P.setProperty('probesets',{'name','Gesamt','probeset',PS});
  1135. P = P.setProperties(settings);
  1136. P = P.setProperty('show_probeset','on');
  1137. P = P.setProperties(settings);
  1138. Subject=S.tags(1)
  1139. %% data export
  1140. % EXPORT 1: 15 Sekunden vor Trigger 1 Zeitraum
  1141. % clear ERA
  1142. % settings.event_related_average.pre_time = 5; % Sekunden Baseline Correction
  1143. % settings.event_related_average.linear_detrend = 'off';
  1144. % settings.event_related_average.interval = [0 55];
  1145. % settings.event_related_average.peak_window = [5 40];
  1146. % settings.event_related_average.average_window = [0 15];
  1147. % % EXPORT 2: von Trigger 1 bis Trigger 4 Zeitraum
  1148. % clear ERA
  1149. % settings.event_related_average.pre_time = 5; % Sekunden Baseline Correction
  1150. % settings.event_related_average.linear_detrend = 'off';
  1151. % settings.event_related_average.interval = [0 55];
  1152. % settings.event_related_average.peak_window = [5 40];
  1153. % settings.event_related_average.average_window = [15 55];
  1154. % EXPORT 3: in Einstellungen wieder Trigger 1 als relevanten Trigger setzen
  1155. clear ERA
  1156. settings.event_related_average.pre_time = 5; % Sekunden Baseline Correction
  1157. settings.event_related_average.linear_detrend = 'off';
  1158. settings.event_related_average.interval = [0 55];
  1159. settings.event_related_average.peak_window = [5 40]; % 5 40
  1160. settings.event_related_average.average_window = [0 40];
  1161. ERA = NirsEventRelatedAverage();
  1162. ERA = ERA.setProperties(settings);
  1163. ERA = ERA.createEra(S);
  1164. %%
  1165. clear Data Data2
  1166. for i=1:size(Subject,1)
  1167. Data.AvgArith(:,:,i) = ERA.get({'era.avg','Arith.cui','TriggerA',Subject{i}});
  1168. Data.AmpArith(:,i) = ERA.get({'amplitudes','Arith.cui','TriggerA',Subject{i}});
  1169. Data.AvgCTL1(:,:,i) = ERA.get({'era.avg','CTL1.cui','TriggerA',Subject{i}});
  1170. Data.AmpCTL1(:,i) = ERA.get({'amplitudes','CTL1.cui','TriggerA',Subject{i}});
  1171. Data.AvgCTL2(:,:,i) = ERA.get({'era.avg','CTL2.cui','TriggerA',Subject{i}});
  1172. Data.AmpCTL2(:,i) = ERA.get({'amplitudes','CTL2.cui','TriggerA',Subject{i}});
  1173. end
  1174. dat1=Data.AmpArith'
  1175. dat2= Data.AmpCTL1'
  1176. dat3=Data.AmpCTL2'
  1177. dat=[dat1,dat2,dat3]
  1178. for i=1:size(Subject,1)
  1179. Data2.AvgArith(:,:,i) = ERA.get({'era.avg','Arith.Deoxy','TriggerA',Subject{i}});
  1180. Data2.AmpArith(:,i) = ERA.get({'amplitudes','Arith.Deoxy','TriggerA',Subject{i}});
  1181. Data2.AvgCTL1(:,:,i) = ERA.get({'era.avg','CTL1.Deoxy','TriggerA',Subject{i}});
  1182. Data2.AmpCTL1(:,i) = ERA.get({'amplitudes','CTL1.Deoxy','TriggerA',Subject{i}});
  1183. Data2.AvgCTL2(:,:,i) = ERA.get({'era.avg','CTL2.Deoxy','TriggerA',Subject{i}});
  1184. Data2.AmpCTL2(:,i) = ERA.get({'amplitudes','CTL2.Deoxy','TriggerA',Subject{i}});
  1185. end
  1186. dat1=Data2.AmpArith'
  1187. dat2= Data2.AmpCTL1'
  1188. dat3=Data2.AmpCTL2'
  1189. dat=[dat1,dat2,dat3]
  1190. clear Daten
  1191. Array(:,1)= cell2mat(Subject)
  1192. Array(:,2)=nanmean(Data2.AmpArith(lIFG,:),1) %left IFG
  1193. Array(:,3)=nanmean(Data2.AmpArith(lDLPFC,:),1) % left DLPFC
  1194. Array(:,4)=nanmean(Data2.AmpArith(rIFG,:),1) %right IFG
  1195. Array(:,5)=nanmean(Data2.AmpArith(rDLPFC,:),1) %right DLPFC
  1196. Array(:,6)=nanmean(Data2.AmpArith(SAC,:),1)
  1197. Array(:,7)=nanmean(Data2.AmpCTL1(lIFG,:),1) %left IFG
  1198. Array(:,8)=nanmean(Data2.AmpCTL1(lDLPFC,:),1) % left DLPFC
  1199. Array(:,9)=nanmean(Data2.AmpCTL1(rIFG,:),1) %right IFG
  1200. Array(:,10)=nanmean(Data2.AmpCTL1(rDLPFC,:),1) %right DLPFC
  1201. Array(:,11)=nanmean(Data2.AmpCTL1(SAC,:),1)
  1202. Array(:,12)=nanmean(Data2.AmpCTL2(lIFG,:),1) %left IFG
  1203. Array(:,13)=nanmean(Data2.AmpCTL2(lDLPFC,:),1) % left DLPFC
  1204. Array(:,14)=nanmean(Data2.AmpCTL2(rIFG,:),1) %right IFG
  1205. Array(:,15)=nanmean(Data2.AmpCTL2(rDLPFC,:),1) %right DLPFC
  1206. Array(:,16)=nanmean(Data2.AmpCTL2(SAC,:),1)
  1207. Daten = array2table(Array, 'VariableNames',{'Subject',...
  1208. 'Arith_lIFG_Deoxy', 'Arith_lDLPFC_Deoxy','Arith_rIFG_Deoxy', 'Arith_rDLPFC_Deoxy','Arith_SAC_Deoxy',...
  1209. 'CTL1_lIFG_Deoxy', 'CTL1_lDLPFC_Deoxy','CTL1_rIFG_Deoxy', 'CTL1_rDLPFC_Deoxy','CTL1_SAC_Deoxy',...
  1210. 'CTL2_lIFG_Deoxy', 'CTL2_lDLPFC_Deoxy','CTL2_rIFG_Deoxy', 'CTL2_rDLPFC_Deoxy','CTL2_SAC_Deoxy'});
  1211. % writetable(Daten,'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\2026_01_27_NIRS_TSST-Anticipation_Export1_0bis15s_deoxy.xlsx')
  1212. % writetable(Daten,'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\2026_01_27_NIRS_TSST-Anticipation_Export2_15bis55s_deoxy.xlsx')
  1213. writetable(Daten,'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\2026_04_08_NIRS_TSST-Anticipation_Export3_0bis40s_deoxy.xlsx')
  1214. %%
  1215. lIFG=[7 9 6]
  1216. lDLPFC=[10 11 12]
  1217. rIFG=[ 18 21 19]
  1218. rDLPFC=[20 23 24]
  1219. SAC=[27 26 25 28 30 31 32 35 36]
  1220. %% OXY
  1221. clear Data Data2
  1222. for i=1:size(Subject,1)
  1223. Data.AvgArith(:,:,i) = ERA.get({'era.avg','Arith.cui','TriggerA',Subject{i}});
  1224. Data.AmpArith(:,i) = ERA.get({'amplitudes','Arith.cui','TriggerA',Subject{i}});
  1225. Data.AvgCTL1(:,:,i) = ERA.get({'era.avg','CTL1.cui','TriggerA',Subject{i}});
  1226. Data.AmpCTL1(:,i) = ERA.get({'amplitudes','CTL1.cui','TriggerA',Subject{i}});
  1227. Data.AvgCTL2(:,:,i) = ERA.get({'era.avg','CTL2.cui','TriggerA',Subject{i}});
  1228. Data.AmpCTL2(:,i) = ERA.get({'amplitudes','CTL2.cui','TriggerA',Subject{i}});
  1229. end
  1230. dat1=Data.AmpArith'
  1231. dat2= Data.AmpCTL1'
  1232. dat3=Data.AmpCTL2'
  1233. dat=[dat1,dat2,dat3]
  1234. clear Daten
  1235. Array(:,1)= cell2mat(Subject)
  1236. Array(:,2)=mean(Data.AmpArith(lIFG,:),1) %left IFG
  1237. Array(:,3)=mean(Data.AmpArith(lDLPFC,:),1) % left DLPFC
  1238. Array(:,4)=mean(Data.AmpArith(rIFG,:),1) %right IFG
  1239. Array(:,5)=mean(Data.AmpArith(rDLPFC,:),1) %right DLPFC
  1240. Array(:,6)=mean(Data.AmpArith(SAC,:),1)
  1241. Array(:,7)=mean(Data.AmpCTL1(lIFG,:),1) %left IFG
  1242. Array(:,8)=mean(Data.AmpCTL1(lDLPFC,:),1) % left DLPFC
  1243. Array(:,9)=mean(Data.AmpCTL1(rIFG,:),1) %right IFG
  1244. Array(:,10)=mean(Data.AmpCTL1(rDLPFC,:),1) %right DLPFC
  1245. Array(:,11)=mean(Data.AmpCTL1(SAC,:),1)
  1246. Array(:,12)=mean(Data.AmpCTL2(lIFG,:),1) %left IFG
  1247. Array(:,13)=mean(Data.AmpCTL2(lDLPFC,:),1) % left DLPFC
  1248. Array(:,14)=mean(Data.AmpCTL2(rIFG,:),1) %right IFG
  1249. Array(:,15)=mean(Data.AmpCTL2(rDLPFC,:),1) %right DLPFC
  1250. Array(:,16)=mean(Data.AmpCTL2(SAC,:),1)
  1251. Daten = array2table(Array, 'VariableNames',{'Subject',...
  1252. 'Arith_lIFG_Cui', 'Arith_lDLPFC_Cui','Arith_rIFG_Cui', 'Arith_rDLPFC_Cui','Arith_SAC_Cui',...
  1253. 'CTL1_lIFG_Cui', 'CTL1_lDLPFC_Cui','CTL1_rIFG_Cui', 'CTL1_rDLPFC_Cui','CTL1_SAC_Cui',...
  1254. 'CTL2_lIFG_Cui', 'CTL2_lDLPFC_Cui','CTL2_rIFG_Cui', 'CTL2_rDLPFC_Cui','CTL2_SAC_Cui'});
  1255. % writetable(Daten,'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\2026_04_08_NIRS_TSST-Anticipation_Export1_0bis15s_only1trial.xlsx')
  1256. % writetable(Daten,'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\2026_04_08_NIRS_TSST-Anticipation_Export2_15bis55s_only1trial.xlsx')
  1257. writetable(Daten,'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Preprocessing_Matlab\2026_04_08_NIRS_TSST-Anticipation_Export3_0bis40s_only1trial.xlsx')
  1258. %% export for brainmaps
  1259. save 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\PlotsData_Export3_trial1.mat' Data
  1260. save 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\PlotsSubjects_Export3_trial1.mat' Subject
  1261. % %% Time series Illustration ERA: TSST
  1262. %
  1263. % YLIMITS = [-0.9 1.2];
  1264. % XLIMITS = [-25 62];
  1265. % LEG_POS = [0.05, 0.75, 0.3, 0.1];
  1266. % FONT_SZ = 14;
  1267. % LEG_FS = 12;
  1268. %
  1269. % % --- Subplot-Konfiguration (nur ein Kanal/Subplot) ---
  1270. % subplotList = {
  1271. % lIFG, ' '
  1272. % };
  1273. %
  1274. % % --- Farben für Gruppen --- hexColor1 = '#00676f'; rgbColor1 =
  1275. % % sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1276. % hexColor1 = '#9b7b00'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1277. % % hexColor1 = '#b43602'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x',
  1278. % % [1 3]) / 255;
  1279. %
  1280. % % --- Figure setup (Querformat DINA4) ---
  1281. % close all
  1282. % figure
  1283. % set(gcf,'Units','inches','Position',[1 1 11.69 8.27]) % Breite x Höhe in inches
  1284. %
  1285. % % --- Zeitachse --- t = (-199:(size(Data.AvgArith,1)-200))'/10; % 20
  1286. % % Sekunden baseline
  1287. % t = (-49:(size(Data.AvgArith,1)-50))'/10; % 5 sekunden baseline
  1288. %
  1289. % % --- Ein Subplot, volle Fläche ---
  1290. % ax = axes('Position',[0.07 0.15 0.9 0.75]); % links, unten, Breite, Höhe (normiert)
  1291. % hold(ax,'on')
  1292. %
  1293. % % --- Hintergrund-Patches ---
  1294. % trialPatch = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1295. % 'EdgeColor','none', 'DisplayName','trial');
  1296. % pausePatch = patch([40 60 60 40], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1297. % 'EdgeColor','none', 'DisplayName','pause');
  1298. %
  1299. % % --- Daten plotten ---
  1300. % chn = subplotList{1,1};
  1301. % TITLE = subplotList{1,2};
  1302. %
  1303. % % Mittelung über alle Subjects
  1304. % dat = squeeze(mean(Data.AvgArith(:,chn,:),2)); % Mittelung über Kanäle
  1305. % SEM = std(dat,0,2) ./ sqrt(size(Data.AvgArith,3)); % SEM über Subjects
  1306. % timeseries = mean(dat,2); % Mittelwert über Subjects
  1307. %
  1308. % % SEM als transparenten Patch
  1309. % xPatch = [t; flipud(t)];
  1310. % yPatch = [timeseries-SEM; flipud(timeseries+SEM)];
  1311. % hPatch = fill(xPatch, yPatch, rgbColor1, 'FaceAlpha', 0.15, 'EdgeColor', 'none', 'DisplayName','fNIRS data');
  1312. %
  1313. % % Mittelwert-Zeitreihe
  1314. % hLine = plot(t, timeseries, '.-', 'Color', rgbColor1, 'LineWidth',1.5, 'DisplayName','fNIRS data window 2');
  1315. %
  1316. % xticks(XLIMITS(1):5:XLIMITS(2))
  1317. %
  1318. % % --- Achsen, Labels, Titel ---
  1319. % ylim(YLIMITS)
  1320. % xlim(XLIMITS)
  1321. % xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1322. % ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1323. % title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1324. % set(ax, 'FontSize', 14) % z.B. 14 Punkt für Tick-Beschriftungen
  1325. %
  1326. % % --- Legende ---
  1327. % lh = legend([trialPatch pausePatch hLine], 'Location','northoutside'); % oder legend([trialPatch pausePatch hLine])
  1328. % legend boxoff
  1329. % set(lh,'FontSize',LEG_FS,'FontWeight','bold')
  1330. % set(lh,'Units','normalized','Position',LEG_POS)
  1331. % set(lh,'Color','none'); % Hintergrund
  1332. % set(lh,'EdgeColor','none'); % Rahmen
  1333. % set(lh,'Box','off'); % Kasten
  1334. %
  1335. % hold off
  1336. %
  1337. % %% nur fNIRS Zeitreihe, alles andere unsichtbar
  1338. %
  1339. % YLIMITS = [-0.9 1.2];
  1340. % XLIMITS = [-25 62];
  1341. % LEG_POS = [0.05 0.75 0.3 0.1];
  1342. % LEG_FS = 14;
  1343. %
  1344. % % --- Farbe ---
  1345. % hexColor1 = '#00676f';
  1346. % rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1347. %
  1348. % % --- Figure setup (alles gleich groß wie vorher) ---
  1349. % close all
  1350. % figure
  1351. % set(gcf,'Units','inches','Position',[1 1 11.69 8.27])
  1352. %
  1353. % % --- Zeitachse ---
  1354. % t = (-49:(size(Data.AvgArith,1)-50))'/10;
  1355. %
  1356. % % --- Achse ---
  1357. % ax = axes('Position',[0.07 0.15 0.9 0.75]);
  1358. % hold(ax,'on')
  1359. %
  1360. % % --- Daten ---
  1361. % dat = squeeze(mean(Data.AvgArith(:,lIFG,:),2));
  1362. % timeseries = mean(dat,2);
  1363. %
  1364. % % --- Zeitreihe (sichtbar im Plot) ---
  1365. % plot(t, timeseries, '.-', ...
  1366. % 'Color', rgbColor1, ...
  1367. % 'LineWidth', 1.5, ...
  1368. % 'MarkerSize', 10, ...
  1369. % 'HandleVisibility','off');
  1370. %
  1371. % % --- Proxy-Objekt NUR für Legende ---
  1372. % hLeg = plot(nan, nan, '.-', ...
  1373. % 'Color', rgbColor1, ...
  1374. % 'LineWidth', 1.5, ...
  1375. % 'MarkerSize', 16, ...
  1376. % 'DisplayName','fNIRS data');
  1377. %
  1378. % % --- Limits setzen (wirksam, aber unsichtbar) ---
  1379. % xlim(XLIMITS)
  1380. % ylim(YLIMITS)
  1381. %
  1382. % % --- ALLES ausblenden außer Linie ---
  1383. % axis off
  1384. % set(ax,'Color','none') % transparenter Hintergrund
  1385. %
  1386. % % --- Legende (nur Zeitreihe) ---
  1387. % lh = legend(hLeg);
  1388. % set(lh,'FontSize',LEG_FS,'FontWeight','bold')
  1389. % set(lh,'Units','normalized','Position',LEG_POS)
  1390. % set(lh,'Color','none','EdgeColor','none','Box','off')
  1391. %
  1392. % hold off
  1393. %
  1394. % %% Dateiname ohne Erweiterung
  1395. % filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Plots\FigureX_Illustration_window2';
  1396. %
  1397. % % Speichern als .svg
  1398. % print(gcf, filename, '-dsvg', '-r600');
  1399. %% Time series HC vs. DP all ROIs: TSST (Export 3)
  1400. clear all
  1401. clc
  1402. lIFG=[7 9 6];
  1403. lDLPFC=[10 12 11];
  1404. rIFG=[18 21 19];
  1405. rDLPFC=[20 23 24];
  1406. SAC=[27 26 25 28 30 31 32 35 36];
  1407. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Data_Export3.mat');
  1408. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Subjects_Export3.mat');
  1409. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1410. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1411. colors = get(groot,'defaultAxesColorOrder');
  1412. test = Subject;
  1413. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1414. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1415. YLIMITS = [-0.9 1.2];
  1416. XLIMITS = [-25 42];
  1417. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1418. FONT_SZ = 8;
  1419. LEG_FS = 6;
  1420. % --- Subplot-Konfiguration ---
  1421. subplotList = {
  1422. lIFG, 'left VLPFC', 1;
  1423. rIFG, 'right VLPFC', 2;
  1424. lDLPFC, 'left DLPFC', 3;
  1425. rDLPFC, 'right DLPFC', 4;
  1426. SAC, 'SAC', 5;
  1427. };
  1428. % --- Farben fuer Gruppen ---
  1429. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1430. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1431. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1432. % --- Figure setup ---
  1433. close all
  1434. figure
  1435. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1436. % --- Zeitachse ---
  1437. timeOffset = 0; % kein offset bei Export3
  1438. t = (-49:(size(Data.AvgArith,1)-50))'/10 + timeOffset;
  1439. lh = cell(size(subplotList,1),1);
  1440. % --- Loop ueber alle Subplots ---
  1441. for iPlot = 1:size(subplotList,1)
  1442. chn = subplotList{iPlot,1};
  1443. TITLE = subplotList{iPlot,2};
  1444. spID = subplotList{iPlot,3};
  1445. subplot(3,2,spID)
  1446. % --- Hintergrund-Patches ---
  1447. p1 = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1448. 'EdgeColor','none','DisplayName','trial');
  1449. hold on
  1450. p2 = patch([-5 0 0 -5], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1451. 'EdgeColor','none','DisplayName','baseline');
  1452. % --- Gruppe 1: HC ---
  1453. dat = squeeze(mean(Data.AvgArith(:,chn,Group1),2));
  1454. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1455. timeseries = mean(dat,2);
  1456. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1457. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1458. % --- Gruppe 2: DP ---
  1459. dat = squeeze(mean(Data.AvgArith(:,chn,Group2),2));
  1460. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1461. timeseries = mean(dat,2);
  1462. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1463. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1464. % --- Achsen, Labels, Titel ---
  1465. ylim(YLIMITS)
  1466. xlim(XLIMITS)
  1467. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1468. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1469. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1470. % --- Legende ---
  1471. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1472. legend boxoff
  1473. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1474. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1475. % --- weisser Hintergrund ---
  1476. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1477. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1478. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1479. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1480. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1481. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1482. hold off
  1483. end
  1484. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\SupplementaryMaterial\FigureS6.3_Timeseries_DPvsHC_Arith_window3';
  1485. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1486. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1487. %% Time series HC vs. DP all ROIs: CTL1 (Export 3)
  1488. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1489. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1490. colors = get(groot,'defaultAxesColorOrder');
  1491. test = Subject;
  1492. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1493. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1494. YLIMITS = [-0.9 1.2];
  1495. XLIMITS = [-25 42];
  1496. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1497. FONT_SZ = 8;
  1498. LEG_FS = 6;
  1499. % --- Subplot-Konfiguration ---
  1500. subplotList = {
  1501. lIFG, 'left VLPFC', 1;
  1502. rIFG, 'right VLPFC', 2;
  1503. lDLPFC, 'left DLPFC', 3;
  1504. rDLPFC, 'right DLPFC', 4;
  1505. SAC, 'SAC', 5;
  1506. };
  1507. % --- Farben fuer Gruppen ---
  1508. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1509. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1510. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1511. % --- Figure setup ---
  1512. close all
  1513. figure
  1514. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1515. % --- Zeitachse ---
  1516. timeOffset = 0; % kein offset bei Export3
  1517. t = (-49:(size(Data.AvgCTL1,1)-50))'/10 + timeOffset;
  1518. lh = cell(size(subplotList,1),1);
  1519. % --- Loop ueber alle Subplots ---
  1520. for iPlot = 1:size(subplotList,1)
  1521. chn = subplotList{iPlot,1};
  1522. TITLE = subplotList{iPlot,2};
  1523. spID = subplotList{iPlot,3};
  1524. subplot(3,2,spID)
  1525. % --- Hintergrund-Patches ---
  1526. p1 = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1527. 'EdgeColor','none','DisplayName','trial');
  1528. hold on
  1529. p2 = patch([-5 0 0 -5], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1530. 'EdgeColor','none','DisplayName','baseline');
  1531. % --- Gruppe 1: HC ---
  1532. dat = squeeze(mean(Data.AvgCTL1(:,chn,Group1),2));
  1533. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1534. timeseries = mean(dat,2);
  1535. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1536. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1537. % --- Gruppe 2: DP ---
  1538. dat = squeeze(mean(Data.AvgCTL1(:,chn,Group2),2));
  1539. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1540. timeseries = mean(dat,2);
  1541. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1542. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1543. % --- Achsen, Labels, Titel ---
  1544. ylim(YLIMITS)
  1545. xlim(XLIMITS)
  1546. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1547. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1548. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1549. % --- Legende ---
  1550. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1551. legend boxoff
  1552. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1553. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1554. % --- weisser Hintergrund ---
  1555. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1556. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1557. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1558. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1559. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1560. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1561. hold off
  1562. end
  1563. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\FigureX_Timeseries_DPvsHC_CTL1_window3';
  1564. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1565. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1566. %% Time series HC vs. DP all ROIs: CTL2 (Export 3)
  1567. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1568. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1569. colors = get(groot,'defaultAxesColorOrder');
  1570. test = Subject;
  1571. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1572. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1573. YLIMITS = [-0.9 1.2];
  1574. XLIMITS = [-25 42];
  1575. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1576. FONT_SZ = 8;
  1577. LEG_FS = 6;
  1578. % --- Subplot-Konfiguration ---
  1579. subplotList = {
  1580. lIFG, 'left VLPFC', 1;
  1581. rIFG, 'right VLPFC', 2;
  1582. lDLPFC, 'left DLPFC', 3;
  1583. rDLPFC, 'right DLPFC', 4;
  1584. SAC, 'SAC', 5;
  1585. };
  1586. % --- Farben fuer Gruppen ---
  1587. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1588. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1589. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1590. % --- Figure setup ---
  1591. close all
  1592. figure
  1593. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1594. % --- Zeitachse ---
  1595. timeOffset = 0; % kein offset bei Export3
  1596. t = (-49:(size(Data.AvgCTL2,1)-50))'/10 + timeOffset;
  1597. lh = cell(size(subplotList,1),1);
  1598. % --- Loop ueber alle Subplots ---
  1599. for iPlot = 1:size(subplotList,1)
  1600. chn = subplotList{iPlot,1};
  1601. TITLE = subplotList{iPlot,2};
  1602. spID = subplotList{iPlot,3};
  1603. subplot(3,2,spID)
  1604. % --- Hintergrund-Patches ---
  1605. p1 = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1606. 'EdgeColor','none','DisplayName','trial');
  1607. hold on
  1608. p2 = patch([-5 0 0 -5], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1609. 'EdgeColor','none','DisplayName','baseline');
  1610. % --- Gruppe 1: HC ---
  1611. dat = squeeze(mean(Data.AvgCTL2(:,chn,Group1),2));
  1612. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1613. timeseries = mean(dat,2);
  1614. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1615. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1616. % --- Gruppe 2: DP ---
  1617. dat = squeeze(mean(Data.AvgCTL2(:,chn,Group2),2));
  1618. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1619. timeseries = mean(dat,2);
  1620. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1621. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1622. % --- Achsen, Labels, Titel ---
  1623. ylim(YLIMITS)
  1624. xlim(XLIMITS)
  1625. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1626. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1627. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1628. % --- Legende ---
  1629. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1630. legend boxoff
  1631. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1632. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1633. % --- weisser Hintergrund ---
  1634. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1635. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1636. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1637. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1638. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1639. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1640. hold off
  1641. end
  1642. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\FigureX_Timeseries_DPvsHC_CTL2_window3';
  1643. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1644. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1645. %% Time series HC vs. DP all ROIs: TSST (Export 2)
  1646. clear all
  1647. clc
  1648. lIFG=[7 9 6];
  1649. lDLPFC=[10 12 11];
  1650. rIFG=[18 21 19];
  1651. rDLPFC=[20 23 24];
  1652. SAC=[27 26 25 28 30 31 32 35 36];
  1653. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Data_Export2.mat');
  1654. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Subjects_Export2.mat');
  1655. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1656. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1657. colors = get(groot,'defaultAxesColorOrder');
  1658. test = Subject;
  1659. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1660. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1661. YLIMITS = [-0.9 1.2];
  1662. XLIMITS = [-25 42];
  1663. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1664. FONT_SZ = 8;
  1665. LEG_FS = 6;
  1666. % --- Subplot-Konfiguration ---
  1667. subplotList = {
  1668. lIFG, 'left VLPFC', 1;
  1669. rIFG, 'right VLPFC', 2;
  1670. lDLPFC, 'left DLPFC', 3;
  1671. rDLPFC, 'right DLPFC', 4;
  1672. SAC, 'SAC', 5;
  1673. };
  1674. % --- Farben fuer Gruppen ---
  1675. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1676. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1677. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1678. % --- Figure setup ---
  1679. close all
  1680. figure
  1681. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1682. % --- Zeitachse ---
  1683. timeOffset = -15; % offset bei Export1 und Export2
  1684. t = (-49:(size(Data.AvgArith,1)-50))'/10 + timeOffset;
  1685. lh = cell(size(subplotList,1),1);
  1686. % --- Loop ueber alle Subplots ---
  1687. for iPlot = 1:size(subplotList,1)
  1688. chn = subplotList{iPlot,1};
  1689. TITLE = subplotList{iPlot,2};
  1690. spID = subplotList{iPlot,3};
  1691. subplot(3,2,spID)
  1692. % --- Hintergrund-Patches ---
  1693. p1 = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1694. 'EdgeColor','none','DisplayName','trial');
  1695. hold on
  1696. p2 = patch([-20 -15 -15 -20], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1697. 'EdgeColor','none','DisplayName','baseline');
  1698. % --- Gruppe 1: HC ---
  1699. dat = squeeze(mean(Data.AvgArith(:,chn,Group1),2));
  1700. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1701. timeseries = mean(dat,2);
  1702. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1703. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1704. % --- Gruppe 2: DP ---
  1705. dat = squeeze(mean(Data.AvgArith(:,chn,Group2),2));
  1706. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1707. timeseries = mean(dat,2);
  1708. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1709. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1710. % --- Achsen, Labels, Titel ---
  1711. ylim(YLIMITS)
  1712. xlim(XLIMITS)
  1713. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1714. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1715. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1716. % --- Legende ---
  1717. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1718. legend boxoff
  1719. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1720. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1721. % --- weisser Hintergrund ---
  1722. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1723. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1724. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1725. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1726. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1727. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1728. hold off
  1729. end
  1730. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\SupplementaryMaterial\FigureS6.2_Timeseries_DPvsHC_Arith_window2';
  1731. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1732. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1733. %% Time series HC vs. DP all ROIs: CLT1 (Export 2)
  1734. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1735. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1736. colors = get(groot,'defaultAxesColorOrder');
  1737. test = Subject;
  1738. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1739. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1740. YLIMITS = [-0.9 1.2];
  1741. XLIMITS = [-25 42];
  1742. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1743. FONT_SZ = 8;
  1744. LEG_FS = 6;
  1745. % --- Subplot-Konfiguration ---
  1746. subplotList = {
  1747. lIFG, 'left VLPFC', 1;
  1748. rIFG, 'right VLPFC', 2;
  1749. lDLPFC, 'left DLPFC', 3;
  1750. rDLPFC, 'right DLPFC', 4;
  1751. SAC, 'SAC', 5;
  1752. };
  1753. % --- Farben fuer Gruppen ---
  1754. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1755. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1756. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1757. % --- Figure setup ---
  1758. close all
  1759. figure
  1760. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1761. % --- Zeitachse ---
  1762. timeOffset = -15; % offset bei Export1 und Export2
  1763. t = (-49:(size(Data.AvgCTL1,1)-50))'/10 + timeOffset;
  1764. lh = cell(size(subplotList,1),1);
  1765. % --- Loop ueber alle Subplots ---
  1766. for iPlot = 1:size(subplotList,1)
  1767. chn = subplotList{iPlot,1};
  1768. TITLE = subplotList{iPlot,2};
  1769. spID = subplotList{iPlot,3};
  1770. subplot(3,2,spID)
  1771. % --- Hintergrund-Patches ---
  1772. p1 = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1773. 'EdgeColor','none','DisplayName','trial');
  1774. hold on
  1775. p2 = patch([-20 -15 -15 -20], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1776. 'EdgeColor','none','DisplayName','baseline');
  1777. % --- Gruppe 1: HC ---
  1778. dat = squeeze(mean(Data.AvgCTL1(:,chn,Group1),2));
  1779. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1780. timeseries = mean(dat,2);
  1781. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1782. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1783. % --- Gruppe 2: DP ---
  1784. dat = squeeze(mean(Data.AvgCTL1(:,chn,Group2),2));
  1785. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1786. timeseries = mean(dat,2);
  1787. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1788. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1789. % --- Achsen, Labels, Titel ---
  1790. ylim(YLIMITS)
  1791. xlim(XLIMITS)
  1792. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1793. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1794. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1795. % --- Legende ---
  1796. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1797. legend boxoff
  1798. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1799. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1800. % --- weisser Hintergrund ---
  1801. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1802. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1803. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1804. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1805. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1806. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1807. hold off
  1808. end
  1809. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\FigureX_Timeseries_DPvsHC_CTL1_window2';
  1810. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1811. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1812. %% Time series HC vs. DP all ROIs: CLT2 (Export 2)
  1813. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1814. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1815. colors = get(groot,'defaultAxesColorOrder');
  1816. test = Subject;
  1817. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1818. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1819. YLIMITS = [-0.9 1.2];
  1820. XLIMITS = [-25 42];
  1821. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1822. FONT_SZ = 8;
  1823. LEG_FS = 6;
  1824. % --- Subplot-Konfiguration ---
  1825. subplotList = {
  1826. lIFG, 'left VLPFC', 1;
  1827. rIFG, 'right VLPFC', 2;
  1828. lDLPFC, 'left DLPFC', 3;
  1829. rDLPFC, 'right DLPFC', 4;
  1830. SAC, 'SAC', 5;
  1831. };
  1832. % --- Farben fuer Gruppen ---
  1833. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1834. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1835. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1836. % --- Figure setup ---
  1837. close all
  1838. figure
  1839. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1840. % --- Zeitachse ---
  1841. timeOffset = -15; % offset bei Export1 und Export2
  1842. t = (-49:(size(Data.AvgCTL2,1)-50))'/10 + timeOffset;
  1843. lh = cell(size(subplotList,1),1);
  1844. % --- Loop ueber alle Subplots ---
  1845. for iPlot = 1:size(subplotList,1)
  1846. chn = subplotList{iPlot,1};
  1847. TITLE = subplotList{iPlot,2};
  1848. spID = subplotList{iPlot,3};
  1849. subplot(3,2,spID)
  1850. % --- Hintergrund-Patches ---
  1851. p1 = patch([0 40 40 0], [-1 -1 2 2], [0.95 0.95 0.95], ...
  1852. 'EdgeColor','none','DisplayName','trial');
  1853. hold on
  1854. p2 = patch([-20 -15 -15 -20], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1855. 'EdgeColor','none','DisplayName','baseline');
  1856. % --- Gruppe 1: HC ---
  1857. dat = squeeze(mean(Data.AvgCTL2(:,chn,Group1),2));
  1858. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1859. timeseries = mean(dat,2);
  1860. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1861. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1862. % --- Gruppe 2: DP ---
  1863. dat = squeeze(mean(Data.AvgCTL2(:,chn,Group2),2));
  1864. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1865. timeseries = mean(dat,2);
  1866. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1867. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1868. % --- Achsen, Labels, Titel ---
  1869. ylim(YLIMITS)
  1870. xlim(XLIMITS)
  1871. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1872. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1873. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1874. % --- Legende ---
  1875. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1876. legend boxoff
  1877. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1878. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1879. % --- weisser Hintergrund ---
  1880. lh{iPlot} = legend([p1 p2 h1 h2],'trial','baseline','HC','DP');
  1881. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1882. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1883. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1884. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1885. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1886. hold off
  1887. end
  1888. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\FigureX_Timeseries_DPvsHC_CTL2_window2';
  1889. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1890. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1891. %% Time series HC vs. DP all ROIs: TSST (Export 1)
  1892. clear all
  1893. clc
  1894. lIFG=[7 9 6];
  1895. lDLPFC=[10 12 11];
  1896. rIFG=[18 21 19];
  1897. rDLPFC=[20 23 24];
  1898. SAC=[27 26 25 28 30 31 32 35 36];
  1899. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Data_Export1.mat');
  1900. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Subjects_Export1.mat');
  1901. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1902. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1903. colors = get(groot,'defaultAxesColorOrder');
  1904. test = Subject;
  1905. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1906. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1907. YLIMITS = [-0.9 1.2];
  1908. XLIMITS = [-25 2];
  1909. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1910. FONT_SZ = 8;
  1911. LEG_FS = 6;
  1912. % --- Subplot-Konfiguration ---
  1913. subplotList = {
  1914. lIFG, 'left VLPFC', 1;
  1915. rIFG, 'right VLPFC', 2;
  1916. lDLPFC, 'left DLPFC', 3;
  1917. rDLPFC, 'right DLPFC', 4;
  1918. SAC, 'SAC', 5;
  1919. };
  1920. % --- Farben fuer Gruppen ---
  1921. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1922. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  1923. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  1924. % --- Figure setup ---
  1925. close all
  1926. figure
  1927. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  1928. % --- Zeitachse ---
  1929. timeOffset = -15; % offset bei Export1 und Export2
  1930. t = (-49:(size(Data.AvgArith,1)-50))'/10 + timeOffset;
  1931. lh = cell(size(subplotList,1),1);
  1932. % --- Loop ueber alle Subplots ---
  1933. for iPlot = 1:size(subplotList,1)
  1934. chn = subplotList{iPlot,1};
  1935. TITLE = subplotList{iPlot,2};
  1936. spID = subplotList{iPlot,3};
  1937. subplot(3,2,spID)
  1938. % --- Hintergrund-Patches ---
  1939. hold on
  1940. p2 = patch([-20 -15 -15 -20], [-1 -1 2 2], [0.85 0.85 0.85], ...
  1941. 'EdgeColor','none','DisplayName','baseline');
  1942. % --- Gruppe 1: HC ---
  1943. dat = squeeze(mean(Data.AvgArith(:,chn,Group1),2));
  1944. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  1945. timeseries = mean(dat,2);
  1946. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  1947. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  1948. % --- Gruppe 2: DP ---
  1949. dat = squeeze(mean(Data.AvgArith(:,chn,Group2),2));
  1950. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  1951. timeseries = mean(dat,2);
  1952. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  1953. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  1954. % --- Achsen, Labels, Titel ---
  1955. ylim(YLIMITS)
  1956. xlim(XLIMITS)
  1957. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  1958. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  1959. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  1960. % --- Legende ---
  1961. lh{iPlot} = legend([p2 h1 h2],'baseline','HC','DP');
  1962. legend boxoff
  1963. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1964. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1965. % --- weisser Hintergrund ---
  1966. lh{iPlot} = legend([p2 h1 h2],'baseline','HC','DP');
  1967. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  1968. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  1969. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  1970. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  1971. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  1972. hold off
  1973. end
  1974. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\SupplementaryMaterial\FigureS6.1_Timeseries_DPvsHC_Arith_window1';
  1975. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  1976. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  1977. %% Time series HC vs. DP all ROIs: CTL1 (Export 1)
  1978. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  1979. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  1980. colors = get(groot,'defaultAxesColorOrder');
  1981. test = Subject;
  1982. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  1983. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  1984. YLIMITS = [-0.9 1.2];
  1985. XLIMITS = [-25 2];
  1986. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  1987. FONT_SZ = 8;
  1988. LEG_FS = 6;
  1989. % --- Subplot-Konfiguration ---
  1990. subplotList = {
  1991. lIFG, 'left VLPFC', 1;
  1992. rIFG, 'right VLPFC', 2;
  1993. lDLPFC, 'left DLPFC', 3;
  1994. rDLPFC, 'right DLPFC', 4;
  1995. SAC, 'SAC', 5;
  1996. };
  1997. % --- Farben fuer Gruppen ---
  1998. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  1999. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  2000. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  2001. % --- Figure setup ---
  2002. close all
  2003. figure
  2004. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  2005. % --- Zeitachse ---
  2006. timeOffset = -15; % offset bei Export1 und Export2
  2007. t = (-49:(size(Data.AvgCTL1,1)-50))'/10 + timeOffset;
  2008. lh = cell(size(subplotList,1),1);
  2009. % --- Loop ueber alle Subplots ---
  2010. for iPlot = 1:size(subplotList,1)
  2011. chn = subplotList{iPlot,1};
  2012. TITLE = subplotList{iPlot,2};
  2013. spID = subplotList{iPlot,3};
  2014. subplot(3,2,spID)
  2015. % --- Hintergrund-Patches ---
  2016. hold on
  2017. p2 = patch([-20 -15 -15 -20], [-1 -1 2 2], [0.85 0.85 0.85], ...
  2018. 'EdgeColor','none','DisplayName','baseline');
  2019. % --- Gruppe 1: HC ---
  2020. dat = squeeze(mean(Data.AvgCTL1(:,chn,Group1),2));
  2021. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  2022. timeseries = mean(dat,2);
  2023. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  2024. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  2025. % --- Gruppe 2: DP ---
  2026. dat = squeeze(mean(Data.AvgCTL1(:,chn,Group2),2));
  2027. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  2028. timeseries = mean(dat,2);
  2029. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  2030. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  2031. % --- Achsen, Labels, Titel ---
  2032. ylim(YLIMITS)
  2033. xlim(XLIMITS)
  2034. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  2035. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  2036. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  2037. % --- Legende ---
  2038. lh{iPlot} = legend([p2 h1 h2],'baseline','HC','DP');
  2039. legend boxoff
  2040. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  2041. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  2042. % --- weisser Hintergrund ---
  2043. lh{iPlot} = legend([p2 h1 h2],'baseline','HC','DP');
  2044. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  2045. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  2046. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  2047. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  2048. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  2049. hold off
  2050. end
  2051. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\FigureX_Timeseries_DPvsHC_CTL1_window1';
  2052. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  2053. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  2054. %% Time series HC vs. DP all ROIs: CTL2 (Export 1)
  2055. lineV = @(x,spec) plot(repmat(x(:),1,2)',repmat(ylim,numel(x),1)',spec{:});
  2056. toPatch = @(x1,x2,y1,y2,spec) patch([x1(:);flipud(repmat(x2(:),numel(x1)./numel(x2),1))],[y1(:);flipud(repmat(y2(:),numel(y1)./numel(y2),1))],spec{:});
  2057. colors = get(groot,'defaultAxesColorOrder');
  2058. test = Subject;
  2059. Group1 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  2060. Group2 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  2061. YLIMITS = [-0.9 1.2];
  2062. XLIMITS = [-25 2];
  2063. LEG_POS = [0.62, 0.05, 0.32, 0.18]; % unten rechts
  2064. FONT_SZ = 8;
  2065. LEG_FS = 6;
  2066. % --- Subplot-Konfiguration ---
  2067. subplotList = {
  2068. lIFG, 'left VLPFC', 1;
  2069. rIFG, 'right VLPFC', 2;
  2070. lDLPFC, 'left DLPFC', 3;
  2071. rDLPFC, 'right DLPFC', 4;
  2072. SAC, 'SAC', 5;
  2073. };
  2074. % --- Farben fuer Gruppen ---
  2075. hexColor1 = '#00676f'; rgbColor1 = sscanf(hexColor1(2:end), '%2x%2x%2x', [1 3]) / 255;
  2076. hexColor2 = '#9b7b00'; rgbColor2 = sscanf(hexColor2(2:end), '%2x%2x%2x', [1 3]) / 255;
  2077. hexColor3 = '#b43602'; rgbColor3 = sscanf(hexColor3(2:end), '%2x%2x%2x', [1 3]) / 255;
  2078. % --- Figure setup ---
  2079. close all
  2080. figure
  2081. set(gcf,'Units','inches','Position',[1 1 8.27 6])
  2082. % --- Zeitachse ---
  2083. timeOffset = -15; % offset bei Export1 und Export2
  2084. t = (-49:(size(Data.AvgCTL2,1)-50))'/10 + timeOffset;
  2085. lh = cell(size(subplotList,1),1);
  2086. % --- Loop ueber alle Subplots ---
  2087. for iPlot = 1:size(subplotList,1)
  2088. chn = subplotList{iPlot,1};
  2089. TITLE = subplotList{iPlot,2};
  2090. spID = subplotList{iPlot,3};
  2091. subplot(3,2,spID)
  2092. % --- Hintergrund-Patches ---
  2093. hold on
  2094. p2 = patch([-20 -15 -15 -20], [-1 -1 2 2], [0.85 0.85 0.85], ...
  2095. 'EdgeColor','none','DisplayName','baseline');
  2096. % --- Gruppe 1: HC ---
  2097. dat = squeeze(mean(Data.AvgCTL2(:,chn,Group1),2));
  2098. SEM = std(dat,0,2) ./ sqrt(numel(Group1));
  2099. timeseries = mean(dat,2);
  2100. h1 = plot(t,timeseries,'.-','Color',rgbColor1,'DisplayName','HC');
  2101. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor1,'facealpha',0.15})
  2102. % --- Gruppe 2: DP ---
  2103. dat = squeeze(mean(Data.AvgCTL2(:,chn,Group2),2));
  2104. SEM = std(dat,0,2) ./ sqrt(numel(Group2));
  2105. timeseries = mean(dat,2);
  2106. h2 = plot(t,timeseries,'.-','Color',rgbColor2,'DisplayName','DP');
  2107. toPatch(t,t,timeseries-SEM,timeseries+SEM,{rgbColor2,'facealpha',0.15})
  2108. % --- Achsen, Labels, Titel ---
  2109. ylim(YLIMITS)
  2110. xlim(XLIMITS)
  2111. xlabel('time in s','FontSize',FONT_SZ,'FontWeight','bold')
  2112. ylabel('z','FontSize',FONT_SZ,'FontWeight','bold')
  2113. title(TITLE,'FontSize',FONT_SZ,'FontWeight','bold')
  2114. % --- Legende ---
  2115. lh{iPlot} = legend([p2 h1 h2],'baseline','HC','DP');
  2116. legend boxoff
  2117. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  2118. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  2119. % --- weisser Hintergrund ---
  2120. lh{iPlot} = legend([p2 h1 h2],'baseline','HC','DP');
  2121. set(lh{iPlot},'FontSize',LEG_FS,'FontWeight','bold')
  2122. set(lh{iPlot},'Units','normalized','Position',LEG_POS)
  2123. set(lh{iPlot}, 'Color', 'w'); % Weisser Hintergrund
  2124. set(lh{iPlot}, 'EdgeColor', 'w'); % Rahmen
  2125. set(lh{iPlot}, 'Box', 'on'); % Kasten sichtbar
  2126. hold off
  2127. end
  2128. filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\FigureX_Timeseries_DPvsHC_CTL2_window1';
  2129. print(gcf, [filename '.svg'], '-dsvg', '-r600');
  2130. print(gcf, [filename '.jpg'], '-djpeg', '-r600');
  2131. %% Brainmaps CTL1 CTL2 und TSST contrast
  2132. close all
  2133. clear all
  2134. clc
  2135. initroutines('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\routines\2017-04-27')
  2136. clear settings P PS;
  2137. P = NirsPlotTool();
  2138. settings.experiment.time_series{1} = {'name','CTL1.cui','sample_rate',10,'trigger_name','CTL1.trigger'};
  2139. settings.experiment.time_series{2} = {'name','CTL2.cui','sample_rate',10,'trigger_name','CTL2.trigger'};
  2140. settings.experiment.time_series{3} = {'name','Arith.cui','sample_rate',10,'trigger_name','Stress.trigger'};
  2141. % settings.experiment.category{1} = {'name','TriggerA','trigger_token',1}; % for analysis of window 3
  2142. settings.experiment.category{1} = {'name','TriggerA','trigger_token',9}; % for analysis of window 1 and window 2
  2143. P = P.setProperties(settings);
  2144. P = NirsPlotTool();
  2145. P = P.setProperty('show_probeset','on');
  2146. P = P.setProperties(settings);
  2147. PS = NirsProbeset('brain_coord_file','Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Studie Stress Rumination\Koords\NIRS-probesetXYZ_Alle2.txt');
  2148. settings.plot_tool.probesets{1} = {'name','Gesamt','probeset',PS};
  2149. P = P.setProperties(settings);
  2150. P = P.setProperty('probesets',{'name','Gesamt','probeset',PS});
  2151. P = P.setProperties(settings);
  2152. P = P.setProperty('show_probeset','on');
  2153. P = P.setProperties(settings);
  2154. lIFG=[7 9 6];
  2155. lDLPFC=[10 12 11];
  2156. rIFG=[18 21 19];
  2157. rDLPFC=[20 23 24];
  2158. SAC=[27 26 25 28 30 31 32 35 36];
  2159. % load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Data_Export1.mat');
  2160. % load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Subjects_Export1.mat');
  2161. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Data_Export3.mat');
  2162. load('Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Subjects_Export3.mat');
  2163. Group2 = [56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 108 109 110 111 116 118 120 121 122 123 124 125 126 127 132 ]; % HC
  2164. Group1 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 104 107 112 113 114 115 117 119 128 129 130 131 133 134 135 136 137 138 139 140 141 142 ]; % DP
  2165. T1=((mean(Data.AmpCTL1( :,Group1),2)')-(mean(Data.AmpCTL1( :,Group2),2)'))./(sqrt((var(Data.AmpCTL1( :,Group2)')+var(Data.AmpCTL1( :,Group1)'))/2))
  2166. T2=((mean(Data.AmpCTL2( :,Group1),2)')-(mean(Data.AmpCTL2( :,Group2),2)'))./(sqrt((var(Data.AmpCTL2( :,Group2)')+var(Data.AmpCTL2( :,Group1)'))/2))
  2167. T3=((mean(Data.AmpArith(:,Group1),2)')-(mean(Data.AmpArith(:,Group2),2)'))./(sqrt((var(Data.AmpArith(:,Group2)')+var(Data.AmpArith(:,Group1)'))/2))
  2168. P = P.setProperty('show_probeset','on'); % "Zahlen-Channelbezeichnungen" werden rausgenommen
  2169. P = P.setProperty('show_head','on','map_type','brain_map','color_map','braincmap','color_limit',[-0.5 0.5],'color_gap',[],'view_angles',{[180 30],[-90 0],[90 0],[0 30];[180 30],[-90 0],[90 0],[0 30];[180 30],[-90 0],[90 0],[0 30]},'column_names',{'frontal','left','right','parietal'},'row_names',{'CTL1','CTL2','TSST'},'show_colorbar','d');
  2170. P = P.setProperty('values2map',{{T1},{T1},{T1},{T1};{T2},{T2},{T2},{T2};{T3},{T3},{T3},{T3}}...
  2171. ,'probesets2map',{{'Gesamt'},{'Gesamt'},{'Gesamt'},{'Gesamt'};{'Gesamt'},{'Gesamt'},{'Gesamt'},{'Gesamt'};{'Gesamt'},{'Gesamt'},{'Gesamt'},{'Gesamt'}});
  2172. P = P.map('values');
  2173. % filename = 'Q:\NAS\Ehlis_Auswertung\Laufwerk_S\AG-Mitglieder\David\Artikel\TSST Anticipation\Auswertung\Plots\Figure6_Brainmap_window1';
  2174. % print(gcf, [filename '.svg'], '-dsvg', '-r600');
  2175. % print(gcf, [filename '.jpg'], '-djpeg', '-r600');

2026_04_09_fNIRSpreprocessing_TSST_Anticipation.m at commit 51b5b83, no license · at the source

Overview

Authors: Isabell Int-Veen1,2, Ann-Christine Ehlis1,2,3, Agnes Kroczek1, Hendrik Laicher1,2, Andreas J Fallgatter1,2,3, David Rosenbaum1
ORCID iDs: Isabell Int-Veen
  1. Department of Psychiatry and Psychotherapy, Tübingen Center for Mental Health (TüCMH), University of Tübingen, Tübingen, Germany
  2. German Center for Mental Health, partner site Tübingen, Germany
  3. LEAD Graduate School & Research Network, University of Tuebingen, Tuebingen, Germany
Institutions: University of Tübingen (Germany)
Journal: NeuroImage. Clinical, volume 51, article 104019
Dates: received 2 March 2026; accepted 28 May 2026; published online 29 May 2026; in print 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.nicl.2026.104019 · PMID 42288110 · PMCID PMC13277536 · OpenAlex W7162795579
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), depression (population)
Methods: Spectral & time-frequency, Statistics, Preprocessing, Graphs, fMRI & imaging, Physiology & signal measures
Keywords: Hypofrontality, Prefrontal hypoactivation, Depression, Trier Social Stress Test (TSST), Anticipation
MeSH: Depression*, Prefrontal Cortex*, Stress, Psychological*, Adult, Anticipation, Psychological, Brain Mapping, Female, Humans, Male, Spectroscopy, Near-Infrared, Young Adult (* major topic)
Topic: Stress Responses and Cortisol (Behavioral Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 65 references in the paper

Abstract

Stress responses unfold across distinct phases, including anticipation, stressor confrontation, and recovery, yet research in depression has predominantly focused on neural processes during stress exposure itself. A robust finding in this context is reduced prefrontal activation under stress in patients with depression (DP). However, neural processes preceding stress exposure may critically shape task-related activation and bias group comparisons. To date, no study has directly examined the impact of this anticipatory neural activation on prefrontal hypoactivation under stress. Here, data from two functional near-infrared spectroscopy (fNIRS) studies employing the Trier Social Stress Test (TSST) in DP and healthy controls (HC) were pooled. Results revealed pronounced group differences prior to task onset, namely increased activation in the DP group compared to HC. With respect to stress-related brain activation, we replicated the well-established finding of reduced stress-related prefrontal activation in DP compared to HC when activation prior to the beginning of each trial was not accounted for. However, when it was accounted for, group differences in stress-related activation were no longer evident. Together, these findings suggest that apparent prefrontal hypoactivation may partly reflect heightened anticipatory recruitment of regulatory brain regions rather than insufficient engagement during task execution, underscoring the importance of (re-)considering the baseline problem in future studies.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.

isabellintveen/TSSTAnticipation

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 51b5b832be2772f7d8efef4ce43a6dc6061297da, 21 April 2026
Languages: SPSS (2), MATLAB (1), R (1)
Size: 5 files, 4 scripts
Software Heritage: not archived
Found in: the text, “Data analysis”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: cowplot (1 file), Statistics and Machine Learning Toolbox (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
5 files

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 4 scripts, each with its path and the digest of its content;
  • 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

Data will be made available on request.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 6 authors, 5 keywords, 11 MeSH terms, 57 references.

Cite

This paper

Int-Veen, I., Ehlis, A.-C., Kroczek, A., Laicher, H., Fallgatter, A. J., & Rosenbaum, D. (2026). Stress-related hypofrontality in depression and its relation to altered activation prior to the stress response. NeuroImage. Clinical, 51, 104019. https://doi.org/10.1016/j.nicl.2026.104019

BibTeX

@article{intveen2026stress,
author = {Int-Veen, Isabell and Ehlis, Ann-Christine and Kroczek, Agnes and Laicher, Hendrik and Fallgatter, Andreas J and Rosenbaum, David},
title = {{Stress-related hypofrontality in depression and its relation to altered activation prior to the stress response}},
journal = {NeuroImage. Clinical},
year = {2026},
month = may,
volume = {51},
pages = {104019},
publisher = {Elsevier},
issn = {2213-1582},
doi = {10.1016/j.nicl.2026.104019},
url = {https://doi.org/10.1016/j.nicl.2026.104019},
pmid = {42288110},
pmcid = {PMC13277536}
}

RIS

TY - JOUR
AU - Int-Veen, Isabell
AU - Ehlis, Ann-Christine
AU - Kroczek, Agnes
AU - Laicher, Hendrik
AU - Fallgatter, Andreas J
AU - Rosenbaum, David
TI - Stress-related hypofrontality in depression and its relation to altered activation prior to the stress response
T2 - NeuroImage. Clinical
J2 - Neuroimage Clin
PY - 2026
DA - 2026/05/29
VL - 51
SP - 104019
SN - 2213-1582
PB - Elsevier
DO - 10.1016/j.nicl.2026.104019
UR - https://doi.org/10.1016/j.nicl.2026.104019
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.nicl.2026.104019",
"type": "article-journal",
"title": "Stress-related hypofrontality in depression and its relation to altered activation prior to the stress response",
"container-title": "NeuroImage. Clinical",
"author": [
{
"family": "Int-Veen",
"given": "Isabell"
},
{
"family": "Ehlis",
"given": "Ann-Christine"
},
{
"family": "Kroczek",
"given": "Agnes"
},
{
"family": "Laicher",
"given": "Hendrik"
},
{
"family": "Fallgatter",
"given": "Andreas J"
},
{
"family": "Rosenbaum",
"given": "David"
}
],
"container-title-short": "Neuroimage Clin",
"volume": "51",
"page": "104019",
"DOI": "10.1016/j.nicl.2026.104019",
"PMID": "42288110",
"PMCID": "PMC13277536",
"ISSN": "2213-1582",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.nicl.2026.104019",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
29
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1155/da/8855110
Rumination Out Loud? Linguistic, Neural, and Psychophysiological Correlates of the Think-Aloud Paradigm.
Journal: Depression and anxiety
In common: 15 references, author Isabell Int-Veen
[2] doi:10.1111/jne.70185 [code]
Testosterone, cortisol, and fNIRS-based cortical activation associated with competitive task persistence and difficulty.
Journal: Journal of neuroendocrinology
In common: tidyverse, 3 references
[3] doi:10.1111/psyp.70286 [code]
Partially Different Mechanisms of Social and Nonsocial Attention: Evidence From Changes in Cueing Effects and Underlying Frontal Cortex Processing Over Time.
Journal: Psychophysiology
In common: Statistics and Machine Learning Toolbox, 3 references
[4] doi:10.1162/imag.a.1268 [code]
Real-time fMRI-triggered experience sampling: A proof-of-concept study.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Statistics and Machine Learning Toolbox, tidyverse, 2 references
[5] doi:10.1038/s41467-026-74565-0 [code]
The functional neurobiology of dispositions towards negative emotions.
Journal: Nature communications
In common: cowplot, Statistics and Machine Learning Toolbox, tidyverse, 1 reference
[6] doi:10.3758/s13415-026-01455-9
Inter-brain coupling tracks emotional co-regulation.
Journal: Cognitive, affective & behavioral neuroscience
In common: 3 references
[7] doi:10.1162/imag.a.1363 [code]
Social approach-avoidance conflict: Behavioural, emotional, and neural correlates along a depression-social anxiety spectrum.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: cowplot, tidyverse, depression, 1 reference
[8] doi:10.1117/1.nph.13.3.035009
Single-subject detection of speech network activation using functional near-infrared spectroscopy.
Journal: Neurophotonics
In common: 3 references
[9] doi:10.1017/s0033291726103936
Altered social and cognitive control interactions during decision-making in social anxiety.
Journal: Psychological medicine
In common: 3 references
[10] doi:10.1371/journal.pone.0353139 [code]
No developmental fronto-parietal shift in brain activation during mental arithmetic across the lifespan: A registered report.
Journal: PloS one
In common: 3 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.