Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing.
4 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 7 matches · 6 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
- [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 · block
oscr:b:NAKH0FSE8EFRZ-H· Report a mismatch - [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 · block
oscr:b:QS4EF5QEB4XHP-6· Report a mismatch - [3] § Methods › Statistical Analysis ↔ Code/cluster_perm_RSvsMV.py, lines 41 to 120 · score 0.85 · empirical cluster mass, randomly flipped, error rate, maximum cluster mass, FWER, family · block
oscr:b:Y5RSF108N1DSY-T· Report a mismatch - [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 · block
oscr:b:NAKH0FSE8EFRZ-H· Report a mismatch - [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 · block
oscr:b:Q9GBZGVNT6KXK-F· Report a mismatch - [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 · block
oscr:b:Q9GBZGVNT6KXK-F· Report a mismatch - [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 · block
oscr:b:QS4EF5QEB4XHP-6· 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 · 146 lines · 6.2 KB · no license · 2 matches
- function wCov = compute_brain_arousal_covariance(brain_data, arousal_ts, subject_id, IAF_tab, numEpochs, Fs)
- % Written by Magdalena Camenzind, PhD
- % Inquiries to [email hidden]
- %
- % Site: University of North Carolina at Chapel Hill
- % Lab: Frohlich Lab, www.frohlichlab.org
- % COMPUTE_BRAIN_AROUSAL_COVARIANCE
- % Computes the covariance (Pearson's r) between continuous neural spectral power
- % and an external arousal timeseries (e.g., pupil dilation or subjective ratings).
- %
- % This function is agnostic to the spatial domain: the input can be sensor-level
- % EEG channels or source-level anatomical regions (e.g., from the Desikan-Killiany atlas).
- % It segments the data, computes the Power Spectral Density (PSD) for each epoch,
- % extracts low-frequency bands (delta, theta, and individualized low-alpha),
- % and calculates the temporal covariance with the arousal signal.
- %
- % =========================================================================
- % INPUTS:
- % brain_data - 2D numeric matrix [n_regions x time_samples] for one participant.
- % (e.g., 61 channels or 68 cortical parcels).
- % arousal_ts - 1D numeric array containing the continuous arousal signal.
- % (Must be the same length as numEpochs, e.g., 1200).
- % subject_id - Numeric ID of the participant (to look up in IAF_tab).
- % IAF_tab - Table loaded from 'foofed_IAF_data2.xlsx' containing columns
- % for 'ID' and 'IAF'.
- % numEpochs - Integer defining the number of epochs to split the data into (e.g., 1200).
- % Fs - Sampling frequency of the neural data in Hz (e.g., 200).
- %
- % OUTPUTS:
- % wCov - A struct containing the [n_regions x 1] covariance matrices
- % for the requested frequency bands: .delta, .theta, .lalpha.
- % *Note: Because both timeseries are ultimately z-scored, this
- % covariance is mathematically equivalent to Pearson's correlation (r).
- % =========================================================================
- %% 1. Preprocess the Arousal Timeseries
- % Ensure the arousal signal is a row vector, detrended, and z-scored
- arousal_ts = arousal_ts(:)';
- if length(arousal_ts) ~= numEpochs
- error('The length of arousal_ts (%d) must match numEpochs (%d).', length(arousal_ts), numEpochs);
- end
- arousal_det = detrend(arousal_ts);
- arousal_z = zscore(arousal_det);
- %% 2. Look up Individual Alpha Frequency (IAF)
- rowIdx = IAF_tab.ID == subject_id;
- if ~any(rowIdx)
- error('Subject ID %d not found in the provided IAF table.', subject_id);
- end
- % Extract and round the IAF value to the nearest 0.5 Hz
- IAF_val = IAF_tab.IAF(rowIdx);
- IAF_val = round(IAF_val * 2) / 2;
- % Define ONLY individualized low-alpha bounds
- lb_alpha = IAF_val - 1;
- lb_alpha_target = [lb_alpha, IAF_val];
- %% 3. Initialize Variables
- n_regions = size(brain_data, 1);
- % Output structures (restricted to low frequencies)
- wCov.lalpha = zeros(n_regions, 1);
- wCov.theta = zeros(n_regions, 1);
- wCov.delta = zeros(n_regions, 1);
- % Frequencies of interest for pwelch
- foi = 1:0.5:30;
- winSize = Fs; % Window size (1 second)
- win = hann(winSize); % Hann window
- %% 4. Region Loop (Channels or Anatomical Parcels)
- for areaIdx = 1:n_regions
- roi_Data = brain_data(areaIdx, :);
- % --- Epoching Logic ---
- epochLength = floor(length(roi_Data) / numEpochs);
- remainder = mod(length(roi_Data), numEpochs);
- epochs = cell(1, numEpochs);
- startIndex = 1;
- for i = 1:numEpochs
- if i <= remainder
- endIndex = startIndex + epochLength;
- else
- endIndex = startIndex + epochLength - 1;
- end
- epochs{i} = roi_Data(startIndex:endIndex);
- startIndex = endIndex + 1;
- end
- % --- Preallocate band power arrays ---
- lalpha_vals = zeros(1, numEpochs);
- theta_vals = zeros(1, numEpochs);
- delta_vals = zeros(1, numEpochs);
- % --- Compute PSD for each epoch ---
- for k = 1:numEpochs
- dat_ep = epochs{k};
- % Compute Power Spectral Density
- [pxx, ~] = pwelch(detrend(dat_ep'), win, [], foi, Fs);
- % Extract Frequency Bands
- [~, lb_alpha_idx] = min(abs(foi - lb_alpha_target'), [], 2);
- lalpha_pw = pxx(lb_alpha_idx(1):lb_alpha_idx(2));
- theta_idx = find(foi > 3.5 & foi < 7.5);
- theta_pw = pxx(theta_idx);
- delta_idx = find(foi > 1.5 & foi < 4.5);
- delta_pw = pxx(delta_idx);
- % Average power within the band for this epoch
- lalpha_vals(k) = mean(lalpha_pw);
- theta_vals(k) = mean(theta_pw);
- delta_vals(k) = mean(delta_pw);
- end
- % --- Signal Post-Processing ---
- % 1. Log-transform (normalizes the highly skewed power distribution)
- log_delta = log10(delta_vals + eps);
- log_theta = log10(theta_vals + eps);
- log_lalpha = log10(lalpha_vals + eps);
- % 2. Gaussian Smoothing (recovers the slow "Arousal Trend" across the narrative)
- smooth_log_delta = smoothdata(log_delta, 'gaussian', 40);
- smooth_log_theta = smoothdata(log_theta, 'gaussian', 40);
- smooth_log_lalpha = smoothdata(log_lalpha, 'gaussian', 40);
- % 3. Z-score (standardizes variance to prepare for correlation)
- z_delta = zscore(smooth_log_delta);
- z_theta = zscore(smooth_log_theta);
- z_lalpha = zscore(smooth_log_lalpha);
- % --- Calculate Covariance (Pearson's r) ---
- % Dividing the dot product of two z-scored vectors by (N-1) yields Pearson's r.
- N_minus_1 = numEpochs - 1;
- wCov.lalpha(areaIdx) = sum(z_lalpha .* arousal_z) / N_minus_1;
- wCov.theta(areaIdx) = sum(z_theta .* arousal_z) / N_minus_1;
- wCov.delta(areaIdx) = sum(z_delta .* arousal_z) / N_minus_1;
- end
- end
compute_brain_arousal_covariance.m, no license · at the source
Overview
- Department of Psychiatry University of North Carolina at Chapel Hill Chapel Hill North Carolina USA
- Carolina Center for Neurostimulation University of North Carolina at Chapel Hill Chapel Hill North Carolina USA
- Department of Psychiatry and Psychotherapy, Tübingen Center for Mental Health (TüCMH), University of Tübingen Tübingen Germany
- German Center for Mental Health (DZPG), partner site Tübingen Tübingen Germany
- Department of Biology Technical University Darmstadt Darmstadt Germany
- MEG‐Center University of Tübingen Tübingen Germany
- Department of Psychology University of Western Ontario London Ontario Canada
- National Center for PTSD VA Boston Healthcare System Boston Massachusetts USA
- Department of Psychiatry Boston University Chobanian and Avedisian School of Medicine Boston Massachusetts USA
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
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
7 files
- Code/
check_neighbors.m , MATLAB, 49 lines - Code/
cluster_perm_RSvsMV.py , Python, 120 lines, 1 match - Code/
cluster_permutation_test , MATLAB, 128 lines, 2 matches_oneSample.m - Code/
compute_brain_arousal_co , MATLAB, 146 lines, 2 matchesvariance.m - Code/
compute_isc_permutation. , MATLAB, 95 lines, 2 matchesm - Code/
find_clusters_mass.m , MATLAB, 75 lines - Code/
spatial_neighbors.m , MATLAB, 122 lines
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://
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://
BibTeX
@article{camenzind2026ne
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/
url = {https://
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/
VL - 63
IS - 9
SP - e70543
SN - 0953-816X
PB - Wiley
DO - 10.1111/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1111/
"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":
"volume": "63",
"issue": "9",
"page": "e70543",
"DOI": "10.1111/
"PMID": "42117513",
"PMCID": "PMC13162759",
"ISSN": "0953-816X",
"publisher": "Wiley",
"URL": "https://
"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.7554/elife.64812 [code]
- Decoding subjective emotional arousal from EEG during an immersive virtual reality experience.Journal: eLifeIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, EEG, cognitive, 13 references
- [2] doi:10.3758/s13428-023-02098-1 [code]
- From pre-processing to advanced dynamic modeling of pupil data.Journal: Behavior research methodsIn common: Statistics and Machine Learning Toolbox, SciPy, NumPy, 10 references
- [3] doi:10.1111/psyp.70407 [code]
- Delivery and Attitude Modulate Shared Neural Processing of Speech Through Distinct Frequency Channels.Journal: PsychophysiologyIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, cognitive, 10 references
- [4] doi:10.1002/hbm.26622 [code]
- Neural signatures of shared subjective affective engagement and disengagement during movie viewing.Journal: Human brain mappingIn common: SciPy, NumPy, cognitive, 9 references
- [5] doi:10.1162/imag_a_00451 [code]
- Inhibition of thalamic relay nuclei scales the aperiodic and alpha band oscillations associated with arousal during naturalistic stimulus viewing.Journal: Imaging neuroscience (Cambridge, Mass.)In common: SciPy, NumPy, EEG, 8 references
- [6] doi:10.1038/s41467-025-57289-5 [code]
- Pupil size reveals arousal level fluctuations in human sleep.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, EEG, 9 references
- [7] doi:10.1038/s42003-023-05168-4 [code]
- Comparative analysis of multifaceted neural effects associated with varying endogenous cognitive load.Journal: Communications biologyIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, EEG, cognitive, 8 references
- [8] doi:10.1162/netn_a_00446 [code]
- The impact of transcranial random noise stimulation (tRNS) on alpha coherence and verbal divergent thinking.Journal: Network neuroscience (Cambridge, Mass.)In common: NumPy, 5 references, author Magdalena Camenzind
- [9] doi:10.1523/eneuro.0484-22.2023 [code]
- Exploring the Neural Processes behind Narrative Engagement: An EEG Study.Journal: eNeuroIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, EEG, cognitive, 6 references
- [10] doi:10.1038/s41598-025-27429-4 [code]
- Green urban environments enhance brain-to-brain synchrony.Journal: Scientific reportsIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, cognitive, 7 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 7 scripts, and 7 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:f016c7dc50fa58c9…
Add the badge to the code's README
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 -->
[](https://openscicode.org/badge/doi/10.1111/ejn.70543)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1111/ejn.70543.svg
:target: https://openscicode.org/badge/doi/10.1111/ejn.70543
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1111/ejn.70543"><img src="https://openscicode.org/badge/doi/10.1111/ejn.70543.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->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)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
