exoiris.clean_knots#
- exoiris.clean_knots(knots, min_distance, lmin=0, lmax=inf)[source]#
Clean the knot table by replacing groups of adjacent knots with a single knot at the group mean.
- Parameters:
knots (numpy.ndarray) – An array of knots.
min_distance (float) – The minimum distance between adjacent knots.
lmin (float, optional) – The minimum value of knots to consider. Default is 0.
lmax (float, optional) – The maximum value of knots to consider. Default is inf.
- Returns:
An array of cleaned knots, where adjacent knots that are less than
min_distanceapart are replaced by the mean value of the group.- Return type: