Is SpectralTrainFig, in its current form, rejecting artifacts using cut offs on the spectral power in various frequency bands, or is it using something more complicated?
The artifact detection method used in SpectralTrainFig is a spectral threshold based method developed by our Zurich colleagues and first described here. The spectral threshold methods uses two spectral bands (delta band = [0.6, 4.6] Hz, beta band = [40,60] Hz) and identified artifacts relative to a 15 epoch moving average. 30 second epochs that exceed the delta or beta thresholds are identified as artifact and excluded from summary analysis. The recommended thresholds are 2.5 and 2.0 respectively for the delta and beta bands. The program is currently configured to analyze 30 second sleep epochs but could be adapted to analyze 20 second epochs. The motivation for the thresholds are to identify epochs which are 'clearly' artifact. The approach can be interpreted as finding epochs most likely to be contaminated with low and/or high frequency movement. Note that all of the spectral artifact detection thresholds are parameters and can be adjusted from the command line interface (script file).
For some of our recordings, there are still obvious epochs with artifacts even after SpectralTrainFig has been run.
Do you have a secondary program or suggestions for such an algorithm:
for example, if difference from points (t-1) and/or (t+1) > 3* standard deviation of points (t-5 to t-1 and t+1 to T=5)
Has anyone else done this kind of second-pass artifact removal?
I originally misread your text above. You do have a moving average in SpectralTrainFig. We will try a more aggressive cutoff.