get_localMedian¶
-
lcps.slidingWindow.
get_localMedian
(flux, iWinStart, winSize, Nneighb=1)[source]¶ Find the local median and MAD of fluxes, ignoring the current window.
get_localMedian computes the median flux and the median absolute deviation (MAD) in the neighboring windows. The flux in the current window is ignored.
Parameters: flux : narray
A numpy array with the flux data
iWinStart : int
Index of the first datum in the current window
winSize : int
Size of a window
Nneighb : int
Number of neighboring windows to be considered for the averaging (At the boundaries of the time series, the considered data extends to the beginning or end of the array, respectively)
Returns: localMedian : float
Median of the flux in the windows neighboring the current one
MAD : float
median absolute deviation of the current window’s neighborhood