OSCR

Measurement prediction and power analysis for fNIRS and DOT.

Code ↔ Paper

14 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 14 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 › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_forward_model.m, lines 61–136 · score 0.79 · cerebrospinal fluid, optical properties, forward modeling, skull, tissue, scalp
  2. [2] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+fwdcomp/computeJChromBrain.m, the whole file · a weak match · score 0.76 · log intensity, spectral Jacobian, mesh node, head model, NIRFAST, matrix
  3. [3] § Methods › Cluster-based permutation test power analyses ↔ python/fnirspower_py/cluster_stats.py, lines 24–74 · score 0.75 · permutation cluster, adjacency matrix, MNE, sparse, threshold, Python
  4. [4] § Methods › Experimental dataset ↔ matlab/+fnirspower/+nirsproc/preprocess.m, the whole file · a weak match · score 0.72 · source detector distances, spike, accelerometer, filtered, polynomials, Motion
  5. [5] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+fwdcomp/computeJChromBrain.m, the whole file · a weak match · score 0.69 · extinction coefficient matrix, way pathlength, pathlength normalization, spectral, Absorption, modeling
  6. [6] § Methods › Experimental dataset ↔ matlab/+fnirspower/+pipeline/run_subject_glm.m, lines 1–60 · score 0.69 · modeled hemodynamic response, nuisance regressors, GLM, reconstruction, absorption, channel
  7. [7] § Methods › Modeling of between-subject variance via simulation of subject-specific cortical sources ↔ matlab/+fnirspower/+pipeline/run_measurement_prediction.m, lines 1–60 · score 0.62 · ua map, millimeter, noiseless, forward model, Gaussian, Fractional
  8. [8] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_subject_glm.m, lines 1–60 · score 0.62 · extinction coefficient matrix, spectral conversion, forward modeling, Absorption, channel
  9. [9] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_measurement_prediction.m, lines 1–60 · score 0.61 · iso2mesh, ua maps, forward modeling, tetrahedral, wavelength, head
  10. [10] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_absorption_estimation.m, lines 1–60 · score 0.61 · extinction coefficients, ua map, absorption changes, node, magnitude, channel
  11. [11] § Methods › Modeling of between-subject variance via simulation of subject-specific cortical sources ↔ matlab/+fnirspower/+measpred/compute_subject_ROI.m, lines 1–55 · score 0.59 · mesh node, millimeter, snap, spherical, binary, nearest
  12. [12] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+absmag/muA_ls_obj_HbT_rel.m, the whole file · a weak match · score 0.55 · stacked ua vector, absorption changes
  13. [13] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+recon/reconstruct_mu_a.m, the whole file · a weak match · score 0.55 · Tikhonov regularization, absorption changes, wavelength, map, node, ua
  14. [14] § Methods › Estimation of within-subject variance ↔ matlab/+fnirspower/+variance/run_glm_beta_resampling.m, the whole file · a weak match · score 0.51 · resampled, replacement, duration, concatenating, baseline, regressors

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 · 77 lines · 3.4 KB · GPL-3.0 · 2 matches

  1. function [J_chrom, J_chrom_brain, pathlength_tot, pathlength_brain, J_chrom_full] = computeJChromBrain(model, epsilon_mm_uM, brain_nodes_idx)
  2. % computeJChromBrain Compute normalized spectral Jacobians and pathlengths
  3. %
  4. % [J_chrom, J_chrom_brain, pathlength_tot, pathlength_brain, J_chrom_full]
  5. % = computeJChromBrain(nirs_model, epsilon_mm_uM, brain_nodes_idx)
  6. %
  7. % Computes the pathlength-normalized spectral Jacobian (dOD/d[Hb]) for
  8. % a 5-layer head model, and extracts the subset corresponding to brain
  9. % nodes.
  10. %
  11. %
  12. % Inputs:
  13. % nirs_model - struct with fields:
  14. % .J_760.complex : complex Jacobian at 760 nm
  15. % .J_850.complex : complex Jacobian at 850 nm
  16. % .DATA760.complex: complex fluence at 760 nm
  17. % .DATA850.complex: complex fluence at 850 nm
  18. % epsilon_mm_uM - 2×2 extinction coefficient matrix [
  19. % ε_HbO_760, ε_HbR_760;
  20. % ε_HbO_850, ε_HbR_850 ] (µM^{-1}·mm^{-1})
  21. % brain_nodes_idx - indices of mesh nodes belonging to brain region
  22. %
  23. % Outputs:
  24. % J_chrom - (2N_ch × 2N_v) spectral Jacobian normalized by
  25. % L-vector (total optical pathlength)
  26. % J_chrom_brain - subset of J_chrom for brain nodes only (columns
  27. % selected by brain_nodes_idx)
  28. % pathlength_tot - total two-way pathlength vector (length 2N_ch)
  29. % pathlength_brain- brain-only two-way pathlength (length 2N_ch)
  30. % J_chrom_full - raw (unnormalized) spectral Jacobian
  31. %
  32. % Dependencies:
  33. % None beyond basic MATLAB functions.
  34. %% 1. Unpack model fields
  35. J_760 = model.J_760; % complex Jacobian @760nm
  36. J_850 = model.J_850; % complex Jacobian @850nm
  37. D760 = model.DATA760; % complex fluence @760nm
  38. D850 = model.DATA850; % complex fluence @850nm
  39. idx = brain_nodes_idx; % brain node indices
  40. %% 2. Determine dimensions
  41. n_ch = size(J_760.complex, 1); % number of channels
  42. n_vertices = size(J_760.complex, 2); % number of mesh nodes
  43. %% 3. Compute log-intensity Jacobians (d ln I / dµ) - same as NIRFAST basic Jacobian...
  44. phi760 = D760.complex;
  45. I760 = abs(phi760).^2; % intensity @760nm
  46. JlnI760 = 2 * real(conj(phi760)./I760 .* J_760.complex);
  47. phi850 = D850.complex;
  48. I850 = abs(phi850).^2; % intensity @850nm
  49. JlnI850 = 2 * real(conj(phi850)./I850 .* J_850.complex);
  50. %% 4. Assemble absorption Jacobian matrix J_mu
  51. % Upper block for 760, lower block for 850
  52. J_mu = [abs(JlnI760), zeros(n_ch, n_vertices);
  53. zeros(n_ch, n_vertices), abs(JlnI850)];
  54. %% 5. Compute spectral Jacobian (unnormalized)
  55. % Use Kronecker to apply inverse extinction matrix across channels
  56. J_chrom_full = kron(inv(epsilon_mm_uM), eye(n_ch)) * J_mu;
  57. %% 6. Normalize by total pathlength (L-vector)
  58. pathlength_tot = sum(J_mu, 2) / 2; % two-way pathlength -> one-way
  59. J_chrom = bsxfun(@rdivide, J_chrom_full, pathlength_tot);
  60. %% 7. Extract brain-only columns from normalized Jacobian
  61. % Columns for HbO then HbR at brain nodes
  62. J_chrom_brain = J_chrom(:, [idx, idx + n_vertices]);
  63. %% 8. Compute brain-only pathlength vector
  64. J_mu_brain = [abs(JlnI760(:, idx)), zeros(n_ch, numel(idx));
  65. zeros(n_ch, numel(idx)), abs(JlnI850(:, idx))];
  66. pathlength_brain= sum(J_mu_brain, 2) / 2;
  67. end

computeJChromBrain.m at commit e255cb0, under GPL-3.0 · at the source

Overview

Authors: Eli Bulger1, Jiaming Cao1, Abigail L Noyce2,3, Barbara G Shinn-Cunningham1,2,3,4, Jana M Kainerstorfer1,2,4
  1. Department of Biomedical Engineering, Carnegie Mellon University, Pittsburgh, PA, United States
  2. Neuroscience Institute, Carnegie Mellon University, Pittsburgh, PA, United States
  3. Department of Psychology, Carnegie Mellon University, Pittsburgh, PA, United States
  4. Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA, United States
Institutions: Carnegie Mellon University (United States)
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1289
Dates: received 31 July 2025; accepted 7 June 2026; published online 1 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1289 · PMID 42395914 · PMCID PMC13326666 · OpenAlex W7164372924
Open access: diamond, a free copy (OpenAlex)
Status: code verified
Categories: fNIRS (modality)
Methods: Spectral & time-frequency, Connectivity, Statistics, fMRI & imaging
Keywords: functional near-infrared spectroscopy, diffuse optical tomography, power analysis, forward modeling, cluster-based permutation testing, experimental design
Topic: Optical Imaging and Spectroscopy Techniques (Radiology, Nuclear Medicine and Imaging, Medicine), according to OpenAlex
Citations: not cited yet (Europe PMC); 59 references in the paper

Abstract

Functional near-infrared spectroscopy (fNIRS) and diffuse optical tomography (DOT) are valuable neuroscience tools, but their feasibility for some research questions can be uncertain due to interacting anatomical, measurement, and design limitations. Here, we present an experimentally informed computational framework for a priori power analysis that combines within- and between-subject variability estimates with forward-model–based estimates of task-evoked absorption changes to predict measurements. Cluster-based permutation tests applied to these measurements estimate statistical power for signal and contrast detection across sample sizes and stimulus block counts. We demonstrate how channel density and cortical source features—depth, size, spatial separation, and location—influence statistical power. Our approach reframes the physical constraints of fNIRS and DOT into interpretable design guidance and can be adopted to support principled power planning across diverse experimental designs.

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

esbulger/fnirs-power

License: GPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: e255cb074cddde6db31af221a46d81ee1a5ec94e, 17 June 2026
Languages: MATLAB (64), Python (8), Shell (2)
Size: 91 files, 74 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README, license file, environment (python/requirements.txt), documentation
Not found: CITATION.cff, tests, continuous integration
Tools: NumPy (6 files), Optimization Toolbox (4 files), Statistics and Machine Learning Toolbox (4 files), FieldTrip (3 files), Signal Processing Toolbox (3 files), MNE-Python (2 files), h5py (1 file), Matplotlib (1 file), SciPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
76 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:

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

User-friendly code to enable adoption of our approach is provided as an open-source MATLAB and Python software package at https://github.com/esbulger/fnirs-power.

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

  • Funding: added Natural Sciences and Engineering Research Council of Canada; Office of Naval Research: MURI N00014-19-12332

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 5 authors, 6 keywords, 58 references.

Cite

This paper

Bulger, E., Cao, J., Noyce, A. L., Shinn-Cunningham, B. G., & Kainerstorfer, J. M. (2026). Measurement prediction and power analysis for fNIRS and DOT. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1289. https://doi.org/10.1162/imag.a.1289

BibTeX

@article{bulger2026measurement,
author = {Bulger, Eli and Cao, Jiaming and Noyce, Abigail L and Shinn-Cunningham, Barbara G and Kainerstorfer, Jana M},
title = {{Measurement prediction and power analysis for fNIRS and DOT}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = jul,
volume = {4},
pages = {IMAG.a.1289},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1289},
url = {https://doi.org/10.1162/imag.a.1289},
pmid = {42395914},
pmcid = {PMC13326666}
}

RIS

TY - JOUR
AU - Bulger, Eli
AU - Cao, Jiaming
AU - Noyce, Abigail L
AU - Shinn-Cunningham, Barbara G
AU - Kainerstorfer, Jana M
TI - Measurement prediction and power analysis for fNIRS and DOT
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/07/01
VL - 4
SP - IMAG.a.1289
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1289
UR - https://doi.org/10.1162/imag.a.1289
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1289",
"type": "article-journal",
"title": "Measurement prediction and power analysis for fNIRS and DOT",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Bulger",
"given": "Eli"
},
{
"family": "Cao",
"given": "Jiaming"
},
{
"family": "Noyce",
"given": "Abigail L"
},
{
"family": "Shinn-Cunningham",
"given": "Barbara G"
},
{
"family": "Kainerstorfer",
"given": "Jana M"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1289",
"DOI": "10.1162/imag.a.1289",
"PMID": "42395914",
"PMCID": "PMC13326666",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1289",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
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.1117/1.nph.12.2.025011 [code]
NIRSTORM: a Brainstorm extension dedicated to functional near-infrared spectroscopy data analysis, advanced 3D reconstructions, and optimal probe design
Journal: —
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, Matplotlib, 1 other tool, fNIRS, 8 references
[2] doi:10.1117/1.nph.13.s3.s32602 [code]
Cedalion tutorial: a Python-based framework for comprehensive analysis of multimodal fNIRS and DOT from the lab to the everyday world.
Journal: Neurophotonics
In common: fNIRS, 7 references
[3] doi:10.1117/1.nph.13.3.035002
Disrupted functional connectivity during stroke recovery revealed via bedside optical neuroimaging.
Journal: Neurophotonics
In common: fNIRS, 6 references
[4] doi:10.1016/j.isci.2026.116287 [code]
Neural selectivity for social interactions in the infant brain.
Journal: iScience
In common: MNE-Python, SciPy, Matplotlib, 1 other tool, 5 references
[5] doi:10.1038/s41597-025-06397-4 [code]
MEG-SCANS - A comprehensive magnetoencephalography speech dataset with Stories, Chirps and Noisy Sentences
Journal: —
In common: FieldTrip, MNE-Python, Signal Processing Toolbox, 4 other tools, 2 references
[6] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: Optimization Toolbox, FieldTrip, Signal Processing Toolbox, 4 other tools, 1 reference
[7] doi:10.1002/hbm.70602 [code]
Neuroimaging Correlates of Post-Stroke Pain After Ischemic Stroke: Secondary Analysis of the INSPiRE-TMS Trial.
Journal: Human brain mapping
In common: Optimization Toolbox, FieldTrip, h5py, 5 other tools
[8] doi:10.1038/s41586-026-10631-3 [code]
A prognostic human brain network for diffuse midline glioma.
Journal: Nature
In common: Optimization Toolbox, FieldTrip, h5py, 5 other tools
[9] doi:10.1111/ene.70678 [code]
Who Falls After a Stroke? Evidence From a Prospective Stroke Cohort.
Journal: European journal of neurology
In common: Optimization Toolbox, FieldTrip, h5py, 5 other tools
[10] doi:10.1016/j.celrep.2026.117404 [code]
Action and rest tremor map to distinct networks within the primary motor cortex.
Journal: Cell reports
In common: Optimization Toolbox, FieldTrip, h5py, 5 other tools

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.