OSCR

On variability in local field potentials.

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.

The 3 matches
  1. [1] § Materials and methods › Datasets › Simulated data ↔ Fig4.m, lines 29–44 · score 0.64 · trial duration, simulated subjects, stimulus period, noise
  2. [2] § Results › Overview ↔ Fig1_4.m, lines 41–80 · score 0.56 · event related potential, sliding windows, stimulus onset, ERP, Figure 1, ITV
  3. [3] § Materials and methods › Analysis ↔ Fig1_4.m, lines 41–80 · score 0.50 · sliding window, trial variance, smoothed, ATV

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 · 162 lines · 7.1 KB · MIT · 2 matches

  1. %% plot_fig1_4
  2. %
  3. % Plots example LFP trials, ERP, across-trial variability (ATV), and
  4. % intra-trial variability (ITV). Also examines how power and its
  5. % coefficient of variation (CV) change when stimulus amplitude is scaled.
  6. % Used to reproduce Figs. 1 and 4 of the associated publication.
  7. %
  8. % Requires:
  9. % - Fig1_4_data<band><filt>.mat containing: Sig, Sig1, Sig2, Sig3
  10. % - shadedErrorBar.m (Mathworks File Exchange)
  11. %
  12. % Author: [email hidden]
  13. % Date: 08.08.2026
  14. clc; clear all; close all;
  15. %% -- Configuration ----------------------------------------------------------
  16. filter_flag = 0; % 1 = filtered (Fig. 1) 0 = wideband (Figs. 1 & 4)
  17. % Smoothing windows (samples)
  18. lfp_smooth_win = 5; % smoothing for raw LFP traces
  19. pow_smooth_win = 5; % smoothing for power traces
  20. itv_window = 50; % sliding window for ITV computation
  21. % Loop over frequency bands if data is filtered
  22. if filter_flag == 0
  23. band_conditions = 1;
  24. else
  25. band_conditions = 1:2;
  26. end
  27. %% -- Main loop --------------------------------------------------------------
  28. for band = band_conditions
  29. load(['Fig1_4_data', num2str(band), num2str(filter_flag), '.mat'], ...
  30. 'Sig', 'Sig1', 'Sig2', 'Sig3'); % loads pre-processed LFP signals
  31. set(groot, 'defaultAxesTickDir', 'out');
  32. set(groot, 'defaultAxesTickDirMode', 'manual');
  33. %% -- Fig. 1: ATV sample plot ---------------------------------------------
  34. trial_plot_idx = 1:20; % subset of trials to display
  35. time_labels = {'-.8', '-.4', '0', '.4', '.8'};
  36. time_ticks = [1, 400, 800, 1200, 1600];
  37. stim_line = 800 - lfp_smooth_win; % stimulus onset (adjusted for smoothing)
  38. figure;
  39. % Raw trial traces
  40. subplot(2, 2, 1);
  41. plot(Sig(trial_plot_idx, :)', 'LineWidth', .1, 'Color', 'k');
  42. line([stim_line; stim_line], ylim, 'LineStyle', '--', 'Color', 'k');
  43. set(gca, 'XTick', time_ticks, 'XTickLabel', time_labels);
  44. xlabel('Time from stim-onset (s)'); ylabel('LFP amplitude');
  45. % Event-related potential (ERP = trial average)
  46. subplot(2, 2, 2);
  47. plot(nanmean(Sig)', 'LineWidth', .5, 'Color', 'k');
  48. line([stim_line; stim_line], ylim, 'LineStyle', '--', 'Color', 'k');
  49. set(gca, 'XTick', time_ticks, 'XTickLabel', time_labels);
  50. xlabel('Time from stim-onset (s)'); ylabel('ERP');
  51. % ATV (across-trial variance at each time point)
  52. subplot(2, 2, 3);
  53. plot(var(Sig)', 'LineWidth', .5, 'Color', 'k');
  54. line([stim_line; stim_line], ylim, 'LineStyle', '--', 'Color', 'k');
  55. set(gca, 'XTick', time_ticks, 'XTickLabel', time_labels);
  56. xlabel('Time from stim-onset (s)'); ylabel('ATV');
  57. % ITV (sliding-window within-trial variance)
  58. itv_timecourse = zeros(1, size(Sig2, 2) - itv_window);
  59. for t_idx = 1 : size(Sig2, 2) - itv_window
  60. itv_timecourse(t_idx) = nanmean(var(Sig2(:, t_idx : t_idx+itv_window), [], 2)');
  61. end
  62. subplot(2, 2, 4);
  63. plot(itv_timecourse, 'LineWidth', .5, 'Color', 'k');
  64. line([800; 800], ylim, 'LineStyle', '--', 'Color', 'k');
  65. line([800-itv_window; 800-itv_window], ylim, 'LineStyle', '--', 'Color', 'k');
  66. set(gca, 'XTick', time_ticks, 'XTickLabel', time_labels);
  67. xlabel('Time from stim-onset (s)'); ylabel('ITV');
  68. %% -- Fig. 4: Effect of amplitude scaling on power and CV -----------------
  69. if filter_flag == 0
  70. % Amplitude scale factors: 1×, 10×, 0.1× applied to stimulus period
  71. amplitude_scales = [1, 10, 0.1];
  72. subplot_counter = 1;
  73. power_label = 'Power';
  74. for scale_idx = 1:3
  75. figure(200 + 100*band);
  76. amp_scale = amplitude_scales(scale_idx);
  77. % Scale the stimulus period (samples 801:1600)
  78. sig_scaled = Sig1;
  79. sig_scaled(:, 801:1600) = Sig1(:, 801:1600) .* amp_scale;
  80. sig_smoothed = smoothdata(sig_scaled, 2, 'movmean', lfp_smooth_win);
  81. % Signal, variance, and CV
  82. subplot(3, 6, subplot_counter); subplot_counter = subplot_counter + 1;
  83. plot(sig_smoothed(trial_plot_idx, :)', 'LineWidth', .5, 'Color', 'k');
  84. title(['Stim. ×', num2str(amp_scale)]);
  85. sig_variance = var(sig_smoothed);
  86. sig_auc = trapz(abs(sig_smoothed));
  87. subplot(3, 6, subplot_counter); subplot_counter = subplot_counter + 1;
  88. plot(sig_variance, 'LineWidth', .5, 'Color', 'k');
  89. if scale_idx == 1, title('Var(Signal)'); end
  90. subplot(3, 6, subplot_counter); subplot_counter = subplot_counter + 1;
  91. plot(sig_variance ./ sig_auc, 'LineWidth', .5, 'Color', 'k');
  92. if scale_idx == 1, title('CV(Signal)'); end
  93. % Power matrix
  94. power_matrix = zeros(size(Sig1));
  95. for tr = 1:size(Sig1, 1)
  96. power_matrix(tr, :) = smoothdata(abs(Sig1(tr, :).^2), 2, 'movmean', pow_smooth_win);
  97. end
  98. subplot(3, 6, subplot_counter); subplot_counter = subplot_counter + 1;
  99. plot(nanmean(power_matrix), 'LineWidth', .5, 'Color', 'k');
  100. if scale_idx == 1, title(['Mean(', power_label, ')']); end
  101. power_std = std(power_matrix);
  102. subplot(3, 6, subplot_counter); subplot_counter = subplot_counter + 1;
  103. plot(power_std, 'LineWidth', .5, 'Color', 'k');
  104. if scale_idx == 1, title(['SD(', power_label, ')']); end
  105. coeff_var = nanstd(power_matrix) ./ nanmean(power_matrix);
  106. subplot(3, 6, subplot_counter); subplot_counter = subplot_counter + 1;
  107. plot(coeff_var, 'LineWidth', .5, 'Color', 'k');
  108. if scale_idx == 1, title(['CV(', power_label, ')']); end
  109. %% -- ITV vs ATV scatter under amplitude scaling -------------------
  110. sig_rescaled = Sig3 .* amp_scale;
  111. clear atv_channels itv_channels;
  112. for ch = 1:size(sig_rescaled, 1)
  113. y_ch = squeeze(sig_rescaled(ch, :, :));
  114. atv_channels(ch, :) = mean(mean((y_ch - mean(y_ch, 1)).^2, 2), 1);
  115. itv_channels(ch, :) = mean(mean((y_ch - mean(y_ch, 2)).^2, 2), 1);
  116. end
  117. figure(1100 + 100*band);
  118. subplot(2, 3, scale_idx); hold on;
  119. [corr_r, corr_p] = corr(itv_channels, atv_channels, 'Type', 'Pearson');
  120. [fit_model, ~] = fit(itv_channels, atv_channels, 'poly1');
  121. fit_handle = plot(fit_model, itv_channels, atv_channels);
  122. set(fit_handle, 'LineWidth', 2, 'Color', [0 0 0]);
  123. scatter(itv_channels, atv_channels, 40, 'o', ...
  124. 'MarkerFaceColor', [.1 .1 .1], 'MarkerEdgeColor', [0 0 0], 'LineWidth', .2);
  125. corr_slope = polyfit(itv_channels, atv_channels, 1); corr_slope = corr_slope(1);
  126. legend('off');
  127. xlabel('ITV (a.u.)'); ylabel('ATV (a.u.)');
  128. title({['r = ', num2str(corr_r)], ...
  129. ['slope = ', num2str(corr_slope)], ...
  130. ['p = ', num2str(corr_p)]});
  131. box off; axis tight; axis square;
  132. line([0, max(xlim)], [0, max(ylim)], 'LineStyle', '-', 'Color', 'b');
  133. end % amplitude scale loop
  134. end % wideband check
  135. end % band loop

Fig1_4.m at commit 22d1788, under MIT · at the source

Overview

Authors: Mohsen Parto-Dezfouli1,2,3,4, Elizabeth L Johnson5,6, Eleni Psarou2, Conrado Arturo Bosman7, B Suresh Krishna8, Pascal Fries1,2
  1. Max Planck Institute for Biological Cybernetics, Tübingen, Germany
  2. Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society, Frankfurt, Germany
  3. Goethe University Frankfurt, University Hospital, Department for Psychiatry, Psychosomatic Medicine and Psychotherapy, Frankfurt, Germany
  4. Goethe University Frankfurt, Cooperative Brain Imaging Center - CoBIC, Frankfurt, Germany, Frankfurt, Germany
  5. Departments of Medical Social Sciences and Pediatrics, Northwestern University, Chicago, IL USA
  6. Department of Psychology, Northwestern University, Evanston, IL USA
  7. Cognitive and Systems Neuroscience Group, Swammerdam Institute for Life Sciences, University of Amsterdam, Amsterdam, The Netherlands
  8. Department of Physiology, McGill University, Montreal, QC Canada
Journal: Communications biology, volume 9, issue 1, article 1165
Dates: received 8 May 2025; accepted 24 August 2026; published online 2 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s42003-026-10881-x · PMID 42686952 · PMCID PMC13538653 · OpenAlex W4408987257
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), MEG (modality), extracellular electrophysiology (units, LFP) (modality), human (organism)
Methods: Spectral & time-frequency, Connectivity, Statistics, Preprocessing, Evoked potentials
Keywords: Neural encoding, Neural decoding, Sensory processing
MeSH: Evoked Potentials*, Neurons*, Action Potentials, Animals, Electroencephalography, Humans, Local Field Potential Measurement, Magnetoencephalography, Signal-To-Noise Ratio (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Regional Development Fund (604102, 200728, 1U54MH091657); Deutsche Forschungsgemeinschaft (FOR1847, FR2557/5-1, FR2557/2-1, FOR 1847 FR2557/2-1, FR2557/5-1-CORNET, 1U54MH091657, FR2557/7-1); National Institutes of Health
Citations: cited by 1 paper (Europe PMC); 64 references in the paper

Abstract

Neuronal variability is a fundamental feature of neuronal coding. In spiking activity, across-trial variance (ATV) normalized by mean spike count (i.e., the Fano factor) shows stimulus-induced quenching. ATV has also been studied in electro/magneto-encephalography (E/MEG) without normalization, revealing effects of stimulation and cognition. Here we show that outside of event-related potentials (ERPs), ATV for both EEG and local field potential (LFP) is nearly identical to intra-trial variance (ITV), which equals signal power. ATV–ITV correlation decreases during ERPs, proportional to how much the ERP explains total power. While EEG ATV shows post-stimulus quenching, LFP ATV does not, particularly in the gamma band, where power increases after stimulus onset. To provide an independent variability measure, we introduce CV(power), the coefficient of variation of signal power, as a mean-normalized metric. CV(power) is the inverse of the signal-to-noise ratio of power and thus related to decodability, offering a variability measure applicable to E/MEG and LFP.

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

Zenodo 21959626

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Languages: MATLAB (6)
Size: 6 files, 6 scripts
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
  • 26 September 2026: the link answers (HTTP 200)
6 files
At the source:

Mohsenparto/On_ATV_in_LFP

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 22d17888d4c125210f7d6f4a4fd945b2dbb10e78, 16 August 2026
Languages: MATLAB (6)
Size: 8 files, 6 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
8 files

Code availability

The scripts for generating simulations and for analyzing neuronal and simulated data using MATLAB 2020b are publicly available on Zenodo [https://doi.org/10.5281/zenodo.21959626] and can be cited as63.

Reproduced under the paper's license (CC BY), from the paper cited above.

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;
  • 12 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

Datasets cited

Data availability

The data underlying the main figures are publicly available on Zenodo [https://doi.org/10.5281/zenodo.21946658] and can be cited as62. The human EEG data analyzed in the current study were obtained from a previously published repository at [https://crcns.org/data-sets/pfc/pfc-5/about-pfc-5]. These datasets were originally generated and described in previous publications30,37,56.

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 3, 28 September 2026

  • Funding: added European Commission: 604102, 200728, 1U54MH091657; Deutsche Forschungsgemeinschaft: FOR1847, FR2557/5-1, FR2557/2-1, FOR 1847 FR2557/2-1, FR2557/5-1-CORNET, 1U54MH091657, FR2557/7-1; National Institutes of Health

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 3 keywords, 9 MeSH terms, 60 references.

Cite

This paper

Parto-Dezfouli, M., Johnson, E. L., Psarou, E., Bosman, C. A., Krishna, B. S., & Fries, P. (2026). On variability in local field potentials. Communications biology, 9(1), 1165. https://doi.org/10.1038/s42003-026-10881-x

BibTeX

@article{partodezfouli2026variability,
author = {Parto-Dezfouli, Mohsen and Johnson, Elizabeth L and Psarou, Eleni and Bosman, Conrado Arturo and Krishna, B Suresh and Fries, Pascal},
title = {{On variability in local field potentials}},
journal = {Communications biology},
year = {2026},
month = sep,
volume = {9},
number = {1},
pages = {1165},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/s42003-026-10881-x},
url = {https://doi.org/10.1038/s42003-026-10881-x},
pmid = {42686952},
pmcid = {PMC13538653}
}

RIS

TY - JOUR
AU - Parto-Dezfouli, Mohsen
AU - Johnson, Elizabeth L
AU - Psarou, Eleni
AU - Bosman, Conrado Arturo
AU - Krishna, B Suresh
AU - Fries, Pascal
TI - On variability in local field potentials
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/09/02
VL - 9
IS - 1
SP - 1165
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/s42003-026-10881-x
UR - https://doi.org/10.1038/s42003-026-10881-x
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s42003-026-10881-x",
"type": "article-journal",
"title": "On variability in local field potentials",
"container-title": "Communications biology",
"author": [
{
"family": "Parto-Dezfouli",
"given": "Mohsen"
},
{
"family": "Johnson",
"given": "Elizabeth L"
},
{
"family": "Psarou",
"given": "Eleni"
},
{
"family": "Bosman",
"given": "Conrado Arturo"
},
{
"family": "Krishna",
"given": "B Suresh"
},
{
"family": "Fries",
"given": "Pascal"
}
],
"container-title-short": "Commun Biol",
"volume": "9",
"issue": "1",
"page": "1165",
"DOI": "10.1038/s42003-026-10881-x",
"PMID": "42686952",
"PMCID": "PMC13538653",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s42003-026-10881-x",
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
2
]
]
}
}

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/s41467-026-70287-5 [code]
Cortical-limbic circuit dynamics of approach-avoidance conflict in humans.
Journal: Nature communications
In common: EEG, 2 references, author Elizabeth L Johnson
[2] doi:10.1038/s41467-026-71725-0 [code]
Interactions across hemispheres in prefrontal cortex reflect global cognitive processing.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, 4 references
[3] doi:10.1016/j.isci.2026.116240 [code]
Physical activity enhances theta-periodicity of visual attentional allocation.
Journal: iScience
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, 3 references
[4] doi:10.1016/j.crmeth.2026.101481 [code]
A hybrid micro-ECoG for functionally targeted multi-site and multi-scale investigation.
Journal: Cell reports methods
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, extracellular electrophysiology (units, LFP), 2 references
[5] doi:10.1016/j.xpro.2026.104833 [code]
Protocol for mapping frequency-specific information transfer between cortical areas using ECoG and Granger causality.
Journal: STAR protocols
In common: 5 references
[6] doi:10.1111/ejn.70641
Distinct High-Gamma Signals in Primate Prefrontal Cortex Differentiate Cue Information, Preference Revision, and Expected Reward During Value-Based Decisions.
Journal: The European journal of neuroscience
In common: crcns.org/data-sets/pfc, extracellular electrophysiology (units, LFP)
[7] doi:10.1162/imag.a.1359 [code]
Distinct roles of brain network flexibility in motor learning across age.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, EEG, 1 reference
[8] doi:10.1523/jneurosci.0154-26.2026 [code]
Faster but less precise: expectation enhances response speed while reducing sensory fidelity.
Journal: The Journal of neuroscience : the official journal of the Society for Neuroscience
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, EEG, 1 reference
[9] doi:10.1016/j.patter.2026.101590 [code]
Density-based longitudinal neuron tracking in high-density electrophysiological recordings.
Journal: Patterns (New York, N.Y.)
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, extracellular electrophysiology (units, LFP), 1 reference
[10] doi:10.1073/pnas.2603966123 [code]
Oxytocin selectively biases sensory-prefrontal communication through network-level suppression and theta coupling.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, extracellular electrophysiology (units, LFP), 1 reference

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.