Description
The timemed method uses a median-in-time filter. It works by computing a
sliding median of some value dcbt (where c is frequency channel, b is
baseline, and t is time slot), as specified by the expr parameter (see
the general autoflag module description for details
of how expr determines d.) The sliding median is computed in time, on
a per-channel, per-baseline basis:
mcbt =
median{
dcbt', where |
t' -
t|
}
(where
is given by the hw parameter.) Then, a median absolute deviation
(MAD) of the data with respect to the median is computed on a per-row basis:
Mbt = median{| dcbt - mcbt|, for all c}
(For single-channel data,
Mbt
m0bt.) Mbt is then smoothed
by applying a sliding median in time:
=
median{
Mbt', where |
t' -
t|
}
(where
is given by the rowhw parameter.) All points where
|
dcbt -
mcbt| >
are then flagged. The threshold level
is given by the thr
parameter.
In addition, timemed can also flag entire rows based on their MAD. This
is only performed for line data (specifically, when there are at least 10
channels per row), and may be explicitly disabled by specifying norow=T.
To do this, it first computes a per-baseline MAD of the MAD:
=
median{|
Mbt -
|, for all
t}
and flags rows where
| Mbt - | > , where
is given by the rowthr parameter.
Timemed will iterate over the measurement set - and compute mcbt
- only once. Existing flags are taken into account at this time (unless fignore is specified). MADs are then computed and recomputed iteratively,
dropping flagged points and rows, until convergence is achieved (i.e. no more
flags are raised). Since mcbt is not recomputed as new flags are
raised, running this method a second time may sometimes be of use.
Arguments
thr |
|
Flagging threshold |
|
|
Allowed: |
numeric (real) |
|
|
Default: |
5 |
hw |
|
Half-window for the sliding median, if time slots is less than
4 times half window, ignoring this chunk |
|
|
Allowed: |
Int |
|
|
Default: |
10 |
rowthr |
|
Row flagging threshold |
|
|
Allowed: |
numeric (real) |
|
|
Default: |
10 |
rowhw |
|
Half-window for the sliding median of the MAD |
|
|
Allowed: |
Int |
|
|
Default: |
10 |
norow |
|
Disable row flagging |
|
|
Allowed: |
Boolean |
|
|
Default: |
F |
column |
|
Which column to base flagging on |
|
|
Allowed: |
"DATA", "MODEL" or
"CORR" |
|
|
Default: |
"DATA" |
expr |
|
Expression to use |
|
|
Allowed: |
see text |
|
|
Default: |
"ABS I" |
fignore |
|
Ignore existing flags |
|
|
Allowed: |
Boolean |
|
|
Default: |
F |