edges_cal.xrfi.xrfi_watershed
- edges_cal.xrfi.xrfi_watershed(spectrum: ndarray | None = None, *, freq: ndarray | None = None, flags: ndarray | None = None, weights: ndarray | None = None, tol: float | tuple[float] = 0.5, inplace=False)[source]
Apply a watershed over frequencies and times for flags.
Make sure that times/freqs with many flags are all flagged.
- Parameters:
spectrum – Not used in this routine.
flags (ndarray of bool) – The existing flags.
tol (float or tuple) – The tolerance – i.e. the fraction of entries that must be flagged before flagging the whole axis. If a tuple, the first element is for the frequency axis, and the second for the time axis.
inplace (bool, optional) – Whether to update the flags in-place.
- Returns:
ndarray – Boolean array of flags.
dict – Information about the flagging procedure (empty for this function)