OSCR

Corticothalamic dynamics during postictal recovery of self-orientation after electroconvulsive therapy.

Code ↔ Paper

1 match 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 1 match
  1. [1] § Materials and methods › Model parameter estimation ↔ +bt_utils/head_imager.m, lines 105–170 · score 0.63 · power spectral densities, power spectrum, baseline, electrode

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 · 252 lines · 5.8 KB · BSD-2-Clause · 1 match

  1. function p_smoothed = head_imager(varargin)
  2. % Possible usage
  3. % head_imager(x,y,P)
  4. % head_imager(x,y,P,label)
  5. % head_imager(x,y,f,P) % For an explorer
  6. % head_imager(x,y,f,P,label)
  7. % head_imager(x,y,f,P,label,f_secondary,P_secondary)
  8. smooth_hf = false;
  9. plot_secondary = false;
  10. if nargin < 4 || (nargin == 4 && (isempty(varargin{4}) || iscell(varargin{4})))
  11. explorer_mode = false;
  12. else
  13. explorer_mode = true;
  14. end
  15. if ~explorer_mode && nargin < 4
  16. label = [];
  17. end
  18. x = varargin{1};
  19. y = varargin{2};
  20. if ~explorer_mode
  21. P = varargin{3};
  22. if nargin < 4
  23. label = [];
  24. else
  25. label = varargin{4};
  26. end
  27. else
  28. f = varargin{3};
  29. P = varargin{4};
  30. if nargin >= 5
  31. label = varargin{5};
  32. else
  33. label = [];
  34. end
  35. if nargin > 5
  36. plot_secondary = true;
  37. f_secondary = varargin{6};
  38. P_secondary = varargin{7};
  39. assert(size(P,1)==size(P_secondary,1) && size(P,2)==size(P_secondary,2));
  40. end
  41. end
  42. if ~explorer_mode && (size(P,3) > 1 || numel(P)~=numel(x))
  43. error('Must provide frequencies if frequency-dependent power is specified');
  44. end
  45. Lx = 0.5;
  46. Ly = 0.5;
  47. x1 = x-Lx/2;
  48. y1 = y-Ly/2;
  49. x = x(:);
  50. y = y(:);
  51. rmax = bt.data.electrode_positions()/2; % Special mode to set head radius
  52. valid = sqrt((x1(:).^2+y1(:).^2))<rmax; % These are the only electrodes to include
  53. [xg,yg] = meshgrid(linspace(0,Lx,40),linspace(0,Ly,40)); % Grid for background colors
  54. x = x(valid);
  55. y = y(valid);
  56. P = reshape_validate(P,valid,explorer_mode);
  57. if plot_secondary
  58. P_secondary = reshape_validate(P_secondary,valid,explorer_mode);
  59. end
  60. if explorer_mode && smooth_hf
  61. f_filt = f > 25; % Set this to 5 to smooth the alpha peak and ensure that the frequencies don't change
  62. % THIS IS WORKING CODE FOR INDEPENDENT SMOOTHING
  63. % for j = 1:size(P,2)
  64. % P(f_filt,j) =smooth(P(f_filt,j),10);
  65. % end
  66. % if plot_secondary
  67. % f_filt = f_secondary > 25;
  68. % for j = 1:size(P,2)
  69. % P_secondary(f_filt,j) =smooth(P_secondary(f_filt,j),10);
  70. % end
  71. % end
  72. % 3D GRID INTERPOLATION - SMOOTHING IN SPACE AND FREQUENCY
  73. pp = P(f_filt,:);
  74. xp = repmat(x(:)',size(pp,1),1);
  75. yp = repmat(y(:)',size(pp,1),1);
  76. fp = repmat(f(f_filt),1,size(pp,2));
  77. fl = linspace(fp(1,1),fp(end,1),50).';
  78. fl = f(f_filt);
  79. [xp1,yp1,fp1] = meshgrid(xg(1,:),yg(:,1),fl);
  80. %pp1 = griddata(xp(:),yp(:),fp(:),pp(:),xp1,yp1,fp1);
  81. pp_spec = scatteredInterpolant(xp(:),yp(:),fp(:),pp(:));
  82. pp1 = pp_spec(xp1,yp1,fp1);
  83. pp1a = smooth3(pp1,'box',[5 5 5]);
  84. % DIAGNOSTIC PLOT SHOWING SMOOTHED SURFACE
  85. % figure
  86. % idx = 20;
  87. % f_test = fp(idx,1);
  88. % [~,idx2] = min(abs(fl-f_test));
  89. % f_test
  90. % fl(idx2)
  91. % surf(xp1(:,:,20),yp1(:,:,20),pp1a(:,:,20))
  92. % hold on
  93. % P2 = P(f_filt,:);
  94. % scatter3(x,y,P2(20,:),'ro')
  95. pp2 = griddata(xp1(:),yp1(:),fp1(:),pp1a(:),xp,yp,fp);
  96. P(f_filt,:) = pp2;
  97. end
  98. p_smoothed = P;
  99. figure
  100. if explorer_mode % Do the initialization and all that jazz
  101. subplot(1,2,1);
  102. end
  103. img = imagesc([min(xg(:)) max(xg(:))],[min(yg(:)) max(yg(:))],zeros(size(xg)));
  104. hold on
  105. utils.draw_head(rmax,0.4,[Lx/2 Ly/2])
  106. draw_electrodes(x,y,label)
  107. axis equal
  108. set(gca,'XLim',[0 0.5],'YLim',[0 0.5])
  109. colorbar('SouthOutside')
  110. img.HitTest = 'off';
  111. title('Spatial power distribution')
  112. xlabel('X (m)');
  113. ylabel('Y (m)');
  114. hold off
  115. if explorer_mode % Do the initialization and all that jazz
  116. ax_1 = gca;
  117. hold on
  118. elec_marker = scatter(x(1),y(1),'ro','hittest','off');
  119. hold off
  120. subplot(1,2,2);
  121. ax_2 = gca;
  122. spec = loglog(f,squeeze(P(:,1)));
  123. spec.HitTest = 'off';
  124. ax_2.XLim = [1 45];
  125. ax_2.YLim = [min(P(:)) max(P(:))];
  126. fb = ax_2.XBaseline;
  127. fb.Color = 'r';
  128. fb.BaseValue = 0;
  129. fb.Visible = 'on';
  130. title('Power spectrum')
  131. xlabel('Frequency (Hz)')
  132. ylabel('Power spectral density')
  133. if plot_secondary
  134. hold on
  135. spec_secondary = loglog(f_secondary,squeeze(P_secondary(:,1)),'r--');
  136. spec_secondary.HitTest = 'off';
  137. end
  138. set(ax_1,'ButtonDownFcn', @(a,b) update_spec(b) )
  139. set(ax_2,'ButtonDownFcn', @(a,b) update_map(b) )
  140. else
  141. [Xi,Yi,Zi] = griddata(x,y,P,xg,yg,'cubic');
  142. img.CData = Zi;
  143. end
  144. function update_spec(b)
  145. click_value = b.IntersectionPoint(1:2);
  146. [~,idx] = min((sum(bsxfun(@minus,[x(:) y(:)],click_value).^2,2)));
  147. spec.YData = P(:,idx); % ... so they are reversed here into (row,col) = (y,x)
  148. if plot_secondary
  149. spec_secondary.YData = P_secondary(:,idx);
  150. end
  151. elec_marker.XData = x(idx);
  152. elec_marker.YData = y(idx);
  153. end
  154. function update_map(b)
  155. f_click = b.IntersectionPoint(1);
  156. [~,f_idx] = min(abs(f-f_click));
  157. fb.BaseValue = f(f_idx);
  158. cdata = P(f_idx,:);
  159. xt = x;
  160. yt = y;
  161. if length(unique(x))==1
  162. xt = [xt(:)-0.05; xt(:)+0.05];
  163. yt = [yt(:); yt(:)];
  164. cdata = [cdata(:); cdata(:)];
  165. end
  166. if length(unique(yt)) == 1
  167. yt = [yt(:)-0.05; yt(:)+0.05];
  168. xt = [xt(:); xt(:)];
  169. cdata = [cdata(:); cdata(:)];
  170. end
  171. [~,~,Zi] = griddata(xt,yt,cdata(:),xg,yg,'cubic');
  172. img.CData = Zi;
  173. img.AlphaData = isfinite(Zi);
  174. ax_1.CLim = [min(cdata(:)) max(cdata(:))];
  175. end
  176. end
  177. function P2 = reshape_validate(P,valid,explorer_mode)
  178. if explorer_mode % 2D output
  179. if length(size(P)) == 2 % The first dimension is frequency
  180. P2 = zeros(size(P,1),sum(valid));
  181. else
  182. P2 = zeros(size(P,3),sum(valid));
  183. end
  184. else % 1D output
  185. P2 = zeros(sum(valid),1);
  186. end
  187. count = 1;
  188. for j = 1:length(valid)
  189. if valid(j)
  190. if explorer_mode && length(size(P)) == 2 % 2D output, and it is frequency dependent
  191. P2(:,count) = P(:,j);
  192. elseif explorer_mode % 3D output, remap array indexes
  193. [a,b] = ind2sub([size(P,1) size(P,2)],j);
  194. P2(:,count) = P(a,b,:);
  195. else % 1D output
  196. P2(count) = P(j);
  197. end
  198. count = count + 1;
  199. end
  200. end
  201. end
  202. function draw_electrodes(x,y,label)
  203. scatter(x,y,'HitTest','off')
  204. if ~isempty(label)
  205. for j = 1:length(label)
  206. text(x(j),y(j)-0.007,label{j},'HorizontalAlignment','center','VerticalAlignment','middle','FontSize',8,'hittest','off')
  207. end
  208. end
  209. end

head_imager.m at commit 1681a89, under BSD-2-Clause · at the source

Overview

Authors: Sven Stuiver1,2, Prejaas K B Tewarie3, Julia C M Pottkämper2,4, Joey P A J Verdijk1,4, Jeannette Hofmeijer1,5, Guido A van Wingen4, Michel J A M van Putten1,6, Jeroen A van Waarde2
  1. Technical Medical Centre, University of Twente, Enschede 7522 NH, The Netherlands
  2. Department of Psychiatry, Rijnstate Hospital, Arnhem 6815 Ad, The Netherlands
  3. CERVO Brain Research Centre, University of Laval, Québec City, Canada G1J 2G3
  4. Department of Psychiatry, Amsterdam UMC Location AMC, Amsterdam 1105 AZ, The Netherlands
  5. Department of Neurology, Rijnstate Hospital, Arnhem 6815 Ad, The Netherlands
  6. Department of Neurology and Clinical Neurophysiology, Medisch Spectrum Twente, Enschede 7512 KZ, The Netherlands
Journal: Brain communications, volume 8, issue 3, article fcag144
Dates: received 3 November 2025; accepted 21 April 2026; published online 22 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/braincomms/fcag144 · PMID 42109688 · PMCID PMC13152015 · OpenAlex W7155203707
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism), clinical / translational (subfield)
Methods: Spectral & time-frequency, Statistics, Single-unit activity, calcium imaging
Keywords: EEG, postictal state, corticothalamic model, consciousness, self-orientation
Topic: Electroconvulsive Therapy Studies (Psychiatry and Mental health, Medicine), according to OpenAlex
Funding: Epilepsiefonds; EpilepsieNL (WAR 19-02)
Citations: cited by 1 paper (Europe PMC); 40 references in the paper

Abstract

The mechanisms underlying recovery of consciousness after its transient loss remain incompletely understood. Electroconvulsive therapy (ECT) induced generalized seizures disrupt responsiveness and orientation—key functional dimensions related to consciousness—and are followed by a stereotyped postictal state of temporary unresponsiveness, offering a unique model to study the dynamics of connected, report-capable cognition in humans. We performed a post hoc analysis of prospectively collected data from a randomized controlled trial, comprising 345 continuous postictal electroencephalography (EEG) recordings of up to 1 h from 33 patients (median age 53 years, interquartile range 21.3 years; n = 19 [56%] female) undergoing a course of ECT. Using a corticothalamic mean-field model, we estimated cortical (X), corticothalamic loop (Y) and intrathalamic (Z) gain parameters that quantify the responsiveness of cortical and thalamic populations to synaptic input. We examined whether recovery of self-orientation, indexed by the time to reorientation in person, was associated with specific parameter regimes. Immediately after seizure termination, cortical gain was elevated, the corticothalamic loop gain was negative and intrathalamic gain was near zero—suggesting that the thalamus exerted a suppressive effect on the cortex while exhibiting minimal intrinsic activity. Bayesian mixed-effects models showed that during postictal recovery cortical gain × decreased (β = −0.11, CrI95 = [−0.16, −0.07]), while corticothalamic loop gain Y (β = 0.05, CrI95 = [0.02, 0.07]) as well as intrathalamic gain Z (β = 0.05, CrI95 = [0.02, 0.08]) increased, reflecting progressive restoration of thalamic excitatory drive. Across patients and ECT sessions, recovery of self-orientation occurred when model parameters approached towards a characteristic regime, i.e. βX = 0.81 (CrI95 = [0.74, 0.88]), βY = −0.11 (CrI95 = [−0.16, −0.07]) and βZ = 0.01 (CrI95 = [−0.04, 0.05]), for cortical, corticothalamic loop and intrathalamic gains, respectively. No associations were found between model parameters at which self-orientation was regained and reorientation time, showing relatively small inter-subject variability (sdX = 0.04, sdY = 0.03 and sdZ = 0.02), suggesting that these values were consistent across patients. To conclude, these findings suggest that restoration of effective corticothalamic coupling represents a critical regime for the re-emergence of self-orientation and reportable responsiveness following postictal unresponsiveness. Our results provide time-resolved modelling of human thalamocortical circuit dynamics during postictal recovery, offering mechanistic insight into how large-scale neural interactions reorganize to restore self-orientation during the postictal state.

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 1 match between paragraphs and lines of code.

BrainDynamicsUSYD/braintrak

License: BSD-2-Clause
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 1681a892c8635e31bdf6463e81d0460768068bf2, 18 April 2018
Languages: MATLAB (90)
Size: 124 files, 90 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, license file, documentation
Not found: CITATION.cff, environment file, tests, continuous integration
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
92 files

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 90 scripts, each with its path and the digest of its content;
  • 1 match 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

Raw data were generated at Rijnstate. Derived and anonymized data supporting the findings of this study are available from the corresponding author on request.

The code for the parameter estimation method can be found on https://github.com/BrainDynamicsUSYD/braintrak.

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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 5 keywords, 2 funders, 31 references.

Cite

This paper

Stuiver, S., Tewarie, P. K. B., Pottkämper, J. C. M., Verdijk, J. P. A. J., Hofmeijer, J., van Wingen, G. A., van Putten, M. J. A. M., & van Waarde, J. A. (2026). Corticothalamic dynamics during postictal recovery of self-orientation after electroconvulsive therapy. Brain communications, 8(3), fcag144. https://doi.org/10.1093/braincomms/fcag144

BibTeX

@article{stuiver2026corticothalamic,
author = {Stuiver, Sven and Tewarie, Prejaas K B and Pottkämper, Julia C M and Verdijk, Joey P A J and Hofmeijer, Jeannette and van Wingen, Guido A and van Putten, Michel J A M and van Waarde, Jeroen A},
title = {{Corticothalamic dynamics during postictal recovery of self-orientation after electroconvulsive therapy}},
journal = {Brain communications},
year = {2026},
month = apr,
volume = {8},
number = {3},
pages = {fcag144},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/braincomms/fcag144},
url = {https://doi.org/10.1093/braincomms/fcag144},
pmid = {42109688},
pmcid = {PMC13152015}
}

RIS

TY - JOUR
AU - Stuiver, Sven
AU - Tewarie, Prejaas K B
AU - Pottkämper, Julia C M
AU - Verdijk, Joey P A J
AU - Hofmeijer, Jeannette
AU - van Wingen, Guido A
AU - van Putten, Michel J A M
AU - van Waarde, Jeroen A
TI - Corticothalamic dynamics during postictal recovery of self-orientation after electroconvulsive therapy
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/04/22
VL - 8
IS - 3
SP - fcag144
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/braincomms/fcag144
UR - https://doi.org/10.1093/braincomms/fcag144
LA - en
ER -

CSL-JSON

{
"id": "10.1093/braincomms/fcag144",
"type": "article-journal",
"title": "Corticothalamic dynamics during postictal recovery of self-orientation after electroconvulsive therapy",
"container-title": "Brain communications",
"author": [
{
"family": "Stuiver",
"given": "Sven"
},
{
"family": "Tewarie",
"given": "Prejaas K B"
},
{
"family": "Pottkämper",
"given": "Julia C M"
},
{
"family": "Verdijk",
"given": "Joey P A J"
},
{
"family": "Hofmeijer",
"given": "Jeannette"
},
{
"family": "van Wingen",
"given": "Guido A"
},
{
"family": "van Putten",
"given": "Michel J A M"
},
{
"family": "van Waarde",
"given": "Jeroen A"
}
],
"container-title-short": "Brain Commun",
"volume": "8",
"issue": "3",
"page": "fcag144",
"DOI": "10.1093/braincomms/fcag144",
"PMID": "42109688",
"PMCID": "PMC13152015",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/braincomms/fcag144",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
22
]
]
}
}

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.1111/ejn.70604 [code]
The Role of the Glutamate-Glutamine Cycle in Synaptic Transmission During Ischemia and Recovery.
Journal: The European journal of neuroscience
In common: 1 reference, author Michel J A M van Putten
[2] doi:10.1038/s41598-026-40684-3
Escape behaviors are transiently modulated after acutely induced epileptic seizures in larval zebrafish.
Journal: Scientific reports
In common: clinical / translational, 3 references
[3] doi:10.1093/braincomms/fcag323 [code]
Induced epileptic seizures in larval zebrafish reveal a synaptic modulation associated with the post-ictal state.
Journal: Brain communications
In common: Parallel Computing Toolbox, 2 references
[4] doi:10.1016/j.celrep.2026.117782 [code]
Thermodynamics of consciousness: Non-equilibrium brain dynamics track conscious states.
Journal: Cell reports
In common: Statistics and Machine Learning Toolbox, EEG, 2 references
[5] doi:10.1038/s41467-026-74099-5 [code]
Right amygdala ablation reduces maladaptive negative interpretation bias and symptoms in a patient with post-traumatic stress disorder.
Journal: Nature communications
In common: Parallel Computing Toolbox, Statistics and Machine Learning Toolbox, EEG, clinical / translational
[6] doi:10.1093/nc/niag043 [code]
Demographics-robust spontaneous eye blinking slowing in patients with severe acquired brain injury.
Journal: Neuroscience of consciousness
In common: clinical / translational, 2 references
[7] doi:10.1093/brain/awaf412 [code]
Multimodal multicentre investigation of diagnostic and prognostic markers in disorders of consciousness.
Journal: Brain : a journal of neurology
In common: EEG, 2 references
[8] doi:10.1038/s41467-026-73878-4 [code]
Neural Response to Familiar Names Predicts Outcome of Comatose ICU Patients: A Prospective Observational Cohort Study.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, EEG, clinical / translational, 1 reference
[9] doi:10.1371/journal.pone.0358552 [code]
High-frequency stimulation-induced secondary hyperalgesia shifts temporal order judgment and increases precuneus nodal degree in healthy adults.
Journal: PloS one
In common: Parallel Computing Toolbox, Statistics and Machine Learning Toolbox, EEG
[10] doi:10.1162/imag.a.1332 [code]
Decision processes underlying effort avoidance and their relationship with metacognition.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Parallel Computing Toolbox, Statistics and Machine Learning Toolbox, EEG

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.