## 2 Materials and Methods
Raw fNIRS data were converted to oxyhemoglobin and deoxyhemoglobin with HOMER2 [3]. The pathlength was corrected in accordance with the source-detector distance calculated from the fMRI anatomical scans and also corrected for age [26]. We compared three motion correction conditions: no motion correction (NoMC); simple up-sampled motion correction (UpMC) in which the OrigRes motion time courses were up-sampled to the effective sampling rate by using the scipy.interpolate's UnivariateSpline routine with the default smoothing (k = 3); and correction with high-resolution motion traces (HighMC with AMARA-fMRI). The significance of the activation of each channel per method was calculated with the NIRS Brain AnalyzIR Toolbox [27] which accounts for multiple comparisons (q-stats). Significant task responses determined by fMRI (example voxels in Figure 3a) were evaluated below the fNIRS channel in the photon paths calculated using MCX [28; 29]. We calculated the percentage of significant voxels present in the photon path (banana-shaped) activation area below the fNIRS probes (Figure 4c) as well as the z-statistics (Figure 4b) for comparison. MRI data were processed in FSL FEAT [FMRIB Expert Analysis Tool, version 5.0.10 ([[http://www.fmrib.ox.ac.uk/fsl](http://www.fmrib.ox.ac.uk/fsl)]([http://www.fmrib.ox.ac.uk/fsl](http://www.fmrib.ox.ac.uk/fsl)), accessed on 20 February 2023, Oxford University, United Kingdom [24]). Standard preprocessing steps were applied to the data: temporal high-pass filter (200 s to remove very slow instrumental drifts), spatial smoothing (2 mm), slice time correction, motion correction, and FILM prewhitening. Contrasts for both the 2- and 3-back as well as only the 2-back and 3-back were evaluated for comparison (1 st contrast: 2-back = 1, 3-back = 1; 2 nd contrast: 2-back = 1, 3-back = 0; and 3 rd contrast: 2-back = 0, 3-back = 1). Figure 2: Calculation of the high-resolution motion traces. (**a**) Multiple slices (arrows in the same color) are taken at different time points (arrows in different colors) according to the multiband factor. (**b**) When calculating the motion parameters for each slice time ‘stack’ (the set of simultaneously obtained images at a timepoint, e.g., those specified by the red arrows), the sampling rate can be increased by the number of independent slice times and (**c**) their reorganization according to their acquisition time (**d**) so that physiological signals (e.g., cardiac) can be resolved at higher frequencies (software available by [PERSON] [25]). Figure replicated and slightly modified from [PERSON] et al. [18]. Figure 4: Significant fNIRS activation and comparison of fMRI data. T-statistics (**a**) with significant activation for all three motion correction methods (liac, NoMC; green, UpMC; and blue, HighMC)  
Figure 3: Example time courses. Example time course from subject #4 showing (**a**) an underlying fMRI voxel activation pattern within the photon probability path (MCX) and (**b–d**) the fNIRS time course filtered at \(\
eg\)0.0015–2 Hz (background magenta (oxyhemoglobin), cyan (deoxyhemoglobin)), and \(\
eg\)0.015–0.1 Hz (black signal). Specifically, (**b**) the original fNIRS time course is shown without motion correction (NoMC) as well as (**c**) the motion corrected with AMARA using the up-sampled (UpMC) and (**d**) reconstructed high sample rate motion time courses (HighMC) from fMRI. T-statistics are shown in the title (’t’). (**e**) Lastly, the difference between the HighMC and UpMC INIRS time courses at \(\
eg\)0.015–0.1 Hz is shown. and without reaching significance (grey) or being excluded for data quality purposes (black). In addition, (**b**) z-statistics distribution underneath channels one through to six within the photon probability path (MCX) as well as (**c**) the percentage overlap of the photon path and significantly activated voxels in fMRI (with 3 different contrasts) for each subject.