Mitigating Against the Effects of RFI

When it comes to radio astronomy, RFI is a plague on all houses.  It is a particular difficulty here at HawkRAO as the antenna is up in the air about 3.5 m from the ground, with the observatory site being near to the edge of a small cliff (70 m high) with a clear take-off towards a city of 5 million.

When RFI spikes remain after 'dark frame' correction, some means of removing them from the plot result is useful.  A simple moving average filter is not appropriate, as that process, while reducing the peak amplitude of the spike, also spreads the energy across adjacent bins - turning a sharp spike into a rectangular 'pulse' shape as shown below...

...which introduces artifacts into the plot.

Fortunately, RFI spikes are what are termed 'out-liers' - that is, they are large deviations from the value of their adjacent FFT bin neighbours.  A median filter is a much better filter for this type of interference - each bin is sorted in a group of bins including itself and a number of adjacent bins (the number made selectable), and the value of the mid-way bin is placed in the current bin being processed.   This median filtering process is very effective in removing RFI spikes in the velocity plot as shown below, which is median filtered, but not smoothed...

...and which, because the RFI spikes have been removed, can now be further processed by a moving average filter...

...which, finally, shows that the 512 FFT bin results has more detail than the 64 FFT bin result, but still has a reasonably smooth profile.

This overall result (integration of successive days results, RFI excision and smoothing) will be helpful for the next, more difficult target - external galaxies at further distances than the Magellanic Clouds.