Skip to content
Snippets Groups Projects
Commit be356a77 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

Merge branch 'uniLOFslopeCorrection' into 'develop'

correct slope correct

See merge request !861
parents fa98154e ec0e7991
No related branches found
No related tags found
1 merge request!861correct slope correct
Pipeline #264016 passed with stages
in 4 minutes and 37 seconds
...@@ -401,15 +401,7 @@ class OutliersMixin: ...@@ -401,15 +401,7 @@ class OutliersMixin:
down_slopes = (max_vals - eps <= last_vals.shift(1)) & ( down_slopes = (max_vals - eps <= last_vals.shift(1)) & (
min_vals + eps >= first_vals.shift(-1) min_vals + eps >= first_vals.shift(-1)
) )
slopes = up_slopes | down_slopes corrections = up_slopes | down_slopes
odd_return_pred = (max_vals > last_vals.shift(1)) & (
min_vals < last_vals.shift(1)
)
odd_return_succ = (max_vals > first_vals.shift(-1)) & (
min_vals < first_vals.shift(-1)
)
returns = odd_return_succ | odd_return_pred
corrections = returns | slopes
for s_id in corrections[corrections].index: for s_id in corrections[corrections].index:
correct_idx = od_groups.get_group(s_id).index correct_idx = od_groups.get_group(s_id).index
s_mask[correct_idx] = False s_mask[correct_idx] = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment