OSCR

Real-time fMRI-triggered experience sampling: A proof-of-concept study.

Code ↔ Paper

5 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.

5 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 5 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
  1. [1] § Results › Exploratory validation of real-time BOLD signal triggers ↔ Code/Figure 3/offlineonlineplots.m, lines 680 to 758 · score 0.68 · Shaded error bars, PMC activity, PMC Trigger Events, trial onset, BOLD activity, SEM · block oscr:b:N3VXJRPE7ZNCT-6 · Report a mismatch
  2. [2] § Results › Description of final dataset ↔ Code/Figure 2/exclusionbarplot.m, lines 33 to 61 · score 0.62 · Opposite ROI triggered, Incomplete rating, Head Motion, thoughts, Figure 2 · block oscr:b:TKGBW64Q7GX6F-U · Report a mismatch
  3. [3] § Results › Exploratory validation of real-time BOLD signal triggers ↔ Code/Figure 3/offlineonlineplots.m, lines 320 to 397 · score 0.61 · offline PMC, trial onset, BOLD activity, trigger events, alignment, validation · block oscr:b:BFQ2XGHAXTT55-2 · Report a mismatch
  4. [4] § Data Analyses › Power analysis ↔ Code/Figure 4 + Pre-registered Hypothesis Testing/rtfMRI_HypothesisTesting.R, lines 44 to 122 · score 0.59 · fitted model, lme4, CIs, coefficient, slope · block oscr:b:2W0PW6X6P9C6C-I · Report a mismatch
  5. [5] § Methods › Experimental tasks › GradCPT ↔ gradCPT_mk_Mt_EV.m, the whole file · a weak match · score 0.56 · button presses, commission, city, mountains, stimuli, event · block oscr:b:YS395XJTA3HMH-1 · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 758 lines · 33 KB · no license · 2 matches

  1. %% Offline Online Comparison
  2. %Written July 25th 2025 by Tiara Bounyarith
  3. %% Group level and / or subject level analysis
  4. group_level = 1;
  5. subject_level = 0;
  6. %%
  7. data_dir = '/Volumes/LaCie/R21-rtfMRI';
  8. %Load in rtfMRI master table
  9. load([data_dir filesep 'analyses' filesep 'rtfMRI_master_table.mat']);
  10. %Exclude trials
  11. master = master(master.keep, :);
  12. %Exclude subjects
  13. excludedsubs = ["sub-01", "sub-02", "sub-28", "sub-29", "sub-30", "sub-44", "sub-70"];
  14. master = master(~ismember(master.subj, excludedsubs), :);
  15. %Get list of remaining subjects
  16. subs = unique(master.subj');
  17. %epoch range
  18. epoch_range = 8;
  19. %make plot folder for group
  20. if group_level == 1
  21. mkdir([data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'group_level_plots']);
  22. savepath_group=[data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'group_level_plots'];
  23. end
  24. %make plot folder for subj
  25. if subject_level == 1
  26. mkdir([data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'subject_level_plots']);
  27. savepath_sub=[data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'subject_level_plots'];
  28. end
  29. %% Graph activity around when daIC trials were triggered
  30. if group_level == 1
  31. group_online_target_daIC_epochs = []; group_z_online_target_daIC_epochs = [];
  32. group_online_nontarget_PMC_epochs = []; group_z_online_nontarget_PMC_epochs = [];
  33. group_offline_target_daIC_epochs = []; group_z_offline_target_daIC_epochs = [];
  34. group_offline_nontarget_PMC_epochs = []; group_z_offline_nontarget_PMC_epochs = [];
  35. end
  36. for i=1:length(subs)
  37. runs = length(unique(master.run(master.subj == subs(i))));
  38. subj_num = str2double(extractAfter(subs(i), "sub-"));
  39. if subject_level == 1
  40. sub_online_target_daIC_epochs = []; sub_z_online_target_daIC_epochs = [];
  41. if subj_num > 20
  42. sub_online_nontarget_PMC_epochs = [];
  43. sub_z_online_nontarget_PMC_epochs = [];
  44. end
  45. sub_offline_target_daIC_epochs = []; sub_z_offline_target_daIC_epochs = [];
  46. sub_offline_nontarget_PMC_epochs = []; sub_z_offline_nontarget_PMC_epochs = [];
  47. end
  48. for j=1:runs
  49. target_ROI = unique(master.ROI(master.subj == subs(i) & master.run == j));
  50. % ensure we are only looking at runs that are triggering from the daIC
  51. if target_ROI == "daIC"
  52. nontarget_ROI = "PMC";
  53. %load in online target daIC data
  54. load([data_dir filesep 'subject_opennft_data' filesep char(subs(i)) filesep 'mainLoopData' filesep char(subs(i)) '_' num2str(j) '_mainLoopData.mat'], 'scalProcTimeSeries');
  55. online_target_daIC = scalProcTimeSeries(1,:);
  56. %load in online nontarget PMC data for subjects post-algorithm fix
  57. if subj_num > 20
  58. online_nontarget_PMC = scalProcTimeSeries(2,:);
  59. end
  60. %load in offline target daIC data
  61. subj_padded = sprintf('sub-%03d', subj_num);
  62. offline_target_daIC = (load([data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'OfflineTargetROITimeSeries' filesep subj_padded filesep 'run' num2str(j) filesep subj_padded '_run' num2str(j) '_preproc_meants.txt']))';
  63. %load in offline nontarget PMC data
  64. offline_nontarget_PMC = (load([data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'OfflineNontargetROITimeSeries' filesep subj_padded filesep 'run' num2str(j) filesep subj_padded '_run' num2str(j) '_preproc_meants.txt']))';
  65. trials = master.trial_num(master.subj == subs(i) & master.run == j);
  66. for k=1:length(trials)
  67. % ensure we're only looking at daIC-triggered trials
  68. if master.trigger_type(master.subj == subs(i) & master.run == j & master.trial_num == trials(k)) == "ROI"
  69. % epoch around ROI-triggered trials for this run - online
  70. % target daIC
  71. curr_trial = master.trial_onset_TR(master.subj == subs(i) & master.run == j & master.trial_num == trials(k));
  72. run_length = size(online_target_daIC,2);
  73. start_epoch = max(1, curr_trial - epoch_range);
  74. end_epoch = min(run_length, curr_trial + epoch_range);
  75. curr_online_tar_daIC_epoch = online_target_daIC(1, start_epoch:end_epoch);
  76. if group_level == 1
  77. group_online_target_daIC_epochs = [group_online_target_daIC_epochs; curr_online_tar_daIC_epoch];
  78. end
  79. if subject_level == 1
  80. sub_online_target_daIC_epochs = [sub_online_target_daIC_epochs; curr_online_tar_daIC_epoch];
  81. end
  82. curr_z_online_tar_daIC = (curr_online_tar_daIC_epoch - mean(curr_online_tar_daIC_epoch)) / std(curr_online_tar_daIC_epoch);
  83. if group_level == 1
  84. group_z_online_target_daIC_epochs = [group_z_online_target_daIC_epochs; curr_z_online_tar_daIC];
  85. end
  86. if subject_level == 1
  87. sub_z_online_target_daIC_epochs = [sub_z_online_target_daIC_epochs; curr_z_online_tar_daIC];
  88. end
  89. % epoch around ROI-triggered trials for this run - online
  90. % nontarget PMC
  91. if subj_num > 20
  92. run_length = size(online_nontarget_PMC,2);
  93. start_epoch = max(1, curr_trial - epoch_range);
  94. end_epoch = min(run_length, curr_trial + epoch_range);
  95. curr_online_nontar_PMC_epoch = online_nontarget_PMC(1, start_epoch:end_epoch);
  96. if group_level == 1
  97. group_online_nontarget_PMC_epochs = [group_online_nontarget_PMC_epochs; curr_online_nontar_PMC_epoch];
  98. end
  99. if subject_level == 1
  100. sub_online_nontarget_PMC_epochs = [sub_online_nontarget_PMC_epochs; curr_online_nontar_PMC_epoch];
  101. end
  102. curr_z_online_nontar_PMC = (curr_online_nontar_PMC_epoch - mean(curr_online_nontar_PMC_epoch)) / std(curr_online_nontar_PMC_epoch);
  103. if group_level == 1
  104. group_z_online_nontarget_PMC_epochs = [group_z_online_nontarget_PMC_epochs; curr_z_online_nontar_PMC];
  105. end
  106. if subject_level == 1
  107. sub_z_online_nontarget_PMC_epochs = [sub_z_online_nontarget_PMC_epochs; curr_z_online_nontar_PMC];
  108. end
  109. end
  110. % offline target daIC
  111. run_length = size(offline_target_daIC,2);
  112. start_epoch = max(1, curr_trial - epoch_range);
  113. end_epoch = min(run_length, curr_trial + epoch_range);
  114. curr_offline_tar_daIC_epoch = offline_target_daIC(1, start_epoch:end_epoch);
  115. if group_level == 1
  116. group_offline_target_daIC_epochs = [group_offline_target_daIC_epochs; curr_offline_tar_daIC_epoch];
  117. end
  118. if subject_level == 1
  119. sub_offline_target_daIC_epochs = [sub_offline_target_daIC_epochs; curr_offline_tar_daIC_epoch];
  120. end
  121. curr_z_offline_tar_daIC = (curr_offline_tar_daIC_epoch - mean(curr_offline_tar_daIC_epoch)) / std(curr_offline_tar_daIC_epoch);
  122. if group_level == 1
  123. group_z_offline_target_daIC_epochs = [group_z_offline_target_daIC_epochs; curr_z_offline_tar_daIC];
  124. end
  125. if subject_level == 1
  126. sub_z_offline_target_daIC_epochs = [sub_z_offline_target_daIC_epochs; curr_z_offline_tar_daIC];
  127. end
  128. % offline nontarget PMC
  129. run_length = size(offline_nontarget_PMC,2);
  130. start_epoch = max(1, curr_trial - epoch_range);
  131. end_epoch = min(run_length, curr_trial + epoch_range);
  132. curr_offline_nontar_PMC_epoch = offline_nontarget_PMC(1, start_epoch:end_epoch);
  133. if group_level == 1
  134. group_offline_nontarget_PMC_epochs = [group_offline_nontarget_PMC_epochs; curr_offline_nontar_PMC_epoch];
  135. end
  136. if subject_level == 1
  137. sub_offline_nontarget_PMC_epochs = [sub_offline_nontarget_PMC_epochs; curr_offline_nontar_PMC_epoch];
  138. end
  139. curr_z_offline_nontar_PMC = (curr_offline_nontar_PMC_epoch - mean(curr_offline_nontar_PMC_epoch)) / std(curr_offline_nontar_PMC_epoch);
  140. if group_level == 1
  141. group_z_offline_nontarget_PMC_epochs = [group_z_offline_nontarget_PMC_epochs; curr_z_offline_nontar_PMC];
  142. end
  143. if subject_level == 1
  144. sub_z_offline_nontarget_PMC_epochs = [sub_z_offline_nontarget_PMC_epochs; curr_z_offline_nontar_PMC];
  145. end
  146. end
  147. end
  148. elseif target_ROI == "PMC"
  149. nontarget_ROI = "daIC";
  150. end
  151. end
  152. if subject_level == 1
  153. % find grand mean & SEM of z-scored online target daIC activity
  154. sub_avg_online_tar_daIC_epoch = mean(sub_z_online_target_daIC_epochs,1);
  155. sub_sem_online_tar_daIC_epoch = std(sub_z_online_target_daIC_epochs, 0, 1) / sqrt(size(sub_z_online_target_daIC_epochs,1));
  156. % mean & SEM of z-scored online nontarget PMC
  157. if subj_num > 20
  158. sub_avg_online_nontar_PMC_epoch = mean(sub_z_online_nontarget_PMC_epochs,1);
  159. sub_sem_online_nontar_PMC_epoch = std(sub_z_online_nontarget_PMC_epochs, 0, 1) / sqrt(size(sub_z_online_nontarget_PMC_epochs,1));
  160. end
  161. % mean & SEM z-scored offline daIC
  162. sub_avg_offline_tar_daIC_epoch = mean(sub_z_offline_target_daIC_epochs,1);
  163. sub_sem_offline_tar_daIC_epoch = std(sub_z_offline_target_daIC_epochs, 0, 1) / sqrt(size(sub_z_offline_target_daIC_epochs, 1));
  164. % mean & SEM z-scoredoffline PMC
  165. sub_avg_offline_nontar_PMC_epoch = mean(sub_z_offline_nontarget_PMC_epochs,1);
  166. sub_sem_offline_nontar_PMC_epoch = std(sub_z_offline_nontarget_PMC_epochs, 0, 1) / sqrt(size(sub_z_offline_nontarget_PMC_epochs,1));
  167. % Graph
  168. figure('Position', [500 500 1200 500])
  169. %figure('Position', [900 500 1500 500])
  170. a = shadedErrorBar([], sub_avg_online_tar_daIC_epoch, sub_sem_online_tar_daIC_epoch, 'lineprops', {'color', [1, 0, 0]}, 'patchSaturation', 0.08);
  171. hold on
  172. if subj_num > 20
  173. b = shadedErrorBar([], sub_avg_online_nontar_PMC_epoch, sub_sem_online_nontar_PMC_epoch, 'lineprops', {'color',[0, 0, 1]}, 'patchSaturation', 0.08);
  174. c = shadedErrorBar([], sub_avg_offline_tar_daIC_epoch, sub_sem_offline_tar_daIC_epoch, 'lineprops', {'color',[0.6, 0, 0]}, 'patchSaturation', 0.08);
  175. d = shadedErrorBar([], sub_avg_offline_nontar_PMC_epoch, sub_sem_offline_nontar_PMC_epoch, 'lineprops', {'color',[0, 0, 0.6]}, 'patchSaturation', 0.08);
  176. else
  177. b = shadedErrorBar([], sub_avg_offline_tar_daIC_epoch, sub_sem_offline_tar_daIC_epoch, 'lineprops', {'color',[0.6, 0, 0]}, 'patchSaturation', 0.08);
  178. c = shadedErrorBar([], sub_avg_offline_nontar_PMC_epoch, sub_sem_offline_nontar_PMC_epoch, 'lineprops', {'color',[0, 0, 0.6]}, 'patchSaturation', 0.08);
  179. end
  180. if subj_num > 20
  181. set(a.edge, 'LineWidth', 2, 'LineStyle', ':')
  182. a.mainLine.LineWidth = 4;
  183. set(b.edge, 'LineWidth', 2, 'LineStyle', ':')
  184. b.mainLine.LineWidth = 4;
  185. set(c.edge, 'LineWidth', 2, 'LineStyle', ':')
  186. c.mainLine.LineWidth = 4;
  187. set(d.edge, 'LineWidth', 2, 'LineStyle', ':')
  188. d.mainLine.LineWidth = 4;
  189. else
  190. set(a.edge, 'LineWidth', 2, 'LineStyle', ':')
  191. a.mainLine.LineWidth = 4;
  192. set(b.edge, 'LineWidth', 2, 'LineStyle', ':')
  193. b.mainLine.LineWidth = 4;
  194. set(c.edge, 'LineWidth', 2, 'LineStyle', ':')
  195. c.mainLine.LineWidth = 4;
  196. end
  197. xline(epoch_range+1, '_', {'Trial Onset'}, 'LabelVerticalAlignment','bottom','LabelHorizontalAlignment','center','FontSize', 18, 'LineWidth', 2)
  198. xlabel('TR', 'FontSize', 20)
  199. xticks([1:17])
  200. xticklabels({'-8','-7','-6','-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6','7','8'})
  201. ax=gca;
  202. ax.XAxis.FontSize = 25;
  203. % ylim([-1.5 2.0]);
  204. ylabel('BOLD Activity (z)', 'FontSize', 20)
  205. ax.YAxis.FontSize = 20;
  206. if subj_num > 20
  207. legend({'Real-time daIC Activity (Target)', 'Real-time PMC Activity (Non-target)', 'Offline daIC Activity (Target)', 'Offline PMC Activity (Non-target)'}, 'FontSize', 18, 'Location', 'best');
  208. else
  209. legend({'Real-time daIC Activity (Target)', 'Offline daIC Activity (Target)', 'Offline PMC Activity (Non-target)'}, 'FontSize', 18, 'Location', 'best');
  210. end
  211. title({char(subs(i)),'Real-time vs Offline Estimates of Average Region Activity During daIC-triggered Trials'}, 'FontSize', 23);
  212. if subj_num <20
  213. subtitle('*Online PMC Activity Estimates Unavailable');
  214. end
  215. print('-opengl', '-dpng','-r350',[savepath_sub filesep char(subs(i)) '_daICtrial_offline-online_plot.png']);
  216. hold off
  217. pause; close;
  218. end
  219. end
  220. %%
  221. if group_level == 1
  222. % find grand mean & SEM of z-scored online target daIC activity
  223. group_avg_online_tar_daIC_epoch = mean(group_z_online_target_daIC_epochs,1);
  224. group_sem_online_tar_daIC_epoch = std(group_z_online_target_daIC_epochs, 0, 1) / sqrt(size(group_z_online_target_daIC_epochs,1));
  225. % mean & SEM of z-scored online nontarget PMC
  226. group_avg_online_nontar_PMC_epoch = mean(group_z_online_nontarget_PMC_epochs,1);
  227. group_sem_online_nontar_PMC_epoch = std(group_z_online_nontarget_PMC_epochs, 0, 1) / sqrt(size(group_z_online_nontarget_PMC_epochs,1));
  228. % mean & SEM z-scored offline daIC
  229. group_avg_offline_tar_daIC_epoch = mean(group_z_offline_target_daIC_epochs,1);
  230. group_sem_offline_tar_daIC_epoch = std(group_z_offline_target_daIC_epochs, 0, 1) / sqrt(size(group_z_offline_target_daIC_epochs, 1));
  231. % mean & SEM z-scoredoffline PMC
  232. group_avg_offline_nontar_PMC_epoch = mean(group_z_offline_nontarget_PMC_epochs,1);
  233. group_sem_offline_nontar_PMC_epoch = std(group_z_offline_nontarget_PMC_epochs, 0, 1) / sqrt(size(group_z_offline_nontarget_PMC_epochs,1));
  234. % Graph
  235. figure('Position', [500 500 1200 500])
  236. %figure('Position', [900 500 1500 500])
  237. a = shadedErrorBar([], group_avg_online_tar_daIC_epoch, group_sem_online_tar_daIC_epoch, 'lineprops', {'color', [1, 0, 0]}, 'patchSaturation', 0.08);
  238. hold on
  239. b = shadedErrorBar([], group_avg_online_nontar_PMC_epoch, group_sem_online_nontar_PMC_epoch, 'lineprops', {'color',[0, 0, 1]}, 'patchSaturation', 0.08);
  240. c = shadedErrorBar([], group_avg_offline_tar_daIC_epoch, group_sem_offline_tar_daIC_epoch, 'lineprops', {'color',[0.6, 0, 0]}, 'patchSaturation', 0.08);
  241. d = shadedErrorBar([], group_avg_offline_nontar_PMC_epoch, group_sem_offline_nontar_PMC_epoch, 'lineprops', {'color',[0, 0, 0.6]}, 'patchSaturation', 0.08);
  242. set(a.edge, 'LineWidth', 2, 'LineStyle', ':')
  243. a.mainLine.LineWidth = 4;
  244. set(b.edge, 'LineWidth', 2, 'LineStyle', ':')
  245. b.mainLine.LineWidth = 4;
  246. set(c.edge, 'LineWidth', 2, 'LineStyle', ':')
  247. c.mainLine.LineWidth = 4;
  248. set(d.edge, 'LineWidth', 2, 'LineStyle', ':')
  249. d.mainLine.LineWidth = 4;
  250. xline(epoch_range+1, '_', {'Trial Onset'},'LabelVerticalAlignment','bottom','LabelHorizontalAlignment','center', 'FontSize', 18, 'LineWidth', 2)
  251. xlabel('Time (seconds)', 'FontSize', 32)
  252. xticks([1:17])
  253. xticklabels({'-16','-14','-12','-10', '-8', '-6', '-4', '-2', '0', '2', '4', '6', '8', '10', '12','14','16'})
  254. ax=gca;
  255. ax.XAxis.FontSize = 28;
  256. % ylim([-1.5 2.0]);
  257. ylabel('BOLD Activity (z)', 'FontSize', 32)
  258. ax.YAxis.FontSize = 28;
  259. subj_nums = [];
  260. for i=1:length(subs)
  261. n = str2double(extractAfter(subs(i), "sub-"));
  262. subj_nums= [subj_nums; n];
  263. end
  264. legend({'Real-time daIC Activity (Target)',...
  265. ['Real-time PMC Activity (Non-target; n=' num2str(sum(~(subj_nums<20))) ')'],...
  266. 'Offline daIC Activity (Target)',...
  267. 'Offline PMC Activity (Non-target)'}, ...
  268. 'FontSize', 20, 'Location', 'best');
  269. title('Validation of daIC Trigger Events', 'FontSize', 30);
  270. print('-opengl', '-dpng','-r350',[savepath_group filesep 'group_n' num2str(length(subj_nums)) '_daICtrial_offline-online_plot.png']);
  271. hold off
  272. end
  273. %% Graph activity around when PMC trials were triggered
  274. if group_level == 1
  275. group_online_target_PMC_epochs = []; group_z_online_target_PMC_epochs = [];
  276. group_online_nontarget_daIC_epochs = []; group_z_online_nontarget_daIC_epochs = [];
  277. group_offline_target_PMC_epochs = []; group_z_offline_target_PMC_epochs = [];
  278. group_offline_nontarget_daIC_epochs = []; group_z_offline_nontarget_daIC_epochs = [];
  279. end
  280. for i=1:length(subs)
  281. runs = length(unique(master.run(master.subj == subs(i))));
  282. subj_num = str2double(extractAfter(subs(i), "sub-"));
  283. if subject_level == 1
  284. sub_online_target_PMC_epochs = []; sub_z_online_target_PMC_epochs = [];
  285. if subj_num > 20
  286. sub_online_nontarget_daIC_epochs = [];
  287. sub_z_online_nontarget_daIC_epochs = [];
  288. end
  289. sub_offline_target_PMC_epochs = []; sub_z_offline_target_PMC_epochs = [];
  290. sub_offline_nontarget_daIC_epochs = []; sub_z_offline_nontarget_daIC_epochs = [];
  291. end
  292. for j=1:runs
  293. target_ROI = unique(master.ROI(master.subj == subs(i) & master.run == j));
  294. % ensure we are only looking at runs that are triggering from the PMC
  295. if target_ROI == "PMC"
  296. nontarget_ROI = "daIC";
  297. %load in online target PMC data
  298. load([data_dir filesep 'subject_opennft_data' filesep char(subs(i)) filesep 'mainLoopData' filesep char(subs(i)) '_' num2str(j) '_mainLoopData.mat'], 'scalProcTimeSeries');
  299. online_target_PMC = scalProcTimeSeries(1,:);
  300. %load in online nontarget daIC data for subjects post-algorithm fix
  301. if subj_num > 20
  302. online_nontarget_daIC = scalProcTimeSeries(2,:);
  303. end
  304. %load in offline target PMC data
  305. subj_padded = sprintf('sub-%03d', subj_num);
  306. offline_target_PMC = (load([data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'OfflineTargetROITimeSeries' filesep subj_padded filesep 'run' num2str(j) filesep subj_padded '_run' num2str(j) '_preproc_meants.txt']))';
  307. %load in offline nontarget daIC data
  308. offline_nontarget_daIC = (load([data_dir filesep 'analyses' filesep 'OfflineOnlineCompare' filesep 'OfflineNontargetROITimeSeries' filesep subj_padded filesep 'run' num2str(j) filesep subj_padded '_run' num2str(j) '_preproc_meants.txt']))';
  309. trials = master.trial_num(master.subj == subs(i) & master.run == j);
  310. for k=1:length(trials)
  311. % ensure we're only looking at PMC-triggered trials
  312. if master.trigger_type(master.subj == subs(i) & master.run == j & master.trial_num == trials(k)) == "ROI"
  313. % epoch around ROI-triggered trials for this run - online
  314. % target PMC
  315. curr_trial = master.trial_onset_TR(master.subj == subs(i) & master.run == j & master.trial_num == trials(k));
  316. run_length = size(online_target_PMC,2);
  317. start_epoch = max(1, curr_trial - epoch_range);
  318. end_epoch = min(run_length, curr_trial + epoch_range);
  319. curr_online_tar_PMC_epoch = online_target_PMC(1, start_epoch:end_epoch);
  320. if group_level == 1
  321. group_online_target_PMC_epochs = [group_online_target_PMC_epochs; curr_online_tar_PMC_epoch];
  322. end
  323. if subject_level == 1
  324. sub_online_target_PMC_epochs = [sub_online_target_PMC_epochs; curr_online_tar_PMC_epoch];
  325. end
  326. curr_z_online_tar_PMC = (curr_online_tar_PMC_epoch - mean(curr_online_tar_PMC_epoch)) / std(curr_online_tar_PMC_epoch);
  327. if group_level == 1
  328. group_z_online_target_PMC_epochs = [group_z_online_target_PMC_epochs; curr_z_online_tar_PMC];
  329. end
  330. if subject_level == 1
  331. sub_z_online_target_PMC_epochs = [sub_z_online_target_PMC_epochs; curr_z_online_tar_PMC];
  332. end
  333. % epoch around ROI-triggered trials for this run - online
  334. % nontarget daIC
  335. if subj_num > 20
  336. run_length = size(online_nontarget_daIC,2);
  337. start_epoch = max(1, curr_trial - epoch_range);
  338. end_epoch = min(run_length, curr_trial + epoch_range);
  339. curr_online_nontar_daIC_epoch = online_nontarget_daIC(1, start_epoch:end_epoch);
  340. if group_level == 1
  341. group_online_nontarget_daIC_epochs = [group_online_nontarget_daIC_epochs; curr_online_nontar_daIC_epoch];
  342. end
  343. if subject_level == 1
  344. sub_online_nontarget_daIC_epochs = [sub_online_nontarget_daIC_epochs; curr_online_nontar_daIC_epoch];
  345. end
  346. curr_z_online_nontar_daIC = (curr_online_nontar_daIC_epoch - mean(curr_online_nontar_daIC_epoch)) / std(curr_online_nontar_daIC_epoch);
  347. if group_level == 1
  348. group_z_online_nontarget_daIC_epochs = [group_z_online_nontarget_daIC_epochs; curr_z_online_nontar_daIC];
  349. end
  350. if subject_level == 1
  351. sub_z_online_nontarget_daIC_epochs = [sub_z_online_nontarget_daIC_epochs; curr_z_online_nontar_daIC];
  352. end
  353. end
  354. % offline target PMC
  355. run_length = size(offline_target_PMC,2);
  356. start_epoch = max(1, curr_trial - epoch_range);
  357. end_epoch = min(run_length, curr_trial + epoch_range);
  358. curr_offline_tar_PMC_epoch = offline_target_PMC(1, start_epoch:end_epoch);
  359. if group_level == 1
  360. group_offline_target_PMC_epochs = [group_offline_target_PMC_epochs; curr_offline_tar_PMC_epoch];
  361. end
  362. if subject_level == 1
  363. sub_offline_target_PMC_epochs = [sub_offline_target_PMC_epochs; curr_offline_tar_PMC_epoch];
  364. end
  365. curr_z_offline_tar_PMC = (curr_offline_tar_PMC_epoch - mean(curr_offline_tar_PMC_epoch)) / std(curr_offline_tar_PMC_epoch);
  366. if group_level == 1
  367. group_z_offline_target_PMC_epochs = [group_z_offline_target_PMC_epochs; curr_z_offline_tar_PMC];
  368. end
  369. if subject_level == 1
  370. sub_z_offline_target_PMC_epochs = [sub_z_offline_target_PMC_epochs; curr_z_offline_tar_PMC];
  371. end
  372. % offline nontarget daIC
  373. run_length = size(offline_nontarget_daIC,2);
  374. start_epoch = max(1, curr_trial - epoch_range);
  375. end_epoch = min(run_length, curr_trial + epoch_range);
  376. curr_offline_nontar_daIC_epoch = offline_nontarget_daIC(1, start_epoch:end_epoch);
  377. if group_level == 1
  378. group_offline_nontarget_daIC_epochs = [group_offline_nontarget_daIC_epochs; curr_offline_nontar_daIC_epoch];
  379. end
  380. if subject_level == 1
  381. sub_offline_nontarget_daIC_epochs = [sub_offline_nontarget_daIC_epochs; curr_offline_nontar_daIC_epoch];
  382. end
  383. curr_z_offline_nontar_daIC = (curr_offline_nontar_daIC_epoch - mean(curr_offline_nontar_daIC_epoch)) / std(curr_offline_nontar_daIC_epoch);
  384. if group_level == 1
  385. group_z_offline_nontarget_daIC_epochs = [group_z_offline_nontarget_daIC_epochs; curr_z_offline_nontar_daIC];
  386. end
  387. if subject_level == 1
  388. sub_z_offline_nontarget_daIC_epochs = [sub_z_offline_nontarget_daIC_epochs; curr_z_offline_nontar_daIC];
  389. end
  390. end
  391. end
  392. elseif target_ROI == "daIC"
  393. nontarget_ROI = "PMC";
  394. end
  395. end
  396. if subject_level == 1
  397. % find grand mean & SEM of z-scored online target PMC activity
  398. sub_avg_online_tar_PMC_epoch = mean(sub_z_online_target_PMC_epochs,1);
  399. sub_sem_online_tar_PMC_epoch = std(sub_z_online_target_PMC_epochs, 0, 1) / sqrt(size(sub_z_online_target_PMC_epochs,1));
  400. % mean & SEM of z-scored online nontarget daIC
  401. if subj_num > 20
  402. sub_avg_online_nontar_daIC_epoch = mean(sub_z_online_nontarget_daIC_epochs,1);
  403. sub_sem_online_nontar_daIC_epoch = std(sub_z_online_nontarget_daIC_epochs, 0, 1) / sqrt(size(sub_z_online_nontarget_daIC_epochs,1));
  404. end
  405. % mean & SEM z-scored offline PMC
  406. sub_avg_offline_tar_PMC_epoch = mean(sub_z_offline_target_PMC_epochs,1);
  407. sub_sem_offline_tar_PMC_epoch = std(sub_z_offline_target_PMC_epochs, 0, 1) / sqrt(size(sub_z_offline_target_PMC_epochs, 1));
  408. % mean & SEM z-scoredoffline daIC
  409. sub_avg_offline_nontar_daIC_epoch = mean(sub_z_offline_nontarget_daIC_epochs,1);
  410. sub_sem_offline_nontar_daIC_epoch = std(sub_z_offline_nontarget_daIC_epochs, 0, 1) / sqrt(size(sub_z_offline_nontarget_daIC_epochs,1));
  411. % Graph
  412. figure('Position', [900 500 1500 500])
  413. a = shadedErrorBar([], sub_avg_online_tar_PMC_epoch, sub_sem_online_tar_PMC_epoch, 'lineprops', {'color', [0, 0, 1]}, 'patchSaturation', 0.08);
  414. hold on
  415. if subj_num > 20
  416. b = shadedErrorBar([], sub_avg_online_nontar_daIC_epoch, sub_sem_online_nontar_daIC_epoch, 'lineprops', {'color',[1, 0, 0]}, 'patchSaturation', 0.08);
  417. c = shadedErrorBar([], sub_avg_offline_tar_PMC_epoch, sub_sem_offline_tar_PMC_epoch, 'lineprops', {'color',[0, 0, 0.6]}, 'patchSaturation', 0.08);
  418. d = shadedErrorBar([], sub_avg_offline_nontar_daIC_epoch, sub_sem_offline_nontar_daIC_epoch, 'lineprops', {'color',[0.6, 0, 0]}, 'patchSaturation', 0.08);
  419. else
  420. b = shadedErrorBar([], sub_avg_offline_tar_PMC_epoch, sub_sem_offline_tar_PMC_epoch, 'lineprops', {'color',[0, 0, 0.6]}, 'patchSaturation', 0.08);
  421. c = shadedErrorBar([], sub_avg_offline_nontar_daIC_epoch, sub_sem_offline_nontar_daIC_epoch, 'lineprops', {'color',[0.6, 0, 0]}, 'patchSaturation', 0.08);
  422. end
  423. if subj_num > 20
  424. set(a.edge, 'LineWidth', 2, 'LineStyle', ':')
  425. a.mainLine.LineWidth = 4;
  426. set(b.edge, 'LineWidth', 2, 'LineStyle', ':')
  427. b.mainLine.LineWidth = 4;
  428. set(c.edge, 'LineWidth', 2, 'LineStyle', ':')
  429. c.mainLine.LineWidth = 4;
  430. set(d.edge, 'LineWidth', 2, 'LineStyle', ':')
  431. d.mainLine.LineWidth = 4;
  432. else
  433. set(a.edge, 'LineWidth', 2, 'LineStyle', ':')
  434. a.mainLine.LineWidth = 4;
  435. set(b.edge, 'LineWidth', 2, 'LineStyle', ':')
  436. b.mainLine.LineWidth = 4;
  437. set(c.edge, 'LineWidth', 2, 'LineStyle', ':')
  438. c.mainLine.LineWidth = 4;
  439. end
  440. xline(epoch_range+1, '_', {'Trial Onset'}, 'FontSize', 18, 'LineWidth', 2)
  441. xlabel('TR', 'FontSize', 20)
  442. xticks([1:17])
  443. xticklabels({'-8','-7','-6','-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6','7','8'})
  444. ax=gca;
  445. ax.XAxis.FontSize = 25;
  446. % ylim([-1.5 2.0]);
  447. ylabel('BOLD Activity (z)', 'FontSize', 20)
  448. ax.YAxis.FontSize = 20;
  449. if subj_num > 20
  450. legend({'Real-time PMC Activity (Target)', 'Real-time daIC Activity (Non-target)', 'Offline PMC Activity (Target)', 'Offline daIC Activity (Non-target)'}, 'FontSize', 18, 'Location', 'best');
  451. else
  452. legend({'Real-time PMC Activity (Target)', 'Offline PMC Activity (Target)', 'Offline daIC Activity (Non-target)'}, 'FontSize', 18, 'Location', 'best');
  453. end
  454. title({char(subs(i)),'Real-time vs Offline Estimates of Average Region Activity During PMC-triggered Trials'}, 'FontSize', 23);
  455. if subj_num <20
  456. subtitle('*Online daIC Activity Estimates Unavailable');
  457. end
  458. print('-opengl', '-dpng',[savepath_sub filesep char(subs(i)) '_PMCtrial_offline-online_plot.png']);
  459. hold off
  460. pause; close;
  461. end
  462. end
  463. %%
  464. if group_level == 1
  465. % find grand mean & SEM of z-scored online target PMC activity
  466. group_avg_online_tar_PMC_epoch = mean(group_z_online_target_PMC_epochs,1);
  467. group_sem_online_tar_PMC_epoch = std(group_z_online_target_PMC_epochs, 0, 1) / sqrt(size(group_z_online_target_PMC_epochs,1));
  468. % mean & SEM of z-scored online nontarget daIC
  469. group_avg_online_nontar_daIC_epoch = mean(group_z_online_nontarget_daIC_epochs,1);
  470. group_sem_online_nontar_daIC_epoch = std(group_z_online_nontarget_daIC_epochs, 0, 1) / sqrt(size(group_z_online_nontarget_daIC_epochs,1));
  471. % mean & SEM z-scored offline PMC
  472. group_avg_offline_tar_PMC_epoch = mean(group_z_offline_target_PMC_epochs,1);
  473. group_sem_offline_tar_PMC_epoch = std(group_z_offline_target_PMC_epochs, 0, 1) / sqrt(size(group_z_offline_target_PMC_epochs, 1));
  474. % mean & SEM z-scoredoffline daIC
  475. group_avg_offline_nontar_daIC_epoch = mean(group_z_offline_nontarget_daIC_epochs,1);
  476. group_sem_offline_nontar_daIC_epoch = std(group_z_offline_nontarget_daIC_epochs, 0, 1) / sqrt(size(group_z_offline_nontarget_daIC_epochs,1));
  477. % Graph
  478. figure('Position', [500 500 1200 500])
  479. %figure('Position', [900 500 1500 500])
  480. a = shadedErrorBar([], group_avg_online_tar_PMC_epoch, group_sem_online_tar_PMC_epoch, 'lineprops', {'color', [0, 0, 1]}, 'patchSaturation', 0.08);
  481. hold on
  482. b = shadedErrorBar([], group_avg_online_nontar_daIC_epoch, group_sem_online_nontar_daIC_epoch, 'lineprops', {'color',[1, 0, 0]}, 'patchSaturation', 0.08);
  483. c = shadedErrorBar([], group_avg_offline_tar_PMC_epoch, group_sem_offline_tar_PMC_epoch, 'lineprops', {'color',[0, 0, 0.6]}, 'patchSaturation', 0.08);
  484. d = shadedErrorBar([], group_avg_offline_nontar_daIC_epoch, group_sem_offline_nontar_daIC_epoch, 'lineprops', {'color',[0.6, 0, 0]}, 'patchSaturation', 0.08);
  485. set(a.edge, 'LineWidth', 2, 'LineStyle', ':')
  486. a.mainLine.LineWidth = 4;
  487. set(b.edge, 'LineWidth', 2, 'LineStyle', ':')
  488. b.mainLine.LineWidth = 4;
  489. set(c.edge, 'LineWidth', 2, 'LineStyle', ':')
  490. c.mainLine.LineWidth = 4;
  491. set(d.edge, 'LineWidth', 2, 'LineStyle', ':')
  492. d.mainLine.LineWidth = 4;
  493. xline(epoch_range+1, '_', {'Trial Onset'}, 'LabelVerticalAlignment', 'bottom', 'LabelHorizontalAlignment','center','FontSize', 18, 'LineWidth', 2)
  494. xlabel('Time (seconds)', 'FontSize', 32)
  495. xticks([1:17])
  496. xticklabels({'-16','-14','-12','-10', '-8', '-6', '-4', '-2', '0', '2', '4', '6', '8', '10', '12','14','16'})
  497. ax=gca;
  498. ax.XAxis.FontSize = 28;
  499. ylim([-1 1]);
  500. yticks(-1:0.5:1)
  501. ylabel('BOLD Activity (z)', 'FontSize', 32)
  502. ax.YAxis.FontSize = 28;
  503. subj_nums = [];
  504. for i=1:length(subs)
  505. n = str2double(extractAfter(subs(i), "sub-"));
  506. subj_nums= [subj_nums; n];
  507. end
  508. legend({'Real-time PMC Activity (Target)',...
  509. ['Real-time daIC Activity (Non-target; n=' num2str(sum(~(subj_nums<20))) ')'],...
  510. 'Offline PMC Activity (Target)',...
  511. 'Offline daIC Activity (Non-target)'}, ...
  512. 'FontSize', 20, 'Location', 'best');
  513. title('Validation of PMC Trigger Events', 'FontSize', 30);
  514. print('-opengl', '-dpng','-r350',[savepath_group filesep 'group_n' num2str(length(subj_nums)) '_PMCtrial_offline-online_plot.png']);
  515. hold off
  516. end

offlineonlineplots.m, no license · at the source

Overview

Authors: Tiara Bounyarith1, David Braun1, Aaron Kucyi1
  1. Department of Psychological & Brain Sciences, Drexel University, Philadelphia, PA, United States
Institutions: Drexel University (United States)
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1268
Dates: received 8 May 2026; accepted 9 May 2026; published online 8 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1268 · PMID 42272744 · PMCID PMC13248897 · OpenAlex W7161825659
Open access: diamond, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: fMRI (modality), human (organism)
Methods: Statistics, fMRI & imaging, Smoothing, state filtering, decompositions
Keywords: real-time fMRI, experience sampling, spontaneous thought, mental health, default mode network, salience network
Topic: Mind wandering and attention (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Institute of Mental Health (R21 MH129630); national science foundation graduate research fellowship program
Citations: not cited yet (Europe PMC); 93 references in the paper

Abstract

Much of a typical individual’s mental life is characterized by spontaneous thoughts that occur independently of external stimuli. In prior studies, ongoing mental experiences and their neural correlates have been captured using thought probes presented at random intervals during functional magnetic resonance imaging (fMRI). However, this approach results in temporally imprecise estimates of brain activity relative to the arising of mental experience. In this preregistered, proof-of-concept study, we aimed to improve temporal precision using a novel method termed real-time fMRI-triggered experience sampling (rt-fMRI-ES). We analyzed blood-oxygenation level-dependent signals in real time during a wakeful resting state (n = 60) to trigger thought probes from spontaneous activations within two regions: the dorsal anterior insular cortex (daIC; a key region within salience network) and posteromedial cortex (PMC; a key region within default mode network). We tested two preregistered hypotheses: (H1) Ratings of arousal time-locked to daIC-activation trials are higher than ratings time-locked to non-daIC-activation trials; (H2) Ratings of external attention time locked to PMC-activation trials are lower than ratings time-locked to non-PMC-activation trials. After applying preregistered exclusion criteria, 42 participants (1243 trials) and 49 participants (1429 trials) were included in H1 and H2 analyses, respectively. We did not find evidence in support of H1, but we did find evidence in support of H2, as external-attention ratings were significantly lower for trials triggered by PMC activation than other trial types. Taken together, we successfully developed and validated the rt-fMRI-ES method, offering a novel technique to efficiently capture spontaneous thoughts based on ongoing neural activity. Preregistered Stage 1 Recommendation: https://osf.io/sd4hu (Date of in-principle acceptance: July 24, 2024).

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

Repositories

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

DynamicBrainMind/rtfMRI_prep

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 0cbac2e31b941c916ef587cabd015d5a101ccfa0, 18 June 2025
Languages: Python (3), MATLAB (1)
Size: 1,431 files, 4 scripts
Software Heritage: not archived
Found in: the text, “Functional localizer analysis (rtfMRI-prep)”
Holds: README, tests
Not found: license file, CITATION.cff, environment file, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
5 files

OSF as2q9

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: MATLAB (3), R (2)
Size: 15 files, 5 scripts
Software Heritage: not checked
Found in: “Data and Code Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: emmeans (1 file), ggplot2 (1 file), lme4 (1 file), lmerTest (1 file), patchwork (1 file), shadedErrorBar (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
5 files
At the source: osf.io/as2q9/overview

The paper's code and data availability statement is in the Data section.

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 9 scripts, each with its path and the digest of its content;
  • 5 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 and Code Availability

In accordance with requirements set by the project sponsor, all study raw data will be available through the online National Institutes of Mental Health Data Archive (NDA), DOI: https://dx.doi.org/10.15154/5aka-y257. Code and data used for analysis and visualization are available on OSF, https://osf.io/as2q9/overview.

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 2, 28 September 2026

  • Funding: added National Institute of Mental Health: R21 MH129630; National Science Foundation Graduate Research Fellowship Program

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 3 authors, 6 keywords, 91 references.

Cite

This paper

Bounyarith, T., Braun, D., & Kucyi, A. (2026). Real-time fMRI-triggered experience sampling: A proof-of-concept study. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1268. https://doi.org/10.1162/imag.a.1268

BibTeX

@article{bounyarith2026real,
author = {Bounyarith, Tiara and Braun, David and Kucyi, Aaron},
title = {{Real-time fMRI-triggered experience sampling: A proof-of-concept study}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = jun,
volume = {4},
pages = {IMAG.a.1268},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1268},
url = {https://doi.org/10.1162/imag.a.1268},
pmid = {42272744},
pmcid = {PMC13248897}
}

RIS

TY - JOUR
AU - Bounyarith, Tiara
AU - Braun, David
AU - Kucyi, Aaron
TI - Real-time fMRI-triggered experience sampling: A proof-of-concept study
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/06/08
VL - 4
SP - IMAG.a.1268
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1268
UR - https://doi.org/10.1162/imag.a.1268
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1268",
"type": "article-journal",
"title": "Real-time fMRI-triggered experience sampling: A proof-of-concept study",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Bounyarith",
"given": "Tiara"
},
{
"family": "Braun",
"given": "David"
},
{
"family": "Kucyi",
"given": "Aaron"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1268",
"DOI": "10.1162/imag.a.1268",
"PMID": "42272744",
"PMCID": "PMC13248897",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1268",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
8
]
]
}
}

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.1162/netn_a_00387 [code]
Individual variability in neural representations of mind-wandering.
Journal: Network neuroscience (Cambridge, Mass.)
In common: Statistics and Machine Learning Toolbox, NumPy, fMRI, 22 references, 2 authors
[2] doi:10.1016/j.isci.2025.113755 [code]
Mapping content and dynamics in the stream of consciousness through latent brain state analysis.
Journal: iScience
In common: NumPy, 14 references
[3] doi:10.1073/pnas.2520822123 [code]
Uncovering the embodied dimension of the wandering mind.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: patchwork, ggplot2, tidyverse, 2 other tools, 11 references
[4] doi:10.1016/j.neuroimage.2022.118890 [code]
Predicting response time variability from task and resting-state functional connectivity in the aging brain.
Journal: NeuroImage
In common: Statistics and Machine Learning Toolbox, NumPy, fMRI, 12 references
[5] doi:10.1038/s41467-026-74331-2 [code]
Trial-by-trial fMRI-neurofeedback dissociates fusiform and occipital contributions to face detection and recognition.
Journal: Nature communications
In common: shadedErrorBar, emmeans, lmerTest, 6 other tools, fMRI, 3 references
[6] doi:10.1038/s41598-023-48857-0 [code]
Experience sampling reveals the role that covert goal states play in task-relevant behavior.
Journal: Scientific reports
In common: emmeans, lmerTest, lme4, 4 other tools, 6 references
[7] doi:10.1186/s12888-023-05223-8 [code]
Mindfulness-based real-time fMRI neurofeedback: a randomized controlled trial to optimize dosing for depressed adolescents.
Journal: BMC psychiatry
In common: emmeans, lmerTest, lme4, 4 other tools, fMRI, 6 references
[8] doi:10.1162/imag.a.20 [code]
Electrophysiological signatures of ongoing thoughts during naturalistic behavior.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: shadedErrorBar, lmerTest, lme4, 3 other tools, 5 references
[9] doi:10.1093/cercor/bhab494 [code]
Catching wandering minds with tapping fingers: neural and behavioral insights into task-unrelated cognition.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: NumPy, fMRI, 10 references
[10] doi:10.7554/elife.93689 [code]
Macro-scale patterns in functional connectivity associated with ongoing thought patterns and dispositional traits.
Journal: eLife
In common: ggplot2, tidyverse, Statistics and Machine Learning Toolbox, 1 other tool, fMRI, 9 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1162/imag.a.1268.svg)](https://openscicode.org/badge/doi/10.1162/imag.a.1268)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1162/imag.a.1268.svg
   :target: https://openscicode.org/badge/doi/10.1162/imag.a.1268
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1162/imag.a.1268"><img src="https://openscicode.org/badge/doi/10.1162/imag.a.1268.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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