Categories
GYREE LAB

Troubleshooing MSI MPG X570 GAMING PRO CARBON WIFI: SATA6 port was bad

My friend needed help with his desktop PC. There were several symptoms. The process of reading files from HDD was slow and glitchy. The machine also occasionally rebooted randomly. From my experience, I thought this was caused by a bad RAM. However, the trusty Memtest64 does not show any error.

https://en.wikipedia.org/wiki/Memtest86

Crystal Disk Mark showed very weird performance–slow and wildly varying read speed, and relatively stable and much faster write speed.

https://crystalmark.info/en/software/crystaldiskmark/

Is this due to a bad HDD? I told him to buy a new HDD for replacement to see if it fixes the problem.

I visited his office. I replaced the HDD, and ran Crystal Disk Mask again. While repeating the test, I noticed a wired behavior–the read test takes much longer than the write test (7.5 min vs. 2.5 min, 1 GB for 5 times, default parameters used otherwise). I asked my friend to run the same test on a different machine in the room. The read test was done quickly, less than 3 min. At this point, I changed my hypothesis from a bad HDD to a bad SATA controller, receptacle, or cable, although it was less likely.

I opened up the PC case. The motherboard print indicated the current connection was on SATA6. Just for testing, I unplugged the SATA 6G cable from the SATA6 and connected to the SATA5 which was located right below SATA6. I ran the same test again. It took less than 3 min for the read test–it fixed the problem! I also checked where SATA1-4 were located. It was hidden under a huge graphics board, which needed to be removed to connect cables. I checked the spec of this motherboard and found interesting information–Actually, SATA5-6 uses a controller chip ASM1061 from ASMedia, while SATA1-4 uses this mortherboard’s original controller chip contained in AMD X570 Chipset.

https://www.msi.com/Motherboard/MPG-X570-GAMING-PRO-CARBON-WIFI/Specification

Even if SATA5 port seemed working fine, I decided to avoid SATA5-6 altogether because they were both controlled by ASM1061. If the motherboard’s native SATA1-4 are available, why not using them first? After connecting the two HDDs to SATA1 and SATA2, the HDDs worked fine. We will see if this also fixed the random rebooting issue.

Categories
EEG GYREE LAB Swartz Center/UC San Diego

Ground truth of EMG removal: Paralysis vs. ASR + ICA

For automated scalp-EEG denoising, I always use EEGLAB plugin clean_rawdata(), which includes now popular artifact subspace reconstruction (ASR), and ICA. The clean_rawdata() was written by my former colleague Christian Kothe as a offline-version of his BCILAB data cleaning pipeline upon my request. I just wrote a wrapper for it to make it into an EEGLAB plugin. I reported this historical fact in the Section 6 of this Supplementary Materials for record https://academic.oup.com/cercorcomms/article/1/1/tgaa046/5881803#207580614 ASR is an ideal preprocessing for ICA due to compensatory properties. ASR uses non-stationary approach (sliding windows), while ICA uses stationary approach (a single spatial filter that is suppose to be valid for every data point). ASR can handle artifacts with an astronomically large outlier, which can cause instant death to ICA, or even if does not kill it will certainly destroy the result into nonsense (Have you ever seen explosive scalp topos?) Controlling the performance of ASR is not as easy as applying ICA (which is just a button press), but the rule of thumb is that use SD = 20 and you are fine (for quantitative evidence, see my colleague Chiyuan’s paper https://ieeexplore.ieee.org/abstract/document/8768041…Conclusions: Empirical results show that the optimal ASR parameter is between 20 and 30, balancing between removing non-brain signals and retaining brain activities.“)

However, this advocation of the performance of ASR + ICA is only qualitative. How can the performance be proven? Here comes in the eternal-recurrence problem of EEG research: the lack of the ground truth. EEG research is doomed by this problem. The vacancy of the ground truth corroded EEG researcher’s mind so that now they believe more in colorful figures produced by fancy-sounding signal processing techniques than scientific thinking. Once I pointed out that it is an erroneous attempt to compensate science with engineering–we should ask ourselves if we are using the colorful figures to stay closer to the ground truth. Fortunately, someone knowledgeable told me about a nice study that shows ground truth of EMG contribution to scalp-recorded EEG (Whitham et al., 2007 https://www.sciencedirect.com/science/article/abs/pii/S1388245707001988?via%3Dihub). I like this study so much that this time I decided to pay $48.30 to Elsevier to get the license to show their nice plot for you.

Whitham et al. (2007) Clinical Neurophysiology 118:1877–1888 Figure 1. Replicated with permission. PSD (n=2) calculated at the electrode between CPz and Pz (linked-ear reference). A, without paralysis. B, with paralysis (20 mg of cisatracurium by intravenous injection). Muscular paralysis was evaluated by right common peroneal nerve stimulation to extensor digitorum brevis. The motor action potential was confirmed to be disappeared in 5 min after the administration.

You see a ordinary-looking PSD plots from two subjects in the top and the bottom plots, but there are curves A and curves B. What do you think is the difference between A and B in each plot? The answer is muscular paralysis. Because the paralyzed muscle generates zero EMG, PSD in B serves as a ground truth of EEG with no EMG. At 45 Hz, the difference between A and B are 6 and 10 dB for each subject. Let’s compare these values to our typical application of ASR + ICA.

Unpublished data. PSD (n=141) calculated at the electrode CP1 and CP2 then averaged (T7-T8 average reference). Blue, raw EEG (high-pass fitler only). Red, ASR (SD=20) and IC selections (rejecting all non-brain ICs labeled by ICLabel). Note that PSD for ASR + ICA is 1.3 dB elevated to align the alpha peak power.

This plot was generated for writing a rebuttal to one of the comments made by a reviewer said ‘the performance of ASR + ICA is questionable.’ Challenge accepted automatically. There are minor differences due to different experimental settings (the same electrode location was not available, so was the initial reference) but it does not seem critical. At 45 Hz, the PSD difference between raw and ASR + ICA is about 5 dB after aligning the alpha peaks. Well, the result is not too bad.

Summary and conclusion from this comparison: (1) Using paralysis allows evaluation of the grand truth of EMG contribution to PSD of scalp-recorded EEG, which measured 6-10dB at 45 Hz; (2) ASR + ICA reduced PSD power similarly, which measured 5 dB at 45 Hz. I conclude ASR + ICA showed a good performance in comparison with the ground-truth data of EMG removal. If ASR + ICA were a simple frequency filter to mechanically suppress the gamma-band rage, it would have been trivial. However, what ICA actually does is to find a spatial filter that minimizes mutual information to achieves instantaneous temporal independence across components. So ICA is not even similar to a simple frequency filter. What we see here instead is that optimizing a mathematical property of the data reveals physiologically valid results. A similar structure is found in the argument about the origin of dipolarity of ICA-derived scalp topographies, which I once called independence-dipolarity identity (IDID). I will visit this topic some day later.