OSCR

Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing.

Code ↔ Paper

7 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 7 matches · 6 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › EEG Power Extraction and Correlation With Arousal Measures ↔ Code/compute_brain_arousal_covariance.m, the whole file · a weak match · score 0.98 · Gaussian smoothing, Hann window, dot product, mathematically equivalent, Log Transformation, arousal trend
  2. [2] § Methods › Statistical Analysis ↔ Code/cluster_permutation_test_oneSample.m, the whole file · a weak match · score 0.91 · empirical cluster mass, maximum cluster mass, adjacent channels, Spatial clusters, spatial adjacency, flipped
  3. [3] § Methods › Statistical Analysis ↔ Code/cluster_perm_RSvsMV.py, lines 41–120 · score 0.85 · empirical cluster mass, randomly flipped, error rate, maximum cluster mass, FWER, family
  4. [4] § Methods › Source Localization ↔ Code/compute_brain_arousal_covariance.m, the whole file · a weak match · score 0.79 · Desikan Killiany atlas, anatomical parcel, anatomical regions, brain, EEG, signal
  5. [5] § Methods › ISC ↔ Code/compute_isc_permutation.m, the whole file · a weak match · score 0.78 · shifting permutation, Pearson correlation, autocorrelation, circular, pairwise, ISC
  6. [6] § Methods › EEG Power Extraction and Correlation With Arousal Measures ↔ Code/compute_isc_permutation.m, the whole file · a weak match · score 0.59 · standard deviation, Pearson correlation, variance, temporal, vectors, transformation
  7. [7] § Methods › Spectral Decomposition and Parametrization › Derived Spectral Metrics ↔ Code/cluster_permutation_test_oneSample.m, the whole file · a weak match · score 0.56 · cluster statistic, uncorrected, permuting, permutation, sum, absolute

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 · 146 lines · 6.2 KB · no license · 2 matches

  1. function wCov = compute_brain_arousal_covariance(brain_data, arousal_ts, subject_id, IAF_tab, numEpochs, Fs)
  2. % Written by Magdalena Camenzind, PhD
  3. % Inquiries to [email hidden]
  4. %
  5. % Site: University of North Carolina at Chapel Hill
  6. % Lab: Frohlich Lab, www.frohlichlab.org
  7. % COMPUTE_BRAIN_AROUSAL_COVARIANCE
  8. % Computes the covariance (Pearson's r) between continuous neural spectral power
  9. % and an external arousal timeseries (e.g., pupil dilation or subjective ratings).
  10. %
  11. % This function is agnostic to the spatial domain: the input can be sensor-level
  12. % EEG channels or source-level anatomical regions (e.g., from the Desikan-Killiany atlas).
  13. % It segments the data, computes the Power Spectral Density (PSD) for each epoch,
  14. % extracts low-frequency bands (delta, theta, and individualized low-alpha),
  15. % and calculates the temporal covariance with the arousal signal.
  16. %
  17. % =========================================================================
  18. % INPUTS:
  19. % brain_data - 2D numeric matrix [n_regions x time_samples] for one participant.
  20. % (e.g., 61 channels or 68 cortical parcels).
  21. % arousal_ts - 1D numeric array containing the continuous arousal signal.
  22. % (Must be the same length as numEpochs, e.g., 1200).
  23. % subject_id - Numeric ID of the participant (to look up in IAF_tab).
  24. % IAF_tab - Table loaded from 'foofed_IAF_data2.xlsx' containing columns
  25. % for 'ID' and 'IAF'.
  26. % numEpochs - Integer defining the number of epochs to split the data into (e.g., 1200).
  27. % Fs - Sampling frequency of the neural data in Hz (e.g., 200).
  28. %
  29. % OUTPUTS:
  30. % wCov - A struct containing the [n_regions x 1] covariance matrices
  31. % for the requested frequency bands: .delta, .theta, .lalpha.
  32. % *Note: Because both timeseries are ultimately z-scored, this
  33. % covariance is mathematically equivalent to Pearson's correlation (r).
  34. % =========================================================================
  35. %% 1. Preprocess the Arousal Timeseries
  36. % Ensure the arousal signal is a row vector, detrended, and z-scored
  37. arousal_ts = arousal_ts(:)';
  38. if length(arousal_ts) ~= numEpochs
  39. error('The length of arousal_ts (%d) must match numEpochs (%d).', length(arousal_ts), numEpochs);
  40. end
  41. arousal_det = detrend(arousal_ts);
  42. arousal_z = zscore(arousal_det);
  43. %% 2. Look up Individual Alpha Frequency (IAF)
  44. rowIdx = IAF_tab.ID == subject_id;
  45. if ~any(rowIdx)
  46. error('Subject ID %d not found in the provided IAF table.', subject_id);
  47. end
  48. % Extract and round the IAF value to the nearest 0.5 Hz
  49. IAF_val = IAF_tab.IAF(rowIdx);
  50. IAF_val = round(IAF_val * 2) / 2;
  51. % Define ONLY individualized low-alpha bounds
  52. lb_alpha = IAF_val - 1;
  53. lb_alpha_target = [lb_alpha, IAF_val];
  54. %% 3. Initialize Variables
  55. n_regions = size(brain_data, 1);
  56. % Output structures (restricted to low frequencies)
  57. wCov.lalpha = zeros(n_regions, 1);
  58. wCov.theta = zeros(n_regions, 1);
  59. wCov.delta = zeros(n_regions, 1);
  60. % Frequencies of interest for pwelch
  61. foi = 1:0.5:30;
  62. winSize = Fs; % Window size (1 second)
  63. win = hann(winSize); % Hann window
  64. %% 4. Region Loop (Channels or Anatomical Parcels)
  65. for areaIdx = 1:n_regions
  66. roi_Data = brain_data(areaIdx, :);
  67. % --- Epoching Logic ---
  68. epochLength = floor(length(roi_Data) / numEpochs);
  69. remainder = mod(length(roi_Data), numEpochs);
  70. epochs = cell(1, numEpochs);
  71. startIndex = 1;
  72. for i = 1:numEpochs
  73. if i <= remainder
  74. endIndex = startIndex + epochLength;
  75. else
  76. endIndex = startIndex + epochLength - 1;
  77. end
  78. epochs{i} = roi_Data(startIndex:endIndex);
  79. startIndex = endIndex + 1;
  80. end
  81. % --- Preallocate band power arrays ---
  82. lalpha_vals = zeros(1, numEpochs);
  83. theta_vals = zeros(1, numEpochs);
  84. delta_vals = zeros(1, numEpochs);
  85. % --- Compute PSD for each epoch ---
  86. for k = 1:numEpochs
  87. dat_ep = epochs{k};
  88. % Compute Power Spectral Density
  89. [pxx, ~] = pwelch(detrend(dat_ep'), win, [], foi, Fs);
  90. % Extract Frequency Bands
  91. [~, lb_alpha_idx] = min(abs(foi - lb_alpha_target'), [], 2);
  92. lalpha_pw = pxx(lb_alpha_idx(1):lb_alpha_idx(2));
  93. theta_idx = find(foi > 3.5 & foi < 7.5);
  94. theta_pw = pxx(theta_idx);
  95. delta_idx = find(foi > 1.5 & foi < 4.5);
  96. delta_pw = pxx(delta_idx);
  97. % Average power within the band for this epoch
  98. lalpha_vals(k) = mean(lalpha_pw);
  99. theta_vals(k) = mean(theta_pw);
  100. delta_vals(k) = mean(delta_pw);
  101. end
  102. % --- Signal Post-Processing ---
  103. % 1. Log-transform (normalizes the highly skewed power distribution)
  104. log_delta = log10(delta_vals + eps);
  105. log_theta = log10(theta_vals + eps);
  106. log_lalpha = log10(lalpha_vals + eps);
  107. % 2. Gaussian Smoothing (recovers the slow "Arousal Trend" across the narrative)
  108. smooth_log_delta = smoothdata(log_delta, 'gaussian', 40);
  109. smooth_log_theta = smoothdata(log_theta, 'gaussian', 40);
  110. smooth_log_lalpha = smoothdata(log_lalpha, 'gaussian', 40);
  111. % 3. Z-score (standardizes variance to prepare for correlation)
  112. z_delta = zscore(smooth_log_delta);
  113. z_theta = zscore(smooth_log_theta);
  114. z_lalpha = zscore(smooth_log_lalpha);
  115. % --- Calculate Covariance (Pearson's r) ---
  116. % Dividing the dot product of two z-scored vectors by (N-1) yields Pearson's r.
  117. N_minus_1 = numEpochs - 1;
  118. wCov.lalpha(areaIdx) = sum(z_lalpha .* arousal_z) / N_minus_1;
  119. wCov.theta(areaIdx) = sum(z_theta .* arousal_z) / N_minus_1;
  120. wCov.delta(areaIdx) = sum(z_delta .* arousal_z) / N_minus_1;
  121. end
  122. end

compute_brain_arousal_covariance.m, no license · at the source

Overview

Authors: Magdalena Camenzind1,2, Melanni Nanni‐Zepeda1,2, Anna P. Giron3,4, Konrad Dapper5,6,7, Michael Esterman8,9, Flavio Frohlich1,2, Agnieszka Zuberer1,2,9
  1. Department of Psychiatry University of North Carolina at Chapel Hill Chapel Hill North Carolina USA
  2. Carolina Center for Neurostimulation University of North Carolina at Chapel Hill Chapel Hill North Carolina USA
  3. Department of Psychiatry and Psychotherapy, Tübingen Center for Mental Health (TüCMH), University of Tübingen Tübingen Germany
  4. German Center for Mental Health (DZPG), partner site Tübingen Tübingen Germany
  5. Department of Biology Technical University Darmstadt Darmstadt Germany
  6. MEG‐Center University of Tübingen Tübingen Germany
  7. Department of Psychology University of Western Ontario London Ontario Canada
  8. National Center for PTSD VA Boston Healthcare System Boston Massachusetts USA
  9. Department of Psychiatry Boston University Chobanian and Avedisian School of Medicine Boston Massachusetts USA
Journal: The European journal of neuroscience, volume 63, issue 9, article e70543
Dates: received 18 July 2025; accepted 29 April 2026; published online 12 May 2026; in print May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1111/ejn.70543 · PMID 42117513 · PMCID PMC13162759 · OpenAlex W7160928478
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Evoked potentials, fMRI & imaging, Physiology & signal measures
Keywords: arousal, electroencephalography (EEG), emotion, naturalistic stimuli, neural oscillations, Pupillometry
MeSH: Arousal*, Pupil*, Adult, Brain Mapping, Electroencephalography, Emotions, Female, Humans, Male, Motion Pictures, Young Adult (* major topic)
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Interdisciplinary Center for Clinical Research IZKF Tübingen
Citations: not cited yet (Europe PMC); 121 references in the paper

Abstract

Movies evoke dynamic emotional experiences that fluctuate moment‐to‐moment. While fMRI has mapped these fluctuations, the real‐time continuous oscillatory dynamics underlying naturalistic viewing remain less understood. In this study, 25 adults watched an emotionally rich short film while EEG, continuous subjective arousal annotations and pupil diameter were recorded. Inter‐subject correlation (ISC) analyses revealed robust synchronization in behavioural and pupillary arousal across the cohort. Leveraging these shared, group‐level arousal trajectories to probe individual‐level cortical processing, we mapped the neural networks correlating with these two arousal signals. Both pupillary and subjective arousal negatively correlated with low‐frequency power in occipitoparietal regions, reflecting bottom‐up sensory gain control and attentional gating. Furthermore, high‐arousal epochs were marked by low‐frequency desynchronization in the precuneus; this cortical activation likely indexes the rapid retrieval of episodic memories required to update the viewer's situational model during plot shifts. Finally, while both measures tracked low‐frequency acoustic features in the auditory cortex, subjective arousal was more prominently associated with extended top‐down semantic networks and central theta activity. These findings highlight that while pupillary arousal heavily reflects bottom‐up sensory intensity, subjective reporting captures active cognitive integration. Together, this demonstrates how emotional arousal acts as a dynamic control signal, orchestrating a complex interplay of sensory gating, memory updating and top‐down evaluation to make sense of the unfolding narrative.

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

OSF 75mzh

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: MATLAB (6), Python (1)
Size: 23 files, 7 scripts
Software Heritage: not checked
Found in: “Data Availability Statement”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Statistics and Machine Learning Toolbox (2 files), Signal Processing Toolbox (1 file), NumPy (1 file), SciPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
7 files
At the source: osf.io/75mzh/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:

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

The datasets analysed during the current study are available from the corresponding author on reasonable request. Aggregated data and code are available on OSF: https://osf.io/75mzh/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

  • Publisher: n/a → Wiley

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 6 keywords, 11 MeSH terms, 1 funder, 115 references.

Cite

This paper

Camenzind, M., Nanni‐Zepeda, M., Giron, A. P., Dapper, K., Esterman, M., Frohlich, F., & Zuberer, A. (2026). Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing. The European journal of neuroscience, 63(9), e70543. https://doi.org/10.1111/ejn.70543

BibTeX

@article{camenzind2026neural,
author = {Camenzind, Magdalena and Nanni‐Zepeda, Melanni and Giron, Anna P. and Dapper, Konrad and Esterman, Michael and Frohlich, Flavio and Zuberer, Agnieszka},
title = {{Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing}},
journal = {The European journal of neuroscience},
year = {2026},
month = may,
volume = {63},
number = {9},
pages = {e70543},
publisher = {Wiley},
issn = {0953-816X},
doi = {10.1111/ejn.70543},
url = {https://doi.org/10.1111/ejn.70543},
pmid = {42117513},
pmcid = {PMC13162759}
}

RIS

TY - JOUR
AU - Camenzind, Magdalena
AU - Nanni‐Zepeda, Melanni
AU - Giron, Anna P.
AU - Dapper, Konrad
AU - Esterman, Michael
AU - Frohlich, Flavio
AU - Zuberer, Agnieszka
TI - Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing
T2 - The European journal of neuroscience
J2 - Eur J Neurosci
PY - 2026
DA - 2026/05/01
VL - 63
IS - 9
SP - e70543
SN - 0953-816X
PB - Wiley
DO - 10.1111/ejn.70543
UR - https://doi.org/10.1111/ejn.70543
LA - en
ER -

CSL-JSON

{
"id": "10.1111/ejn.70543",
"type": "article-journal",
"title": "Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing",
"container-title": "The European journal of neuroscience",
"author": [
{
"family": "Camenzind",
"given": "Magdalena"
},
{
"family": "Nanni‐Zepeda",
"given": "Melanni"
},
{
"family": "Giron",
"given": "Anna P."
},
{
"family": "Dapper",
"given": "Konrad"
},
{
"family": "Esterman",
"given": "Michael"
},
{
"family": "Frohlich",
"given": "Flavio"
},
{
"family": "Zuberer",
"given": "Agnieszka"
}
],
"container-title-short": "Eur J Neurosci",
"volume": "63",
"issue": "9",
"page": "e70543",
"DOI": "10.1111/ejn.70543",
"PMID": "42117513",
"PMCID": "PMC13162759",
"ISSN": "0953-816X",
"publisher": "Wiley",
"URL": "https://doi.org/10.1111/ejn.70543",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
1
]
]
}
}

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/imag.a.1331 [code]
Beyond the canonical HRF: Flexible temporal modeling reveals unconstrained BOLD profiles during naturalistic viewing.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: 8 references
[2] doi:10.1016/j.isci.2026.116936 [code]
Beyond neural oscillations: Stress-related aperiodic activity and aperiodic-oscillatory spectral covariation.
Journal: iScience
In common: SciPy, NumPy, EEG, 6 references
[3] doi:10.1111/psyp.70376 [code]
Changes in Aperiodic (1/f Slope) Activity During a Picture-Word Interference Task: Effects of Congruency and Sequence Manipulations.
Journal: Psychophysiology
In common: EEG, cognitive, 7 references
[4] doi:10.1038/s44271-026-00476-x [code]
Learning via short videos impairs memory accuracy and reduces brain synchrony.
Journal: Communications psychology
In common: NumPy, cognitive, 5 references
[5] doi:10.1162/imag.a.1229 [code]
40 Hz audiovisual stimulation improves sustained attention and related brain oscillations.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, EEG, 4 references
[6] doi:10.1126/sciadv.aea3919 [code]
Hierarchical brain dynamics supporting visual perceptual transitions.
Journal: Science advances
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, cognitive, 4 references
[7] doi:10.3389/fpsyg.2026.1819517 [code]
Development and validation of the performance evaluation anxiety task: a computerized task to identify functionally significant test anxiety.
Journal: Frontiers in psychology
In common: EEG, cognitive, 6 references
[8] doi:10.1007/s10548-026-01249-9
What Static Connectivity Misses: Dynamic Alpha-Band Brain Network States in First-Episode Psychosis.
Journal: Brain topography
In common: EEG, 7 references
[9] doi:10.3389/fnhum.2026.1692628 [code]
The effects of vocal emotions and emotional context on the neural tracking of speech envelopes and listeners' vigilance states.
Journal: Frontiers in human neuroscience
In common: EEG, cognitive, 6 references
[10] doi:10.1038/s41398-026-04055-w [code]
Diminished variability of alpha and beta band-limited power as a neural signature in schizophrenia.
Journal: Translational psychiatry
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 5 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.