sidescanpy.analysis.outliers#

Before/after view of per-range-bin outlier rejection.

compare_outlier_rejection() summarizes a variable’s distribution before and after reject_range_outliers(), so the effect of that option can be judged before using it in a fit.

Contents

OutlierComparisonResult

Distribution summaries before and after outlier rejection.

compare_outlier_rejection

Summarize value_var before and after reject_range_outliers.

class sidescanpy.analysis.outliers.OutlierComparisonResult(bin_width_m=None, mad_k=None, n_rejected=0, pct_rejected=nan, before=<factory>, after=<factory>, filtered_values=None)#

Bases:

Distribution summaries before and after outlier rejection.

filtered_values (the rejected-as-NaN array, same shape as the input variable) is kept for plotting and left out of to_dict().

sidescanpy.analysis.outliers.compare_outlier_rejection(ds, value_var='backscatter_intensity', range_var='ground_range_m', *, bin_width_m=5.0, outlier_mad_k=3.5, outlier_min_bin_count=5)#

Summarize value_var before and after reject_range_outliers.

Purely descriptive; nothing else consumes the filtered values. bin_width_m, outlier_mad_k and outlier_min_bin_count are passed to reject_range_outliers(). Raises ValueError if range_var is missing.