diff --git a/ch_util/rfi.py b/ch_util/rfi.py index 861d6bfc..1c34e979 100644 --- a/ch_util/rfi.py +++ b/ch_util/rfi.py @@ -229,7 +229,7 @@ def number_deviations( arr = auto_vis[:, ind].allgather() if parallel else auto_vis[:, ind] # Use NaNs to ignore previously flagged data when computing the MAD arr = np.where(flg, arr.real, np.nan) - local_bounds = auto_vis.local_bounds if parallel else Ellipsis + local_bounds = auto_vis.local_bounds if parallel else slice(None) # Apply RFI flagger if rolling: # Limit bounds to the local portion of the array @@ -568,7 +568,7 @@ def mad_cut_rolling( threshold=5.0, freq_flat=True, mask=True, - limit_range: slice = Ellipsis, + limit_range: slice = slice(None), ): """Mask out RFI by placing a cut on the absolute deviation. Compared to `mad_cut_2d`, this function calculates @@ -622,7 +622,7 @@ def mad_cut_rolling( exp_data = np.full(eshp, np.nan, dtype=data.dtype) exp_data[foff : foff + nfreq, toff : toff + ntime] = data - if limit_range is not Ellipsis: + if limit_range != slice(None): # Get only desired slice expsl = slice( max(limit_range.start, 0),