\onecolumn


\section*{Inline Supplementary Materials}

\begin{figure}[H]
\noindent \centering{}\includegraphics[width=5.5in]{FigureS1_ECG_PeakDetect}
\protect\protect\caption[Performance Issues with Motion-Based Adaptive Filter]{\textbf{ECG Peak Detection Accuracy. }\emph{(A, C)} ECG data (cyan)
overlaid with the peaks (red) detected by the algorithm within EEGLAB
for simulation tests (\ref{sec:bcg_res_simosc}-\ref{sec:bcg_res_simerp})
and visual evoked studies (\ref{sec:bcg_res_erptest}) respectively.
\emph{(B, D)} Mean (red) and standard deviation (black) of the time-locked
ECG data (cyan) for simulation tests and visual evoked studies respectively.
Quality of ECG peak detection is poor for the data used in simulation
tests, but much better for the data used in visual evoked studies.
Manual interactive analyses to correct ECG peak detection were not
performed but may have somewhat improved performance of the ECG-based
methods in the simulation studies. \label{fig:s1_ecgdetect} }
\end{figure}
\begin{table}[H]
\centering{}%
\begin{tabular}{|>{\centering}m{1.3in}|>{\centering}m{1.3in}|>{\centering}m{1.3in}|>{\centering}m{1.3in}|}
\hline 
\textbf{Amplitude of Simulated Oscillation } & \textbf{SNR Improvement (Harmonic Regression) } & \textbf{SNR Improvement (OBS)} & \textbf{SNR Improvement (AAS)}\tabularnewline
\hline 
$9\,{\rm \mu V}$ & $5.3$ & $4.6$ & $1.0$\tabularnewline
\hline 
$15\,{\rm \mu V}$ & $6.9$ & $1.1$ & $1.8$\tabularnewline
\hline 
$21\,{\rm \mu V}$ & $7.2$ & $1.0$ & $2.1$\tabularnewline
\hline 
$30\,{\rm \mu V}$ & $7.0$ & $1.1$ & $2.2$\tabularnewline
\hline 
\end{tabular}\protect\caption{\textbf{SNR Improvement Across Simulated Oscillation Amplitudes. }SNR
improvement, defined as the ratio of SNR after artifact removal to
SNR before artifact removal, is an indicator of improvement in clarity
of the ON/OFF pattern after artifact removal. The harmonic regression
algorithm consistently outperforms reference-based methods, regardless
of simulated oscillation amplitude. OBS performance is better for
lower amplitude oscillations than for higher amplitude oscillations.
In cases of higher amplitude oscillations, principal components that
are eliminated may contain more signal mixed in with artifact, as
the signal and artifact are not mutually orthogonal. AAS performance
is better for higher amplitude oscillations than for lower amplitude
oscillations. As AAS eliminates only the mean of the BCG-corrupted
EEG data around the ECG R-wave, it may retain more signal than OBS
for higher amplitude oscillations\textbf{. }We note that physiologic
oscillations tend to have amplitudes $\sim10-100\,{\rm \mu V}$. Overall,
harmonic regression provides better estimates as it uses the native
structure in artifact and signal dynamics, while explicitly accounting
for their amplitude, time and frequency overlap.\label{tab:snr_comps}}
\end{table}
\begin{figure}[H]
\noindent \centering{}\includegraphics[width=5.5in]{FigureS2_MotSens_Noise}
\protect\protect\caption[Performance Issues with Motion-Based Adaptive Filter]{\textbf{BCG Estimates from Motion-Based Adaptive Filter vs. Harmonic
Regression. }\emph{(A, D)} Examples of clean and noisy motion sensor
recordings used as a reference template for adaptive filtering. Arrow
marks onset of noisy period\emph{. (B-C, E-F)} Time series of BCG-corrupted
raw recording (green), BCG artifacts estimated using adaptive filter
(dark blue), and harmonic regression (orange) for clean and noisy
motion sensor recordings respectively. In both cases, harmonic regression
estimates the phase and amplitude comb-like BCG artifacts better than
adaptive filter. Harmonic regression is also insensitive to motion
sensor noise, as it is reference-free and relies solely on the native
harmonic structure in BCG artifacts. Data segments shown in \emph{A-C
}and \emph{D-F }start at $25.6\,{\rm minute}$ and $32.9\,{\rm minute}$
points of full recording in \ref{fig:proposc_est}\emph{A,C,E} respectively.
Time segment shown in \emph{A-C }corresponds to that shown in \ref{fig:proposc_est}\emph{B,D,F.}
\label{fig:s2_motperform} }
\end{figure}
\begin{table}[H]
\centering{}%
\begin{tabular}{|>{\raggedright}p{1.8in}|>{\centering}m{0.5in}|>{\centering}m{0.75in}|>{\centering}m{0.95in}|>{\centering}m{1in}|>{\centering}m{1.1in}|}
\hline 
\textbf{Study} & \textbf{Subject} & \textbf{Harmonic Regression} & \textbf{Motion-Based Adaptive Filtering} & \textbf{ECG-Based Optimal Basis Sets} & \textbf{ECG-Based Average Artifact Subtraction}\tabularnewline
\hline 
\multirow{2}{1.8in}{Simulations with Real Artifacts} & 1 & $3.5$ & --- & $13.5$ & $18.6$\tabularnewline
\cline{2-6} 
 & 2 & $30.4$ & --- & $37.3$ & $56.6$\tabularnewline
\hline 
\multirow{5}{1.8in}{Propofol Anesthesia Oscillations} & 1 & $24.0$ & $43.7$ & --- & ---\tabularnewline
\cline{2-6} 
 & 2 & $19.2$ & $57.1$ & --- & ---\tabularnewline
\cline{2-6} 
 & 3 & $42.3$ & $66.5$ & --- & ---\tabularnewline
\cline{2-6} 
 & 4 & $47.6$ & $150.7$ & --- & ---\tabularnewline
\cline{2-6} 
 & 5 & $25.1$ & $57.3$ & --- & ---\tabularnewline
\hline 
\multirow{2}{1.8in}{Visual Evoked Responses} & 1 & $20.8$ & --- & $25.7$ & $54.5$\tabularnewline
\cline{2-6} 
 & 2 & $16.1$ & --- & $19.3$ & $24.0$\tabularnewline
\hline 
\end{tabular}\protect\caption{\textbf{Residual Artifacts across Subjects for Different BCG Removal
Methods. }For each test case and algorithm studied, we computed the
proportion of residual artifacts, i.e., percentage of power in harmonics
of $\hat{\omega}$ remaining after artifact removal. This residual
artifact metric is similar to that in \cite{Niazy2005}. For each
subject, harmonic regression outperforms reference-based methods.The
motion-based adaptive filtering for propofol study subject 4 is highly
sensitive to gross motion artifacts, thus leading to very large residual
artifacts.\label{tab:resart}}
\end{table}

