From e66c29536c25524e316527a75949fc235a847bbe Mon Sep 17 00:00:00 2001 From: nmoyer Date: Wed, 21 Aug 2024 15:59:31 -0600 Subject: [PATCH] removing _collapse_cleaning_events so half_norm_clean results are not affected --- rdtools/soiling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rdtools/soiling.py b/rdtools/soiling.py index 6164bbaf..002d17f2 100644 --- a/rdtools/soiling.py +++ b/rdtools/soiling.py @@ -438,7 +438,7 @@ def _calc_result_df(self, trim=False, max_relative_slope_error=500.0, max_negati results.loc[filt, "run_slope"] = 0 results.loc[filt, "run_slope_low"] = 0 results.loc[filt, "run_slope_high"] = 0 - results.loc[filt, "valid"] = False + # results.loc[filt, "valid"] = False # Calculate the next inferred start loss from next valid interval results["next_inferred_start_loss"] = np.clip( @@ -465,10 +465,10 @@ def _calc_result_df(self, trim=False, max_relative_slope_error=500.0, max_negati results.loc[results.clean_event, "inferred_begin_shift"] = np.clip( results.inferred_begin_shift, 0, 1) ####################################################################### - ''' + if neg_shift is False: results.loc[filt, "valid"] = False - ''' + if len(results[results.valid]) == 0: raise NoValidIntervalError("No valid soiling intervals were found") new_start = results.start.iloc[0]