OSCR

Effects of Age on Resting-State Cortical Networks.

Code ↔ Paper

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

10 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 12 matches
  1. [1] § Materials and Methods › Time‐Averaged Network Analysis › Canonical Frequency Bands ↔ 4_scripts_time_averaged_network_analysis/1_calc.py, lines 1 to 60 · score 0.84 · 13–24 Hz, 30–45 Hz, 8–13 Hz, frequency band, 1–4 Hz, 4–8 Hz · block oscr:b:F018Q4V7K6CT9-7 · Report a mismatch
  2. [2] § Materials and Methods › Time‐Averaged Network Analysis › Canonical Frequency Bands ↔ 4_scripts_time_averaged_network_analysis/2_plot_networks.py, lines 278 to 341 · score 0.84 · 13–24 Hz, 30–45 Hz, 8–13 Hz, frequency band, 1–4 Hz, 4–8 Hz · block oscr:b:CZPY8RF8P81WC-0 · Report a mismatch
  3. [3] § Materials and Methods › Transient Network Analysis › The Hidden Markov Model › Hyperparameters ↔ 5_scripts_transient_network_analysis/02_train_hmm.py, lines 9 to 29 · score 0.70 · sequence length, osl dynamics, hyperparameters, train, batch, HMM · block oscr:b:R5WT57ZZ5T8EW-S · Report a mismatch
  4. [4] § Materials and Methods › Time‐Averaged Network Analysis › Power/Coherence Spectra ↔ 5_scripts_transient_network_analysis/04_calc_multitaper.py, lines 23 to 38 · score 0.63 · half bandwidth, spectral density, tapers, multitaper, PSD, Coherence · block oscr:b:MP6TSS6JZ5GMG-9 · Report a mismatch
  5. [5] § Materials and Methods › Dataset › MEG Preprocessing, Source Reconstruction and Parcellation ↔ osl/source_recon/beamforming.py, lines 57 to 206 · score 0.61 · LCMV beamformer, bad channel, noise, osl, sensor, filtered · block oscr:b:5Y4VQW4875MF1-O · Report a mismatch
  6. [6] § Materials and Methods › Time‐Averaged Network Analysis ↔ 4_scripts_time_averaged_network_analysis/1_calc.py, lines 1 to 60 · score 0.59 · 1–45 Hz, power spectral density, PSD, band, coherence, ageing · block oscr:b:F018Q4V7K6CT9-7 · Report a mismatch
  7. [7] § Materials and Methods › Transient Network Analysis › Post Hoc Analysis › Summary Statistics for State Dynamics ↔ 5_scripts_transient_network_analysis/05_calc_summary_stats.py, lines 15 to 24 · score 0.58 · fractional occupancy, switching rate, interval, lifetime · block oscr:b:V771C11FPQRRG-K · Report a mismatch
  8. [8] § Materials and Methods › Dataset › MEG Preprocessing, Source Reconstruction and Parcellation ↔ osl/source_recon/wrappers.py, lines 459 to 598 · score 0.57 · Source reconstruction, orthogonalised, LCMV, parcellation, beamformer, voxel · block oscr:b:NH94R49GVMMZK-R · Report a mismatch
  9. [9] § Materials and Methods › Transient Network Analysis › Post Hoc Analysis › Summary Statistics for State Dynamics ↔ 5_scripts_transient_network_analysis/09_plot_age_effects.py, lines 115 to 198 · score 0.57 · fractional occupancy, switching rate, interval, lifetime · block oscr:b:4J2Y4V8CG4DY0-S · Report a mismatch
  10. [10] § Materials and Methods › Time‐Averaged Network Analysis ↔ 5_scripts_transient_network_analysis/04_calc_multitaper.py, lines 23 to 38 · score 0.55 · 1–45 Hz, power spectral density, PSD, coherence, networks · block oscr:b:MP6TSS6JZ5GMG-9 · Report a mismatch
  11. [11] § Materials and Methods › Statistical Significance Testing › Age Effects › Confounds ↔ 3_scripts_design_matrix/1_gather_data.py, lines 34 to 75 · score 0.53 · design matrix, brain volume, sex, regressor, position, score · block oscr:b:3GGGFV8HTF6D6-W · Report a mismatch
  12. [12] § Materials and Methods › Statistical Significance Testing › Cognitive Performance Effects › Confounds ↔ 3_scripts_design_matrix/1_gather_data.py, lines 27 to 32 · score 0.52 · cognitive score, design matrix, confound, PCA · block oscr:b:RE34E5S1BM995-S · 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 · 113 lines · 2.9 KB · no license · 2 matches

  1. """Calculate static (time-averaged) quantities.
  2. """
  3. import os
  4. import numpy as np
  5. import pandas as pd
  6. from glob import glob
  7. os.makedirs("data", exist_ok=True)
  8. calc_spectra = True
  9. calc_pow = True
  10. calc_coh = True
  11. calc_aec = True
  12. get_ages = True
  13. freq_bands = [[1, 4], [4, 8], [8, 13], [13, 24], [30, 45]]
  14. files = sorted(glob("../1_preproc_and_source_recon/output/*/*_sflip_lcmv-parc-raw.fif"))
  15. if calc_spectra:
  16. from osl_dynamics.analysis import static
  17. from osl_dynamics.data import Data
  18. data = Data(files, picks="misc", reject_by_annotation="omit", n_jobs=16)
  19. data = data.trim_time_series(n_embeddings=15, sequence_length=400)
  20. f, psd, coh, w = static.multitaper_spectra(
  21. data=data,
  22. window_length=500,
  23. sampling_frequency=250,
  24. frequency_range=[1, 45],
  25. return_weights=True,
  26. standardize=True,
  27. calc_coh=True,
  28. n_jobs=16,
  29. )
  30. print("Saving spectra")
  31. np.save("data/f.npy", f)
  32. np.save("data/psd.npy", psd)
  33. np.save("data/coh.npy", coh)
  34. np.save("data/w.npy", w)
  35. if calc_pow:
  36. from osl_dynamics.analysis import power
  37. f = np.load("data/f.npy")
  38. psd = np.load("data/psd.npy")
  39. pow_ = []
  40. for band in freq_bands:
  41. p = power.variance_from_spectra(f, psd, frequency_range=band)
  42. pow_.append(p)
  43. pow_ = np.swapaxes(pow_, 0, 1)
  44. filename = "data/pow.npy"
  45. print("Saving", filename)
  46. np.save(filename, pow_)
  47. if calc_coh:
  48. from osl_dynamics.analysis import connectivity
  49. f = np.load("data/f.npy")
  50. coh = np.load("data/coh.npy")
  51. mean_coh = []
  52. for band in freq_bands:
  53. c = connectivity.mean_coherence_from_spectra(f, coh, frequency_range=band)
  54. mean_coh.append(c)
  55. mean_coh = np.swapaxes(mean_coh, 0, 1)
  56. filename = "data/mean_coh.npy"
  57. print("Saving", filename)
  58. np.save(filename, mean_coh)
  59. if calc_aec:
  60. from osl_dynamics.analysis import static
  61. from osl_dynamics.data import Data
  62. data = Data(files, picks="misc", reject_by_annotation="omit", n_jobs=16)
  63. data.standardize()
  64. x = data.time_series()
  65. data = Data(x, sampling_frequency=250, load_memmaps=False, n_jobs=16)
  66. aec = []
  67. for band in freq_bands:
  68. data.filter(low_freq=band[0], high_freq=band[1], use_raw=True)
  69. data.amplitude_envelope()
  70. x = data.time_series()
  71. aec.append(static.functional_connectivity(x))
  72. aec = np.moveaxis(aec, 0, -1)
  73. filename = "data/aec.npy"
  74. print("Saving", filename)
  75. np.save(filename, aec)
  76. if get_ages:
  77. subjects = [file.split("/")[-2] for file in files]
  78. participants = pd.read_csv("cc700/participants.tsv", sep="\t")
  79. age = np.array(
  80. [
  81. participants.loc[participants["participant_id"] == subject]["age"].values[0]
  82. for subject in subjects
  83. ]
  84. )
  85. filename = "data/age.npy"
  86. print("Saving", filename)
  87. np.save(filename, age)

1_calc.py at commit fb537ec, no license · at the source

Overview

Authors: Chetan Gohil1, Oliver Kohl1, Jemma Pitt1, Mats W. J. van Es1, Andrew J. Quinn2, Diego Vidaurre1,3, Martin R. Turner4, Anna C. Nobre5,6, Mark W. Woolrich1
  1. Oxford Centre for Human Brain Activity, Oxford Centre for Integrative Neuroimaging, Department of Psychiatry University of Oxford Oxford UK
  2. Centre for Human Brain Health, School of Psychology University of Birmingham Birmingham UK
  3. Center of Functionally Integrative Neuroscience, Department of Clinical Medicine Aarhus University Aarhus Denmark
  4. Nuffield Department of Clinical Neurosciences University of Oxford Oxford UK
  5. Wu Tsai Institute Yale University Haven Connecticut USA
  6. Department of Psychology Yale University New Haven Connecticut USA
Institutions: University of Oxford (United Kingdom); Wellcome Centre for Integrative Neuroimaging (United Kingdom); University of Birmingham (United Kingdom); Aarhus University (Denmark); Yale University (United States)
Journal: Human brain mapping, volume 47, issue 5, article e70516
Dates: received 8 August 2025; accepted 14 March 2026; published online 26 March 2026; in print April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1002/hbm.70516 · PMID 41889066 · PMCID PMC13081697 · OpenAlex W7141431061
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: MEG (modality), human (organism)
Methods: Spectral & time-frequency, Preprocessing, Connectivity, Statistics, Smoothing, state filtering, decompositions, fMRI & imaging
Keywords: ageing, dynamics, HMM, MEG, networks, oscillations
MeSH: Aging*, Brain Waves*, Cerebral Cortex*, Connectome*, Magnetoencephalography*, Nerve Net*, Adolescent, Adult, Aged, Aged, 80 and over, Cross-Sectional Studies, Female, Humans, Male, Middle Aged, Young Adult (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Wellcome Trust (203139/Z/16/Z, 215573/Z/19/Z, 106183/Z/14/Z, 104571/Z/14/Z); European Commission through the “European School of Network Neuroscience (euSNN) (MSCA‐ITN ETN H2020‐ID 860563); Medical Research Council (MRC); Dementia Platform UK (RG94383, RG89702); Novo Nordisk Foundation Emerging Investigator Fellowship (NNF19OC‐0054895); ERC Starting Grant (ERC‐StG‐2019‐850404); Independent Research Fund of Denmark (2034‐00054B); Motor Neurone Disease Association; James S. McDonnell Foundation (McDonnell Foundation) (220020448); NIHR Oxford Health Biomedical Research Centre (NIHR203316)
Citations: cited by 3 papers (Europe PMC); 79 references in the paper

Abstract

Understanding how ageing affects brain function remains a central challenge in neuroscience. Electrophysiological brain imaging techniques provide a near‐direct measure of neuronal activity, which is useful for characterising neurophysiological health. They offer us the ability to track large‐scale networks of functional activity with high temporal precision. The effects of healthy ageing on these networks remain poorly understood, in part due to small sample sizes and limited control for confounding factors in previous studies. Here, we analysed resting‐state source‐reconstructed magnetoencephalography (MEG) data from a large cross‐sectional cohort of healthy adults (N = 612, 18–88 years old) to characterise the effect of age using not only time‐averaged (static), but also transient (dynamic) network activity. We examined time‐averaged power and coherence across canonical frequency bands (δ, θ, α, β, γ), as well as transient network dynamics identified using Hidden Markov Modelling. We included many confounding variables known to be affected by age, such as brain volume, as well as head size and position, which have previously been overlooked. Ageing was associated with frequency‐specific changes in oscillatory power, with decreases in low‐frequency (δ, θ) power and increases in high‐frequency (β) power. Coherence increased across all frequency bands and was positively associated with cognitive performance. Transient network analyses additionally revealed that frontal network occurrences declined with age, with evidence suggesting a compensatory role in supporting cognition. These findings provide a more comprehensive electrophysiological signature for healthy ageing and establish a baseline for detecting pathological change.

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

OHBA-analysis/Gohil2025_AgeEffectsRSNs

License: none: the authors keep all their rights
State: the link answers, verified on 11 November 2026
Evidence: files inventoried
Commit: fb537ece92d6e6926d0a390cf4b6110308b118c3, 25 September 2026
Languages: Python (23)
Size: 56 files, 23 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (19 files), Matplotlib (7 files), OHBA Software Library (OSL) (4 files), pandas (4 files), SciPy (4 files), MNE-Python (1 file), scikit-learn (1 file)
Availability: 2 checks, the latest on 11 November 2026: the link answers
  • 11 November 2026: the link answers
  • 28 September 2026: the link answers
24 files

Zenodo 6875060

License: BSD-3-Clause
State: the link answers, verified on 28 October 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (40 files), OHBA Software Library (OSL) (28 files), MNE-Python (26 files), Matplotlib (16 files), SciPy (10 files), FSL (8 files), NiBabel (8 files), pandas (5 files), scikit-learn (3 files), Nilearn (2 files), h5py (1 file), Numba (1 file), OpenCV (1 file)
Availability: 2 checks, the latest on 28 October 2026: the link answers (HTTP 200)
  • 28 October 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
72 files
At the source:

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;
  • 92 scripts, each with its path and the digest of its content;
  • 12 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

Datasets cited

Data Availability Statement

Access to the Cam‐CAN dataset can be requested here (CamCAN, n.d.). Python scripts for reproducing the analysis in the current work starting from the public data are available here: https://github.com/OHBA‐analysis/Gohil2025_AgeEffectsRSNs (https://github.com/OHBA-analysis/Gohil2025_AgeEffectsRSNs). The time‐averaged and transient networks calculated in the current work are also provided.

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

Recorded: type, language, journal, volume, issue, pages, dates, 9 authors, 6 keywords, 16 MeSH terms, 10 funders, 68 references.

Cite

This paper

Gohil, C., Kohl, O., Pitt, J., van Es, M. W. J., Quinn, A. J., Vidaurre, D., Turner, M. R., Nobre, A. C., & Woolrich, M. W. (2026). Effects of Age on Resting-State Cortical Networks. Human brain mapping, 47(5), e70516. https://doi.org/10.1002/hbm.70516

BibTeX

@article{gohil2026effects,
author = {Gohil, Chetan and Kohl, Oliver and Pitt, Jemma and van Es, Mats W. J. and Quinn, Andrew J. and Vidaurre, Diego and Turner, Martin R. and Nobre, Anna C. and Woolrich, Mark W.},
title = {{Effects of Age on Resting-State Cortical Networks}},
journal = {Human brain mapping},
year = {2026},
month = apr,
volume = {47},
number = {5},
pages = {e70516},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/hbm.70516},
url = {https://doi.org/10.1002/hbm.70516},
pmid = {41889066},
pmcid = {PMC13081697}
}

RIS

TY - JOUR
AU - Gohil, Chetan
AU - Kohl, Oliver
AU - Pitt, Jemma
AU - van Es, Mats W. J.
AU - Quinn, Andrew J.
AU - Vidaurre, Diego
AU - Turner, Martin R.
AU - Nobre, Anna C.
AU - Woolrich, Mark W.
TI - Effects of Age on Resting-State Cortical Networks
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/04/01
VL - 47
IS - 5
SP - e70516
SN - 1065-9471
PB - Wiley
DO - 10.1002/hbm.70516
UR - https://doi.org/10.1002/hbm.70516
LA - en
ER -

CSL-JSON

{
"id": "10.1002/hbm.70516",
"type": "article-journal",
"title": "Effects of Age on Resting-State Cortical Networks",
"container-title": "Human brain mapping",
"author": [
{
"family": "Gohil",
"given": "Chetan"
},
{
"family": "Kohl",
"given": "Oliver"
},
{
"family": "Pitt",
"given": "Jemma"
},
{
"family": "van Es",
"given": "Mats W. J."
},
{
"family": "Quinn",
"given": "Andrew J."
},
{
"family": "Vidaurre",
"given": "Diego"
},
{
"family": "Turner",
"given": "Martin R."
},
{
"family": "Nobre",
"given": "Anna C."
},
{
"family": "Woolrich",
"given": "Mark W."
}
],
"container-title-short": "Hum Brain Mapp",
"volume": "47",
"issue": "5",
"page": "e70516",
"DOI": "10.1002/hbm.70516",
"PMID": "41889066",
"PMCID": "PMC13081697",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/hbm.70516",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
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.1038/s41593-025-02052-8 [code]
Large-scale cortical functional networks are organized in structured cycles.
Journal: Nature neuroscience
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, MEG, 18 references, 3 authors
[2] doi:10.1162/imag.a.1190 [code]
Canonical Hidden Markov Model Networks for studying M/EEG.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, MEG, 18 references, 2 authors
[3] doi:10.7554/elife.91949 [code]
osl-dynamics, a toolbox for modeling fast dynamic brain activity.
Journal: eLife
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, 9 references, 3 authors
[4] doi:10.1016/j.pneurobio.2025.102865 [code]
Divergence of cortical neurophysiology across different neurodegenerative disorders compared to healthy ageing.
Journal: Progress in neurobiology
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, MEG, 10 references, 2 authors
[5] doi:10.1002/hbm.70018 [code]
Comparison between EEG and MEG of static and dynamic resting-state networks.
Journal: Human brain mapping
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, MEG, 9 references, 2 authors
[6] doi:10.1371/journal.pbio.3003461 [code]
Distinct alpha networks modulate different aspects of perceptual decision-making.
Journal: PLoS biology
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, MEG, 10 references, author Mats W. J. van Es
[7] doi:10.1016/j.neuroimage.2022.119595 [code]
Mixtures of large-scale dynamic functional brain network modes.
Journal: NeuroImage
In common: Numba, MNE-Python, Nilearn, 8 other tools, 11 references, 2 authors
[8] doi:10.1093/braincomms/fcae164 [code]
The cortical neurophysiological signature of amyotrophic lateral sclerosis.
Journal: Brain communications
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, MEG, 6 references, 2 authors
[9] doi:10.1162/imag_a_00082 [code]
The GLM-spectrum: A multilevel framework for spectrum analysis with covariate and confound modelling.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, 6 references, 2 authors
[10] doi:10.1038/s41531-026-01372-1 [code]
Varying patterns of association between cortical large-scale networks and subthalamic nucleus activity in Parkinson's disease.
Journal: NPJ Parkinson's disease
In common: OHBA Software Library (OSL), Numba, MNE-Python, 10 other tools, 11 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.1002/hbm.70516.svg)](https://openscicode.org/badge/doi/10.1002/hbm.70516)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1002/hbm.70516.svg
   :target: https://openscicode.org/badge/doi/10.1002/hbm.70516
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1002/hbm.70516"><img src="https://openscicode.org/badge/doi/10.1002/hbm.70516.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.