I have some electrophysiology recordings that have some high-frequency noise in them and I am wondering if there is a quick way to remove this kind of noise in Igor. I've attached an image to show the noise - it is the spiky deflections from baseline.
The tricky part here is to give good judgment which data points are considered spikes.
Some ideas.
- You could play around with the built-in filters in the analysis menu.
- You might try a Fourier transform (see FFT command), set all coefficients above a certain limit to zero, and perform an inverse transformation (see IFFT command). Work on a copy of the original wave and be aware that the intermediate wave is complex. Here you can also see the spectral composition of your signal. For better results you might use a window function "to fade the coefficients out".
- Maybe you need to run some sort of box-car average and compare the deviation of every data point from that average (or see at which data point the average "significantly" changes).
However, your spikes are not really periodic (and also neither high frequency) AND part of the data. For graphing, "dots" might be more appropriate (and these outliers are not that prominent in that case: it's a single dot and not a line to a data point -- give it a try).
Choose Replace: Outliers, and enter a value that triggers replacing the spikes by the median when the spike deviates from the median by that amount (the dialog is more concise than I am here). Start with 5, perhaps.
Compute the median over a smallish number of points, I'd start with 7.
Some ideas.
- You could play around with the built-in filters in the analysis menu.
- You might try a Fourier transform (see FFT command), set all coefficients above a certain limit to zero, and perform an inverse transformation (see IFFT command). Work on a copy of the original wave and be aware that the intermediate wave is complex. Here you can also see the spectral composition of your signal. For better results you might use a window function "to fade the coefficients out".
- Maybe you need to run some sort of box-car average and compare the deviation of every data point from that average (or see at which data point the average "significantly" changes).
However, your spikes are not really periodic (and also neither high frequency) AND part of the data. For graphing, "dots" might be more appropriate (and these outliers are not that prominent in that case: it's a single dot and not a line to a data point -- give it a try).
HJ
February 13, 2016 at 01:44 pm - Permalink
Choose Replace: Outliers, and enter a value that triggers replacing the spikes by the median when the spike deviates from the median by that amount (the dialog is more concise than I am here). Start with 5, perhaps.
Compute the median over a smallish number of points, I'd start with 7.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
February 14, 2016 at 09:20 am - Permalink
February 15, 2016 at 09:22 am - Permalink