Skip to content
jamesjun edited this page Dec 18, 2017 · 7 revisions

Adaptive notch filter which cleans narrow-band noise peaks that exceeds a user-specified threshold (P.fft_thresh; unit: MAD). Power (p) vs. frequency (f) plot is detrended by plotting p*f vs. frequency and applying MAD normalization for each frequency bins. The number of frequency bins are controlled by nbins input variable (default: 20). The figure below shows the original (left) and detrended (right) plots. Red indicates FFT coefficients that exceed threshold or points that are within 3 samples (nw) from the outlier points.

This operation is skipped if P.fft_thresh==0.

Syntax

  • mr1 = fft_clean(mr, thresh, nbins) ** mr1: Traces to clean up (nSamples x nSites: single) ** thresh: P.fft_thresh expressed in MAD unit
    ** nbins: Number of frequency bins to perform normalization

Operation

  • Time-domain signal is converted to the frequency domain (FFT)
  • Average power across channels are computed.
  • Power is detrended using 1/f relationship in freq vs. power.
  • power-frequency product is normalized by the MAD for each frequency bin.
  • Frequency-power product exceeding the threshold (P.fft_thresh) are set to 0.
  • Cleaned signal is transformed back to the time-domain signal (IFFT).

""

See also

detect_(), wav2spk_()

Clone this wiki locally