  A technique is described that is used to improve the detection of
radio-frequency interference in astronomical radio observatories. It is applied
on a two-dimensional interference mask after regular detection in the
time-frequency domain with existing techniques. The scale-invariant rank (SIR)
operator is defined, which is a one-dimensional mathematical morphology
technique that can be used to find adjacent intervals in the time or frequency
domain that are likely to be affected by RFI. The technique might also be
applicable in other areas in which morphological scale-invariant behaviour is
desired, such as source detection. A new algorithm is described, that is shown
to perform quite well, has linear time complexity and is fast enough to be
applied in modern high resolution observatories. It is used in the default
pipeline of the LOFAR observatory.
