tmdsimpy.utils.harmonic.zero_crossing¶
- tmdsimpy.utils.harmonic.zero_crossing(X, zero_tol=inf)¶
Finds the locations where the vector has zero crossings (sign changes).
- Parameters:
- X1D numpy.ndarray
Array to find approximate zero crossings in.
- zero_tolscalar, optional
Require X at crossing to be less than this tolerance. The default is numpy.inf.
- Returns:
- TFnumpy.ndarray of bool
Has size the same as X, has True for indices of approximate zero crossings. True should always be the first index of the two indices that are before and after the crossing.
Notes
This function is not tested and should be used with care.