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.

11 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 14 matches · 6 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_forward_model.m, lines 61 to 136 · score 0.79 · cerebrospinal fluid, optical properties, forward modeling, skull, tissue, scalp · block oscr:b:11K4CTETGT9Y3-J · Report a mismatch
  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 · block oscr:b:RMYN4HJ76RDFH-1 · Report a mismatch
  3. [3] § Methods › Cluster-based permutation test power analyses ↔ python/fnirspower_py/cluster_stats.py, lines 24 to 74 · score 0.75 · permutation cluster, adjacency matrix, MNE, sparse, threshold, Python · block oscr:b:4NWV2K0XFS99F-9 · Report a mismatch
  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 · block oscr:b:QVPVKAZ18758C-D · Report a mismatch
  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 · block oscr:b:RMYN4HJ76RDFH-1 · Report a mismatch
  6. [6] § Methods › Experimental dataset ↔ matlab/+fnirspower/+pipeline/run_subject_glm.m, lines 1 to 60 · score 0.69 · modeled hemodynamic response, nuisance regressors, GLM, reconstruction, absorption, channel · block oscr:b:VYXYX2MB1RYGW-A · Report a mismatch
  7. [7] § Methods › Modeling of between-subject variance via simulation of subject-specific cortical sources ↔ matlab/+fnirspower/+pipeline/run_measurement_prediction.m, lines 1 to 60 · score 0.62 · ua map, millimeter, noiseless, forward model, Gaussian, Fractional · block oscr:b:J85RBXW2KTSWB-A · Report a mismatch
  8. [8] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_subject_glm.m, lines 1 to 60 · score 0.62 · extinction coefficient matrix, spectral conversion, forward modeling, Absorption, channel · block oscr:b:VYXYX2MB1RYGW-A · Report a mismatch
  9. [9] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_measurement_prediction.m, lines 1 to 60 · score 0.61 · iso2mesh, ua maps, forward modeling, tetrahedral, wavelength, head · block oscr:b:J85RBXW2KTSWB-A · Report a mismatch
  10. [10] § Methods › Absorption magnitude estimation ↔ matlab/+fnirspower/+pipeline/run_absorption_estimation.m, lines 1 to 60 · score 0.61 · extinction coefficients, ua map, absorption changes, node, magnitude, channel · block oscr:b:R8A00WPW5DENH-5 · Report a mismatch
  11. [11] § Methods › Modeling of between-subject variance via simulation of subject-specific cortical sources ↔ matlab/+fnirspower/+measpred/compute_subject_ROI.m, lines 1 to 55 · score 0.59 · mesh node, millimeter, snap, spherical, binary, nearest · block oscr:b:HN4RKQETA4RP4-Q · Report a mismatch
  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 · block oscr:b:4NEGM4VXTBTCG-2 · Report a mismatch
  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 · block oscr:b:E5K9W2RJ57G69-T · Report a mismatch
  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 · block oscr:b:V544BK8S3PNGJ-H · 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 · 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 (how the code is found and 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.9.s2.s24001 [code]
Optical imaging and spectroscopy for the study of the human brain: status report.
Journal: Neurophotonics
In common: MNE-Python, Signal Processing Toolbox, SciPy, 2 other tools, fNIRS, 16 references
[2] doi:10.1162/imag.a.974 [code]
Multimodal fNIRS-EEG sensor fusion: Review of data-driven methods and perspective for naturalistic brain imaging.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: MNE-Python, SciPy, Matplotlib, 1 other tool, fNIRS, 11 references
[3] doi:10.1117/1.nph.12.3.035002
Robust photogrammetric scalp morphology estimation for functional optical neuroimaging.
Journal: Neurophotonics
In common: fNIRS, 12 references
[4] doi:10.1117/1.nph.13.1.015005 [code]
Group-level test-retest reliability assessment using systemic physiology augmented functional near-infrared spectroscopy during a passive-listening task.
Journal: Neurophotonics
In common: MNE-Python, h5py, SciPy, 2 other tools, fNIRS, 8 references
[5] doi:10.1162/imag.a.153
Mapping brain function underlying naturalistic motor observation and imitation using high-density diffuse optical tomography.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: fNIRS, 10 references
[6] doi:10.1162/imag.a.54 [code]
Functional brain mapping using whole-head very high-density diffuse optical tomography.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: fNIRS, 10 references
[7] doi:10.1117/1.nph.12.1.015015 [code]
Intra-subject test-retest reliability for auditory-evoked functional near-infrared spectroscopy responses: effects of systemic physiology correction.
Journal: Neurophotonics
In common: MNE-Python, h5py, SciPy, 2 other tools, fNIRS, 7 references
[8] 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: n/a
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, Matplotlib, 1 other tool, fNIRS, 8 references
[9] doi:10.1117/1.nph.13.2.025001 [code]
Surface-based image reconstruction optimization for high-density functional near-infrared spectroscopy.
Journal: Neurophotonics
In common: MNE-Python, h5py, SciPy, 2 other tools, fNIRS, 6 references
[10] doi:10.1002/hbm.26684
Mapping brain function in adults and young children during naturalistic viewing with high-density diffuse optical tomography.
Journal: Human brain mapping
In common: fNIRS, 9 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.1162/imag.a.1289.svg)](https://openscicode.org/badge/doi/10.1162/imag.a.1289)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1162/imag.a.1289.svg
   :target: https://openscicode.org/badge/doi/10.1162/imag.a.1289
   :alt: OSCR

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