I originally misread your text above. You do have a moving average in SpectralTrainFig. We will try a more aggressive cutoff.
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?
Spectral data in output files are Power Density(uv2)/Hz or Power (UV2)
The output is in 0.5 Hz bins, but Power/Power Density is 4 , not 2.
Which is correct: Power Density or Power?
Or, is there an alternate definition of Power Density or power?