# Assessment of fNIRS Signal Processing Pipelines: Towards Clinical Applications
## 2 Materials and Methods
### Conversion to Optical Density and Concentration  
According to the Beer-Lambert Law, absorbance is evaluated by the optical density (\(OD\)):  
\[OD(\lambda,t)=\log\biggl{(}\frac{I_{0}(\lambda)}{I(\lambda,t)}\biggr{)}=\log(I _{0}(\lambda))-\log(I(\lambda,t)) \tag{1}\]  
where \(I_{0}(\lambda)\) is the non-attenuated light intensity and \(I(\lambda,t)\) is the sensed intensity at time \(t\) after passing through a biological sample. In the context of NIRS, this equation needs to be extended to the Modified Beer-Lambert Law (MBLL), introducing a scattering dependent parameter to take into account the optical properties of diffusive media such as biological tissues and the increase in photon pathlength compared to source-detector separation [26] (see also Section 2.2). Namely, most commercial CW-fNIRS systems employ two NIR-wavelengths placed within the optical window on opposite sides of the isosbestic point (805 nm) for maximizing \(HbO_{2}\) vs. \(HbR\) discrimination [27]. Hence, the MBLL equation considering only \(HbO_{2}\) and \(HbR\) chromophores is represented by the following equation  
\[\Delta OD_{i,j}(\lambda,t)=L_{i,j}\cdot DPF(\lambda)\cdot(\epsilon_{HbO}( \lambda)\cdot\Delta[HbO_{2}]+\epsilon_{HbR}(\lambda)\cdot\Delta[HbR]) \tag{2}\]  
where \(L_{i,j}\) is the \(i\)th-source to \(j\)th-detector length measured at the scalp surface, and \(\epsilon_{HbO}(\lambda)\) and \(\epsilon_{HbR}(\lambda)\) are the respective oxy- and deoxy-hemoglobin molar extinction coefficients.  
\(DPF(\lambda)\) is the differential pathlength factor, a unitless scalar parameter whose \(L_{i,j}DPF(\lambda)\) product accounts for the longer travel of scattered photons. In CW-fNIRS the \(DPF(\lambda)\) cannot be estimated directly; hence, tabulated DPFs derived from other studies from TD-fNIRS, FD-fNIRS, ex-vivo and in-silico simulations are considered [28; 29]. As a result, CW-fNIRS studies cannot be said to be quantitative. Nonetheless, the appropriate use of these factor permits an even scaling in the presence of different \(L_{ij}\) distances and of subjective differences in \(DPF(\lambda)\), which is strongly age dependent [28; 30]. An absolute quantification of HRF is beyond the scope of CW-fNIRS, which conversely addresses the statistical significance of HRF deflections above confounding factors and noise. In addition, in CW-fNIRS and limited to the target brain vessels, the scattering dependent parameter in the traditional formulation of MBLL can be neglected since optical quantities are computed differentially and scattering is limited compared to absorption effects due to only \(HbO_{2}\) and \(HbR\) (Equation (2)).  
Finally, the MBLL for \(HbO_{2}\) and \(HbR\) results in a system of two linear equations in two unknowns, namely, \(\Delta[HbO_{2}]\) and \(\Delta[HbR]\) concentration changes, with solution  
\[\left[\begin{array}{c}\Delta[HbR]\\ \Delta[HbO_{2}]\end{array}\right]=\left[\begin{array}{c}\epsilon_{HbR}( \lambda_{1})\;\epsilon_{HbO_{2}}(\lambda_{1})\\ \epsilon_{HbR}(\lambda_{2})\;\epsilon_{HbO_{2}}(\lambda_{2})\end{array}\right] ^{-1}\left[\begin{array}{c}\Delta OD(\lambda_{1})\\ \frac{\Delta OD(\lambda_{1})}{DPF(\lambda_{1})\cdot L}\\ \frac{\Delta OD(\lambda_{2})}{DPF(\lambda_{2})\cdot L}\end{array}\right] \tag{3}\]  
In this work, we selected the \(DPF\) value according on the work of [PERSON] and [PERSON] [28], who proposed a general equation for the computation of age- and wavelength-specific values based on published data. We are aware that the proposed equation was designed for frontal cortex optical data. However, even if the employed fNIRS probe addresses the whole superficial cortex (details are provided in Section 2.8), it is generally assumed that this aspect does not drastically affect pre-processing and analysis since relative (not absolute) functional activation is addressed.