tlpipe.rfi.sir_operator

This implements the scale-invariant rank (SIR) operator.

The operator considers a sample to be contaminated with RFI when the sample is in a subsequence of mostly flagged samples. To be more precise, it will flag a subsequence when more than \((1 - \eta) N\) of its samples are flagged, with \(N\) the number of samples in the subsequence and \(\eta\) a constant, \(0 \le \eta \le 1\). Using \(\rho\) to denote the operator, the output \(\rho(X)\) can be formally defined as

\[\rho(X) \equiv \bigcup \left\{ [Y1, Y2) \ \mid \ \#(X \cap [Y1, Y2)) \ge (1 - \eta)(Y2 - Y1) \right\},\]

with \([Y1, Y2)\) a half-open interval of a one-dimensional set, and the hash symbol \(\#\) denoting the count-operator that returns the number of elements in the set. In words, the equation defines \(\rho(X)\) to consist of all the samples that are in an interval \([Y1, Y2)\), in which the ratio of samples in the input \(X\) is greater or equal than \((1 - \eta)\). Parameter \(\eta\) represents the aggressiveness of the method: with \(\eta = 0\), no additional samples are flagged and \(\rho(X) = X\). On the other hand, \(\eta = 1\) implies all samples will be flagged.

For more details, see Offringa et al., 2012, A&A, 539, A95, A morphological algorithm for improving radio-frequency interference detection.

Functions

horizontal_sir
sir1d
vertical_sir