Repairbads: An automatic and adaptive method to repair bad channels and segments for OPM-MEG
Fulong Wang,
Yujie Ma,
Tianyu Gao,
Yue Tao,
Ruonan Wang,
Ruochen Zhao,
Fuzhi Cao,
Yang Gao,
Xiaolin Ning
Affiliations
Fulong Wang
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China
Yujie Ma
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China
Tianyu Gao
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China
Yue Tao
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China
Ruonan Wang
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China; Corresponding authors at: Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China.
Ruochen Zhao
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China
Fuzhi Cao
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China; School of Engineering Medicine, Beihang University, Beijing, 100191, China; Corresponding authors at: Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China.
Yang Gao
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China
Xiaolin Ning
Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China; Hangzhou Institute of Extremely-Weak Magnetic Field Major National Science and Technology Infrastructure, Hangzhou, 310051, China; State Key Laboratory of Traditional Chinese Medicine Syndrome/Health Construction Center, The Second Affiliated Hospital of Guangzhou University of Chinese Medicine, Guangzhou, 510120, China; Hefei National Laboratory, Hefei, 230088, China; Corresponding authors at: Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, School of Instrumentation and Optoelectronic Engineering, Beihang University, 100191, Beijing, China.
The optically pumped magnetometer (OPM) based magnetoencephalography (MEG) system offers advantages such as flexible layout and wearability. However, the position instability or jitter of OPM sensors can result in bad channels and segments, which significantly impede subsequent preprocessing and analysis. Most common methods directly reject or interpolate to repair these bad channels and segments. Direct rejection leads to data loss, and when the number of sensors is limited, interpolation using neighboring sensors can cause significant signal distortion and cannot repair bad segments present in all channels. Therefore, most existing methods are unsuitable for OPM-MEG systems with fewer channels. We introduce an automatic bad segments and bad channels repair method for OPM-MEG, called Repairbads. This method aims to repair all bad data and reduce signal distortion, especially capable of automatically repairing bad segments present in all channels simultaneously. Repairbads employs Riemannian Potato combined with joint decorrelation to project out artifact components, achieving automatic bad segment repair. Then, an adaptive algorithm is used to segment the signal into relatively stable noise data chunks, and the source-estimate-utilizing noise-discarding algorithm is applied to each chunk to achieve automatic bad channel repair. We compared the performance of Repairbads with the Autoreject method on both simulated and real auditory evoked data, using five evaluation metrics for quantitative assessment. The results demonstrate that Repairbads consistently outperforms across all five metrics. In both simulated and real OPM-MEG data, Repairbads shows better performance than current state-of-the-art methods, reliably repairing bad data with minimal distortion. The automation of this method significantly reduces the burden of manual inspection, promoting the automated processing and clinical application of OPM-MEG.