## 2 Materials and Methods  
We measured fNIRS and fMRI simultaneously in 10 participants during a 2- and 3-back memory task (720 s, Figure 1e). All subjects gave their informed consent for inclusion before they participated in the study. The McLean Hospital institutional review board approved all human experimental acquisitions, and participants were compensated for their participation. Figure 1: Set-Up. (**a,b**) Multimodal fNIRS–fMRI coil with six sources and one detector positioned over the prefrontal cortex. (**c**) Sources and the detector could be easily localized on anatomical scans and (**d**) the photon path of each channel was calculated. (**e**) The stimulation paradigm for the N-back task (shown here) is shown. Six fNIRS source-detector fibers were directly integrated into purpose-built 3D printed receive-only phased array RF coils [23], enabling close contact between the probe and the head and thus the precise alignment between the modalities, facilitating localization of the fNIRS probes with respect to the activations detected by fMRI (Figure 1a-c). All MR data were acquired on a Siemens TIM Trio 3T scanner (Siemens Medical Systems, Malvern, PA, USA). The multimodal probe included a 3-element receive-only phased array probe (8 \(\times\) 4.5 cm with depth sensitivity of -5 cm) [23] which was positioned over the prefrontal cortex and used to acquire high spatial (1.8 mm isotropic resolution over a 172 \(\times\) 172 \(\times\) 59.4 mm FOV) and temporal resolution fMRI data (TR = 0.72 s, Multiband Factor = 4). fNIRS data were acquired with an ISS Imagent (ISS, Champaign, IL, USA) at 6.25 Hz with six channels (-35, 27, and 13 mm source-detector separation, Table 1) above the target area. High-resolution motion traces were calculated using our previously described method (for a detailed description of the steps and commands see [PERSON] et al. [18]). In short, since multiband data have several spatially separated slices acquired at the same time, the exact acquisition time or slice timing information of each slice (indicated by different colors in Figure 2a) can be used to split a single fMRI volume into \"stacks\" of simultaneously acquired slices. In the simplified example of Figure 2, 20 slices are taken at 5 different acquisition times with a multiband factor of 4, resulting in 5 stacks with the same acquisition time, as illustrated in different colors in Figure 2a. Standard motion estimation programs for fMRI data (e.g., FSL [24], MCFLIRT) are then applied to each new stack of acquisition-time matched slices (Figure 2b). Lastly, the various motion traces (six directions for each stack) can then be merged according to their respective slice timing (Figure 2c). A comparison with simultaneously acquired physiological monitoring confirmed the accuracy of this method, recovering even signals beyond the original frequency range such as cardiac (Figure 2d). A software package deriving these high-resolution motion parameters, as described above and in [PERSON] et al. [18], can be found as open source by [PERSON] [25]. A notch filter at the original sampling rate was also applied. Acceleration data were derived from the second derivative of the motion traces of the high-resolution fMRI data. We used MCFLIRT (FSL [24], FLIRT [14; 15]), a standard fMRI preprocessing method to derive the six motion traces (x, y, z direction as well as rotational motion of each). We used the six acceleration motion traces as inputs for AMARA with window length of 8 min and window step size of 4 min (for our 12 min acquisition) which were in the originally published study by [PERSON] et al. set to 15 min and 5 min, respectively [12]. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Subject** & **Channel 1** & **Channel 2** & **Channel 3** & **Channel 4** & **Channel 5** & **Channel 6** \\ \hline \#1 & 37.3 & 28.2 & 13.0 & 13.0 & 28.0 & 39.0 \\ \#2 & 35.9 & 27.3 & 11.8 & 15.5 & 28.6 & 40.2 \\ \#3 & 37.0 & 28.6 & 13.6 & 17.0 & 29.2 & 37.0 \\ \#4 & 35.9 & 26.2 & 10.