OSCR

Beyond neural oscillations: Stress-related aperiodic activity and aperiodic-oscillatory spectral covariation.

Code ↔ Paper

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

3 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 3 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
  1. [1] § STAR★Methods › Method details › Electroencephalography acquisition, preprocessing, spectral decomposition ↔ Scripts/aperiodic_preprocessing.py, lines 66 to 120 · score 0.98 · peak width limit, 12–30 Hz, 2–40 Hz, 8–12 Hz, peak height, power spectral density · block oscr:b:WVCW7F45QGX3C-L · Report a mismatch
  2. [2] § STAR★Methods › Quantification and statistical analysis ↔ Scripts/Stress.R, the whole file · a weak match · score 0.53 · perceived stress, Gaussian, identity, family, pairwise, GAM · block oscr:b:66D308XNDSW1G-C · Report a mismatch
  3. [3] § STAR★Methods › Quantification and statistical analysis ↔ Scripts/Covariation.R, lines 246 to 304 · score 0.52 · aperiodic oscillatory, family, GAM, covariates, slope, exponent · block oscr:b:P119FQ652XDSN-9 · 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

Python · 120 lines · 4.7 KB · MIT · 1 match

  1. #%%
  2. import glob
  3. import mne
  4. import pandas as pd
  5. import numpy as np
  6. from fooof import FOOOF
  7. from scipy.signal import welch
  8. workingpath = 'D:\\aperiod\\'
  9. segmentcode = [56, 63, 78]
  10. segment = ['baseline', 'training', 'stress']
  11. segmentlength = [5, 5, 5]
  12. roi_channels = ['Fp1', 'Fp2', 'Fz', 'F4', 'F3', 'F8', 'F7', 'Cz', 'C4', 'C3', 'T4', 'T3', 'Pz', 'P4', 'P3', 'P8', 'P7', 'O2', 'O1']
  13. subjectlist = []
  14. no_subject = len(glob.glob(workingpath + "eeg\\*.vhdr"))
  15. for i in range(0, no_subject):
  16. subjectlist.append(glob.glob(workingpath + "eeg\\*.vhdr")[i][-9:-5])
  17. subjectlist.sort()
  18. with open('fooof_results.txt', 'w') as f:
  19. f.write("Subject\tsegment\tROI\tOffset\tExponent\tR2\tMAE\tResidual_Delta\tResidual_Theta\tResidual_Alpha\tResidual_Beta\tDelta\tTheta\tAlpha\tBeta\t\n")
  20. for subject in subjectlist:
  21. filepathevent = workingpath + 'eeg\\' + str(subject) + '.vhdr'
  22. filepath = workingpath + 'eeg_clean\\' + str(subject) + '.edf'
  23. raw = mne.io.read_raw_brainvision(filepathevent, misc='auto', scale=1.0, preload=True, verbose=None)
  24. raw_clean = mne.io.read_raw_edf(filepath, preload=True, verbose=None, stim_channel='Status')
  25. raw_clean._data *= 1e6
  26. eventcoding = pd.read_csv((workingpath + 'master_eventsII.txt'), delimiter='\t', header=0)
  27. events = mne.find_events(raw, stim_channel="TRIGGER")
  28. tempeventdf = pd.DataFrame(events)
  29. tempeventdf = tempeventdf.loc[:, (tempeventdf != 0).any(axis=0)]
  30. tempeventdf = tempeventdf.loc[:, (tempeventdf != 47831).any(axis=0)]
  31. tempeventdf.columns = range(tempeventdf.shape[1])
  32. tempeventdf = tempeventdf.rename(columns={0: 'trigger_time', 1: 'Code'})
  33. tempeventdf = tempeventdf[tempeventdf['Code'] >= 50]
  34. eventdf = pd.merge(eventcoding, tempeventdf, on='Code', how='inner')
  35. for s in range(0, len(segment)):
  36. starttime = eventdf[eventdf['Code'] == segmentcode[s]]['trigger_time'].values[0]
  37. if segment[s] == 'baseline':
  38. starttime = starttime + (15 * 60 * 500)
  39. for roi in roi_channels:
  40. rawdata = raw_clean.get_data(roi)
  41. filterdata = rawdata[0]
  42. data = filterdata[starttime:starttime + (segmentlength[s] * 60 * 500)]
  43. freqs, psd = welch(
  44. data,
  45. fs=500,
  46. window='hann',
  47. nperseg=1000,
  48. noverlap=500,
  49. scaling='density',
  50. average='mean',
  51. detrend='constant'
  52. )
  53. df = pd.DataFrame({'Frequency_Hz': freqs, 'PSD': psd})
  54. df.to_csv('D:\\aperiod\\export_eeg_psd\\' + segment[s] + '\\' + subject + '_' + roi + '.csv', index=False)
  55. fm = FOOOF(
  56. peak_width_limits=[1, 6],
  57. max_n_peaks=6,
  58. min_peak_height=0.05,
  59. peak_threshold=1.5,
  60. aperiodic_mode='fixed'
  61. )
  62. fm.fit(freqs, psd, [2, 40])
  63. offset, exponent = fm.aperiodic_params_
  64. aperiodic_freqs = fm.freqs
  65. aperiodic_fit = fm._ap_fit
  66. df_aperiod = pd.DataFrame({'Frequency_Hz': aperiodic_freqs, 'PSD': aperiodic_fit})
  67. df_aperiod.to_csv('D:\\aperiod\\export_eeg_aperiod\\' + segment[s] + '\\' + subject + '_' + roi + '.csv', index=False)
  68. mask = freqs > 0
  69. freqs = freqs[mask]
  70. psd = psd[mask]
  71. aperiodic_fit_full = offset - exponent * np.log10(freqs)
  72. peak_only_psd = np.log10(psd) - aperiodic_fit_full
  73. with open('fooof_results.txt', 'a') as f:
  74. f.write(str(subject) + '\t')
  75. f.write(str(segment[s]) + '\t')
  76. f.write(str(roi) + '\t')
  77. f.write(str(offset) + '\t')
  78. f.write(str(exponent) + '\t')
  79. f.write(str(fm.r_squared_) + '\t')
  80. f.write(str(fm.error_) + '\t')
  81. bands = {
  82. 'delta': (1, 4),
  83. 'theta': (4, 8),
  84. 'alpha': (8, 12),
  85. 'beta': (12, 30)
  86. }
  87. for band_name, (fmin, fmax) in bands.items():
  88. mask = (freqs >= fmin) & (freqs < fmax)
  89. band_power = np.mean(peak_only_psd[mask])
  90. with open('fooof_results.txt', 'a') as f:
  91. f.write(str(band_power) + '\t')
  92. for band_name, (fmin, fmax) in bands.items():
  93. mask = (freqs >= fmin) & (freqs < fmax)
  94. band_power = np.mean(psd[mask])
  95. with open('fooof_results.txt', 'a') as f:
  96. f.write(str(band_power) + '\t')
  97. with open('fooof_results.txt', 'a') as f:
  98. f.write('\n')

aperiodic_preprocessing.py at commit 5b93e6d, under MIT · at the source

Overview

Authors: Kar Fye Alvin Lee1,2, Li Liang1,2, Suhail T. Asharaf1,2, Tatia M.C. Lee1,2
ORCID iDs: Li Liang
  1. Laboratory of Neuropsychology and Human Neuroscience, Department of Psychology, The University of Hong Kong, Hong Kong, China
  2. InnoCentre of Clinical Neuropsychology, The University of Hong Kong, Hong Kong, China
Institutions: University of Hong Kong (Hong Kong SAR China)
Journal: iScience, volume 29, issue 8, article 116936
Dates: received 20 January 2026; accepted 9 July 2026; published online 10 August 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1016/j.isci.2026.116936 · PMID 42620688 · PMCID PMC13486866 · OpenAlex W7202090706
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), systems (subfield)
Methods: Spectral & time-frequency, Statistics, Preprocessing
Keywords: psychological stress, aperiodic activity, neural oscillation
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: University of Hong Kong; Guangdong-Hong Kong Joint Laboratory for Psychiatric Disorders (2023B1212120004)
Citations: not cited yet (Europe PMC); 64 references in the paper
Research resources: MATLAB R2025b RRID:SCR_001622, R 4.4.1 RRID:SCR_001905, EEGLAB v2025.1.0 RRID:SCR_007292, Python 3.10 RRID:SCR_008394

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

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

alvinleekarfye/alvin-aperiodic-stressinduction-analysis-2026

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 5b93e6d5e2f4094afe1063ef2cc8f7e5250cfbeb, 6 July 2026
Languages: R (12), Python (1), MATLAB (1)
Size: 16 files, 14 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: emmeans (11 files), mgcv (11 files), tidyverse (11 files), ggplot2 (9 files), eegUtils (8 files), patchwork (8 files), EEGLAB (1 file), Parallel Computing Toolbox (1 file), MNE-Python (1 file), NumPy (1 file), pandas (1 file), SciPy (1 file), specparam (formerly FOOOF) (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
16 files

Zenodo 21207822

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
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 (11 files), mgcv (11 files), tidyverse (11 files), ggplot2 (9 files), eegUtils (8 files), patchwork (8 files), EEGLAB (1 file), Parallel Computing Toolbox (1 file), MNE-Python (1 file), NumPy (1 file), pandas (1 file), SciPy (1 file), specparam (formerly FOOOF) (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
16 files

craddm/eegutils

License: other
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 2b2dbe123b1fabaac414aa0f62b8259194d40e5f, 10 February 2026
Languages: R (85), JavaScript (38), C++ (3)
Size: 1,508 files, 126 scripts
Software Heritage: not archived
Found in: the text, “Key resources table”
Holds: README, license file, CITATION.cff, environment (DESCRIPTION), tests, continuous integration, documentation, 7 notebooks
Tools: tidyverse (42 files), ggplot2 (17 files), eegUtils (8 files), data.table (4 files), mgcv (2 files), Plotly (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
128 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:

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

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

Data

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

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1016/j.isci.2026.116936.

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

Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 3 keywords, 2 funders, 64 references, 4 RRIDs.

Cite

This paper

Lee, K. F. A., Liang, L., Asharaf, S. T., & Lee, T. M. (2026). Beyond neural oscillations: Stress-related aperiodic activity and aperiodic-oscillatory spectral covariation. iScience, 29(8), 116936. https://doi.org/10.1016/j.isci.2026.116936

BibTeX

@article{lee2026beyond,
author = {Lee, Kar Fye Alvin and Liang, Li and Asharaf, Suhail T. and Lee, Tatia M.C.},
title = {{Beyond neural oscillations: Stress-related aperiodic activity and aperiodic-oscillatory spectral covariation}},
journal = {iScience},
year = {2026},
month = aug,
volume = {29},
number = {8},
pages = {116936},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/j.isci.2026.116936},
url = {https://doi.org/10.1016/j.isci.2026.116936},
pmid = {42620688},
pmcid = {PMC13486866}
}

RIS

TY - JOUR
AU - Lee, Kar Fye Alvin
AU - Liang, Li
AU - Asharaf, Suhail T.
AU - Lee, Tatia M.C.
TI - Beyond neural oscillations: Stress-related aperiodic activity and aperiodic-oscillatory spectral covariation
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/08/10
VL - 29
IS - 8
SP - 116936
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.116936
UR - https://doi.org/10.1016/j.isci.2026.116936
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.116936",
"type": "article-journal",
"title": "Beyond neural oscillations: Stress-related aperiodic activity and aperiodic-oscillatory spectral covariation",
"container-title": "iScience",
"author": [
{
"family": "Lee",
"given": "Kar Fye Alvin"
},
{
"family": "Liang",
"given": "Li"
},
{
"family": "Asharaf",
"given": "Suhail T."
},
{
"family": "Lee",
"given": "Tatia M.C."
}
],
"container-title-short": "iScience",
"volume": "29",
"issue": "8",
"page": "116936",
"DOI": "10.1016/j.isci.2026.116936",
"PMID": "42620688",
"PMCID": "PMC13486866",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.116936",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
10
]
]
}
}

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_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: specparam (formerly FOOOF), SciPy, NumPy, EEG, 13 references
[2] doi:10.1111/psyp.14696 [code]
Linking brain-heart interactions to emotional arousal in immersive virtual reality.
Journal: Psychophysiology
In common: specparam (formerly FOOOF), emmeans, EEGLAB, 7 other tools, EEG, 4 references
[3] doi:10.1371/journal.pone.0292501 [code]
Augmenting complex and dynamic performance through mindfulness-based cognitive training: An evaluation of training adherence, trait mindfulness, personality and resting-state EEG.
Journal: PloS one
In common: eegUtils, emmeans, MNE-Python, 4 other tools, EEG, 7 references
[4] doi:10.1186/s11689-025-09651-3 [code]
The association between infant EEG aperiodic exponent and the trajectory of restricted and repetitive behaviors for toddlers with and without autism.
Journal: Journal of neurodevelopmental disorders
In common: specparam (formerly FOOOF), mgcv, emmeans, 7 other tools, EEG, 4 references
[5] doi:10.1038/s41467-024-50204-4 [code]
Developmental trajectories of EEG aperiodic and periodic components in children 2-44 months of age.
Journal: Nature communications
In common: specparam (formerly FOOOF), mgcv, ggplot2, 4 other tools, EEG, 6 references
[6] doi:10.1038/s44271-025-00334-2 [code]
Temporally resolved analyses of aperiodic features track neural dynamics during sleep.
Journal: Communications psychology
In common: specparam (formerly FOOOF), EEGLAB, MNE-Python, 4 other tools, 6 references
[7] doi:10.1007/s12021-022-09581-8 [code]
Separating Neural Oscillations from Aperiodic 1/f Activity: Challenges and Recommendations.
Journal: Neuroinformatics
In common: specparam (formerly FOOOF), MNE-Python, pandas, 2 other tools, EEG, 8 references
[8] doi:10.1093/cercor/bhae186 [code]
Aperiodic components of local field potentials reflect inherent differences between cortical and subcortical activity.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: specparam (formerly FOOOF), MNE-Python, tidyverse, 2 other tools, EEG, 7 references
[9] doi:10.1093/cercor/bhag113 [code]
Long-term reliability and stability of parameterized resting state EEG: evidence from a five-year follow-up.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: specparam (formerly FOOOF), emmeans, MNE-Python, 5 other tools, EEG, 4 references
[10] doi:10.1162/imag_a_00380 [code]
Balancing excitation and inhibition: The role of neural network dynamics in working memory gating.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: specparam (formerly FOOOF), EEGLAB, MNE-Python, 5 other tools, EEG, 4 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.1016/j.isci.2026.116936.svg)](https://openscicode.org/badge/doi/10.1016/j.isci.2026.116936)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.isci.2026.116936.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.isci.2026.116936
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.isci.2026.116936"><img src="https://openscicode.org/badge/doi/10.1016/j.isci.2026.116936.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.