fNIRS in Neonatal Research

Experimental design, data analysis and real-data analysis in Python

Institut de Recerca Sant Joan de Déu (IRSJD)

May 15, 2026

About us

NeuroDevelopment and Comparative Cognition (NeuroDevCo)

HORIZON-ERC-2023-StG: GALA (Gates to Language)

Functional Near-Infrared Spectroscopy

Functional Near-Infrared Spectroscopy



Some materials have different optical properties than others (i.e., absorbe more light at some wavelengths).

We can study the composition of an object by analysing how light behaves when passing through it (i.g., spectroscopy)

Functional Near-Infrared Spectroscopy

Functional Near-Infrared Spectroscopy

Oxy-haemoglobin (HbO) and deoxy-haemoglobin (HbR) absorb near-infrared light differently

NIR light absorption by Hb

Functional Near-Infrared Spectroscopy



If we shine near-infrared light into biological tissue, we can estimate changes in relative concentration of HbO and HbR time

modified Beer-Lambert Law (mBLL)

  • Describes changes in light absorption of underlying tissue using continuous waves methods
  • Based on a generalization of Beer-Lambert law
  • Assumes that the scattering properties of tissue do not vary with time

Functional Near-Infrared Spectroscopy



  • Blood-Oxygen-Level-Dependent (BOLD) response
  • Surplus of HbO sent to recently active brain areas
  • Takes ~15 seconds recover baseline

Functional Near-Infrared Spectroscopy



Canonical Haemodynamic Response Function (HRF)

Cinciute (2019)

fNIRS for experimental tasks



Hramov et al. (2020)

Resources

The fNIRS Glossary project (Stute et al. 2025)

https://openfnirs.org/standards/fnirs-glossary-project/

Resources

Society for Functional Near Infrared Spectroscopy (SFNIRS)

fNIRS for experimental tasks



Advantages

  • Commercially available
  • Relatively easy capping
  • Flexible and portable, robust to movement*

Limitations

  • Limited access to sub-cortical regions (~3 cm)*
  • Temporal resolution constrained by haemodynamics
  • Relatively pricey
  • Limited spatial resolution

fNIRS in neonates

fNIRS at the Hospital Sant Joan de Déu


Healthy participants: ≥ 2,700 g & ≥ 8 Apgar-10 & ≥37 weeks post-mentrual age

Tested 6-72 hours after delivery

Cot-side testing inside hospital room (Àrea de la Dona)


fNIRS at the Hospital Sant Joan de Déu

fNIRS at the Hospital Sant Joan de Déu

Setup

fNIRS at the Hospital Sant Joan de Déu

Setup

fNIRS at the Hospital Sant Joan de Déu

Montage/optode layout

fNIRS at the Hospital Sant Joan de Déu

Montage/optode layout

Challenges in neonatal fNIRS



fNIRS in neonates

Canonical response

Issard and Gervain (2018)

fNIRS in neonates

Canonical response

Inverted response

Issard and Gervain (2018)

Challenges in neonatal fNIRS



  • Movement, event during deep sleep
  • Wakefulness state: ~40 min. sleep cycles
  • Head morphology: spatial registration is challenging
  • Environment: hospital ward

Participant case study

Datasets



Neonates

García-Castro G., Sofocleous C., Gervain, J., Alarcón Allen A., and Santolin C. (in prep)

Adults

Hernández-Sauret, A., García-Castro, G., & Redolar-Ripoll, E. (2026). Brain Topography, 39(1), 2. https://link.springer.com/article/10.1007/s10548-025-01157-4

Pipeline suggestion

Designing a preprocessing pipeline

The FRESH initiative



Yücel, M. A., Luke, R., Mesquita, R. C., von Lühmann, A., Mehler, D. M., Lührs, M., … & Zemanek, V. (2025). fNIRS reproducibility varies with data quality, analysis pipelines, and researcher experience. Communications biology, 8(1), 1149.

Designing a preprocessing pipeline

The FRESH initiative



  • Asked 38 research teams worldwide to independently analyze the same two fNIRS datasets.
  • Using different pipelines, nearly 80% of teams agreed on group-level results
  • Teams with higher self-reported analysis confidence, which correlated with years of fNIRS experience, showed greater agreement
  • Main sources of variability were related to how poor-quality data were handled

Designing a preprocessing pipeline



Gemignani, J., & Gervain, J. (2021). Comparing different pre-processing routines for infant fNIRS data. Developmental Cognitive Neuroscience, 48, 100943.

Designing a preprocessing pipeline



  • Data quality/inclusion trade-off
  • Performance of all pipelines deteriorated with increasing levels of noise
  • Use automatic motion artifact correction with caution: false negatives, reduced effect sizes, underestimation of the HRF
  • The ordering of some preprocessing steps does not impact conclusions overall

Software



Software

Cedalion (Middell et al. 2026)

Datasets

The good: adult data


Importing raw light intensity from .snirf file:


from pathlib import Path
from cedalion import io

rec = io.read_snirf(Path("data/adult.snirf"))[0]

print(rec)


  • rec["amp"]: Raw light intensity dataset
  • rec["masks"]: Signal quality masks
  • rec["stim"]: Dataset of events (e.g., stimulus triggers, annotations)
  • rec["aux_ts"]: Additional timeseries (e.g., accelerometer, heatbeat rate)

The good: adult data


Plotting raw light intensity data with matplotlib:

from matplotlib import pyplot as plt

amp = rec["amp"]

fig, axes = plt.subplots(2, 1)

for wl_i, wl in enumerate(amp.wavelength.values):
    for ch in amp.channel.values:
        d = amp.sel(wavelength=wl, channel=ch)
        axes[wl_i].plot(d.time, d, c="k", alpha=0.5)

The good: adult data

The good: adult data

The good: adult data

The good: adult data

The bad: breastfeeding neonate

The bad: breastfeeding neonate

The bad: breastfeeding neonate

The ugly: sleeping neonate

The ugly: sleeping neonate

The ugly: sleeping neonate

Signal quality



Before data collection

Calibration metrics:

  • Coefficient of variation (CV)
  • Signal-to-noise ratio (SNR)
  • Dark light

After data collection

  • Signal-to-noise ratio (SNR)
  • Scalp coupling index (SCI)
  • Peak spectral power (PSP)

Can be used before data collection too! (Pollonini, Bortfeld, and Oghalai 2016)

Signal quality: after data collection



Scalp coupling index (SCI): Index of optode coupling with scalp based on cardiac pulse (Pollonini et al. 2014)

  1. Band-pass filter the signal in the heartbeat frequency of interest
  2. Normalize time series and segment into rolling windows (e.g., 5 seconds)
  3. For each window: Zero-lag cross-correlation between time series in both wavelengths
  4. Compare against threshold

\[ \text{SCI} = \rho_{X_{\lambda_1}X_{\lambda_2}}(t=0) = \frac{{X_{\lambda_1}}_{t} - \bar{X}_{\lambda_1} , {X_{\lambda_2}}_{t} - \bar{X}_{\lambda_2}}{\sigma_{\lambda_1}\sigma_{\lambda_2}} \]

Signal quality: after data collection



Scalp coupling index (SCI): Index of optode coupling with scalp based on cardiac pulse (Pollonini et al. 2014)



from cedalion.nirs import cw
from cedalion.sigproc import quality

od = cw.int2od(rec["amp"])
window_length = 5 * units.s
sci, sci_mask = quality.sci(od, window_length, 0.8)

Signal quality: after data collection

Signal quality: after data collection



Scalp coupling index (SCI): Index of optode coupling with scalp based on cardiac pulse (Pollonini et al. 2014)



Limitation: Motion arctifacts can inflate SCI (synchronised, high-amplitude perturbations in both signals)

Signal quality: after data collection



Peak spectral power (PSP): peak power of cross-correlation between both wavelengths in the hearbeat frequency range.

  1. Same as in SCI, now considering multiple lags (instead of just zero-lag)
  2. Get peak power across lags
  3. Compare against threshold


Recommended in combination with SCI (Pollonini, Bortfeld, and Oghalai 2016)

Signal quality: after data collection

Signal quality: choosing thresholds



Sample size vs. data quality trade-off.

Recommendations:

Signal quality: choosing thresholds

Signal quality: channel pruning



Channels with less than some threshold proportion of above-threshold windows are excluded from further analyses (e.g., 0.7).


quality_mask = [time_clean >= 0.7]
rec["od"], exc_ch = quality.prune_ch(rec["od"], quality_mask, "all")
od_pruned, drop_list = quality.prune_ch(rec["od"], masks, "all")


Channel interpolation? Work in progress.

Signal quality: channel pruning

Signal quality: channel pruning

Signal quality: channel pruning

Motion arctifact attenuation



Motion arctifacts (MA) are caused my changes optode position due to movement (cap slides around or separates from scalp).

Brigadoi et al. (2014):

  • Spikes: fast, high amplitude changes
  • Baseline shifts
  • Drift: low frequency variations

Motion arctifact attenuation



External signals

Signal correction methods

Motion arctifact attenuation



Current recommendation for pediatric data: combination of wavelet filtering and spline interpolation (Di Lorenzo et al. 2019).

We found TDDR + wavelet performed best in neonatal datasets (in-lab annecdotical data).



from cedalion.sigproc import motion_correct

od = motion_correct.tddr(motion_correct.wavelet(od))

Motion arctifact attenuation

Motion arctifact attenuation

Concentration of HbO and HbR



dpf_vals = [4.2, 5.3]
dpf_coords = {"wavelength": rec["od"].wavelength}
dpf = xr.DataArray(dpf_vals, dims="wavelength", coords=dpf_coords)
rec["conc"] = cw.od2conc(rec["od"], rec.geo3d, dpf)


Differential pathlength factor (\(\overline{DPF}\))

Constant in the mBLL equation. Depends on the characteristics of the underlying biological tissue; choose age appropriate values.

Concentration of HbO and HbR

Concentration of HbO and HbR

Concentration of HbO and HbR

Physiological arctifact attenuation: frequency filtering

Hocke et al. (2018)

Physiological arctifact attenuation: frequency filtering



Heartbeat Respiration Mayer waves Very low frequency waves
Adults 1 Hz 0.3 Hz 0.1 Hz < 0.04 Hz
Infants 1.17-3.17 Hz 0.5-1 Hz Unknown Unknown



fmin, fmax = 0.02, 0.5
rec["conc"] = rec["conc"].cd.freq_filter(
    fmin=fmin * units.Hz,
    fmax=fmax * units.Hz,
)

Physiological arctifact attenuation: frequency filtering

Physiological arctifact attenuation: frequency filtering

Physiological arctifact attenuation: frequency filtering

Physiological arctifact attenuation: frequency filtering

Physiological arctifact attenuation: frequency filtering

Epoching and averaging

print(rec.stim)
         onset  duration  value trial_type
25   10.518528      10.0    1.0          A
26  185.696256      10.0    1.0          A
27  232.783872      10.0    1.0          A
28  272.891904      10.0    1.0          A
29  309.067776      10.0    1.0          A
30  346.324992      10.0    1.0          A
31  438.730752      10.0    1.0          A
32  530.546688      10.0    1.0          A
33  737.574912      10.0    1.0          A
34  876.380160      10.0    1.0          A
35   59.670528      10.0    1.0          B
36  108.036096      10.0    1.0          B
37  148.242432      10.0    1.0          B
38  399.310848      10.0    1.0          B
39  577.732608      10.0    1.0          B
40  612.237312      10.0    1.0          B
41  649.691136      10.0    1.0          B
42  687.144960      10.0    1.0          B
43  784.662528      10.0    1.0          B
44  913.440768      10.0    1.0          B

Epoching and averaging

Epoching and averaging

Epoching and averaging

epochs = rec["conc"].cd.to_epochs(
    rec.stim,  # stimulus dataframe
    ["A", "B"],  # select fingertapping events, discard others
    before=5 * units.s,  # seconds before stimulus
    after=30 * units.s,  # seconds after stimulus
)
# calculate baseline
baseline = epochs.sel(reltime=(epochs.reltime < 0)).mean("reltime")

# subtract baseline
epochs =- baseline
epochs = epochs - baseline
epochs = nirs.detrend_epochs(epochs)

# average
hrf = epochs.groupby("trial_type").mean("epoch")

Epoching and averaging

What now?

Thank you for you attention!

Skin and hair type

Yücel et al. (2025):

  • Fitzpatrick Skin Phototype Scale (I, II, III, IV)
  • Fischer-Saller Scale, Andre Walker Hair Typing System, and the FIA Hair Typing System

Functional Near-Infrared Spectroscopy

If we shine near-infrared light into biological tissue, we can estimate changes in relative concentration of HbO and HbR time (functional).

modified Beer-Lambert Law (mBLL)

\[ \begin{aligned} \Delta A(\lambda_1 = 760~nm) &= \text{DPF} \cdot r \cdot [ \epsilon_{HbO}(\lambda_1) \Delta c_{HbO} + \epsilon_{HbO}(\lambda_1) \Delta c_{HbO} ] \\ \Delta A(\lambda_2 = 850~nm) &= \text{DPF} \cdot r \cdot [ \epsilon_{HbO}(\lambda_2) \Delta c_{HbR} + \epsilon_{HbR}(\lambda_2) \Delta c_{HbR} ] \end{aligned} \]

Hardware



Designing a preprocessing pipeline

The FRESH initiative

Designing a preprocessing pipeline

The FRESH initiative

Data organisation: BIDS format

bids.neuroimaging.io

  • Proposed standard for neuroimaging datasets (EEG, fNIRS, MRI, etc.)
  • Adopted and encouraged by the Society for fNIRS (SFNIRS)
  • Increases reproducibility, transparency, and documentation
  • Ready to share in BIDS-compliant repositories (e.g., OpenNeuro.)

Data organisation: BIDS format

Luke, R., Oostenveld, R., Cockx, H., Niso, G., Shader, M. J., Orihuela-Espina, F., … & Pollonini, L. (2025). NIRS-BIDS: brain imaging data structure extended to near-infrared spectroscopy. Scientific Data, 12(1), 159.

References

Arichi, Tomoki, Gianlorenzo Fagiolo, Marta Varela, Alejandro Melendez-Calderon, Alessandro Allievi, Nazakat Merchant, Nora Tusor, et al. 2012. “Development of BOLD Signal Hemodynamic Responses in the Human Brain.” NeuroImage 63 (2): 663–73. https://doi.org/10.1016/j.neuroimage.2012.06.054.
Beaton, Samuel, Borja Blanco, Chiara Bulgarelli, Clare E Elwell, Sarah Lloyd-Fox, Ebrima Mbye, Samantha McCann, Anna Blasi Ribera, and Sophie E Moore. 2026. “Investigating the Effect of Channel Pruning on Functional Near-Infrared Spectroscopy Data Collected from Children Aged 5 to 24 Months.” Neurophotonics 13 (1): 015011–11.
Brigadoi, Sabrina, Lisa Ceccherini, Simone Cutini, Fabio Scarpa, Pietro Scatturin, Juliette Selb, Louis Gagnon, David A Boas, and Robert J Cooper. 2014. “Motion Artifacts in Functional Near-Infrared Spectroscopy: A Comparison of Motion Correction Techniques Applied to Real Cognitive Data.” Neuroimage 85: 181–91.
Cinciute, Sigita. 2019. “Translating the Hemodynamic Response: Why Focused Interdisciplinary Integration Should Matter for the Future of Functional Neuroimaging.” PeerJ 7: e6621.
Cristia, Alejandrina, Emmanuel Dupoux, Yoko Hakuno, Sarah Lloyd-Fox, Manuela Schuetze, José Kivits, Tomas Bergvelt, et al. 2013. “An Online Database of Infant Functional Near Infrared Spectroscopy Studies: A Community-Augmented Systematic Review.” PloS One 8 (3): e58906.
Cui, XU, Joseph M Baker, Ning Liu, and Allan L Reiss. 2015. “Sensitivity of fNIRS Measurement to Head Motion: An Applied Use of Smartphones in the Lab.” Journal of Neuroscience Methods 245: 37–43.
Delaire, Édouard, Thomas Vincent, Zhengchen Cai, Alexis Machado, Laurent Hugueville, Denis Schwartz, Francois Tadel, et al. 2025. “NIRSTORM: A Brainstorm Extension Dedicated to Functional Near-Infrared Spectroscopy Data Analysis, Advanced 3D Reconstructions, and Optimal Probe Design.” Neurophotonics 12 (2): 025011–11.
Di Lorenzo, Renata, Laura Pirazzoli, Anna Blasi, Chiara Bulgarelli, Yoko Hakuno, Yasuyo Minagawa, and Sabrina Brigadoi. 2019. “Recommendations for Motion Correction of Infant fNIRS Data Applicable to Multiple Data Sets and Acquisition Systems.” NeuroImage 200 (October): 511–27. https://doi.org/10.1016/j.neuroimage.2019.06.056.
Emberson, Lauren L, Stephen L Crosswhite, James R Goodwin, Andrew J Berger, and Richard N Aslin. 2016. “Isolating the Effects of Surface Vasculature in Infant Neuroimaging Using Short-Distance Optical Channels: A Combination of Local and Global Effects.” Neurophotonics 3 (3): 031406–6.
Fishburn, Frank A., Ruth S. Ludlum, Chandan J. Vaidya, and Andrei V. Medvedev. 2019. “Temporal Derivative Distribution Repair (TDDR): A Motion Correction Method for fNIRS.” NeuroImage 184 (January): 171–79. https://doi.org/10.1016/j.neuroimage.2018.09.025.
Gramfort, Alexandre, Martin Luessi, Eric Larson, Denis A. Engemann, Daniel Strohmeier, Christian Brodbeck, Roman Goj, et al. 2013. MEG and EEG Data Analysis with MNE-Python.” Frontiers in Neuroscience 7 (December). https://doi.org/10.3389/fnins.2013.00267.
Hocke, Lia M, Ibukunoluwa K Oni, Chris C Duszynski, Alex V Corrigan, Blaise deB Frederick, and Jeff F Dunn. 2018. “Automated Processing of fNIRS Data—a Visual Guide to the Pitfalls and Consequences.” Algorithms 11 (5): 67.
Hramov, Alexander E, Vadim Grubov, Artem Badarin, Vladimir A Maksimenko, and Alexander N Pisarchik. 2020. “Functional Near-Infrared Spectroscopy for the Classification of Motor-Related Brain Activity on the Sensor-Level.” Sensors 20 (8): 2362.
Huppert, Theodore J., Solomon G. Diamond, Maria A. Franceschini, and David A. Boas. 2009. HomER: A Review of Time-Series Analysis Methods for Near-Infrared Spectroscopy of the Brain.” Applied Optics 48 (10): D280–98. https://doi.org/10.1364/AO.48.00D280.
Issard, Cécile, and Judit Gervain. 2018. “Variability of the Hemodynamic Response in Infants: Influence of Experimental Design and Stimulus Complexity.” Developmental Cognitive Neuroscience, Methodological Challenges in Developmental Neuroimaging: Contemporary Approaches and Solutions, 33 (October): 182–93. https://doi.org/10.1016/j.dcn.2018.01.009.
Jahani, Sahar, Seyed K Setarehdan, David A Boas, and Meryem A Yücel. 2018. “Motion Artifact Detection and Correction in Functional Near-Infrared Spectroscopy: A New Hybrid Method Based on Spline Interpolation Method and Savitzky–Golay Filtering.” Neurophotonics 5 (1): 015003–3.
Lloyd-Fox, Sarah, Anna Blasi, and Clare E Elwell. 2010. “Illuminating the Developing Brain: The Past, Present and Future of Functional Near Infrared Spectroscopy.” Neuroscience & Biobehavioral Reviews 34 (3): 269–84.
Luke, Robert, Eric Larson, Maureen J Shader, Hamish Innes-Brown, Lindsey Van Yper, Adrian KC Lee, Paul F Sowman, and David McAlpine. 2021. “Analysis Methods for Measuring Passive Auditory fNIRS Responses Generated by a Block-Design Paradigm.” Neurophotonics 8 (2): 025008–8.
Middell, E., L. Carlton, S. Moradi, T. Codina, T. Fischer, J. Cutler, S. Kelley, et al. 2026. “Cedalion Tutorial: A Python-based Framework for Comprehensive Analysis of Multimodal fNIRS & DOT from the Lab to the Everyday World.” arXiv. https://doi.org/10.48550/arXiv.2601.05923.
Molavi, Behnam, and Guy A Dumont. 2012. “Wavelet-Based Motion Artifact Removal for Functional Near-Infrared Spectroscopy.” Physiological Measurement 33 (2): 259. https://doi.org/10.1088/0967-3334/33/2/259.
Pollonini, Luca, Heather Bortfeld, and John S. Oghalai. 2016. PHOEBE: A Method for Real Time Mapping of Optodes-Scalp Coupling in Functional Near-Infrared Spectroscopy.” Biomedical Optics Express 7 (12): 5104–19. https://doi.org/10.1364/BOE.7.005104.
Pollonini, Luca, Cristen Olds, Homer Abaya, Heather Bortfeld, Michael S Beauchamp, and John S Oghalai. 2014. “Auditory Cortex Activation to Natural Speech and Simulated Cochlear Implant Speech Measured with Functional Near-Infrared Spectroscopy.” Hearing Research 309: 84–93.
Santosa, Hendrik, Xuetong Zhai, Frank Fishburn, and Theodore Huppert. 2018. “The NIRS Brain AnalyzIR Toolbox.” Algorithms 11 (5): 73.
Stute, Katharina, Louisa K Gossé, Samuel Montero-Hernandez, Guy A Perkins, Meryem A Yücel, Simone Cutini, Turgut Durduran, et al. 2025. “The fNIRS Glossary Project: A Consensus-Based Resource for Functional Near-Infrared Spectroscopy Terminology.” Neurophotonics 12 (2): 027801–1.
Tadel, François, Sylvain Baillet, John C Mosher, Dimitrios Pantazis, and Richard M Leahy. 2011. “Brainstorm: A User-Friendly Application for MEG/EEG Analysis.” Computational Intelligence and Neuroscience 2011 (1): 879716.
Yücel, Meryem A., Jessica E. Anderson, De’Ja Rogers, Parisa Hajirahimi, Parya Farzam, Yuanyuan Gao, Rini I. Kaplan, et al. 2025. “Quantifying the Impact of Hair and Skin Characteristics on fNIRS Signal Quality for Enhanced Inclusivity.” Nature Human Behaviour, September. https://doi.org/10.1038/s41562-025-02274-7.