Commit 995d44b4 authored by JOSSOUD Olivier's avatar JOSSOUD Olivier
Browse files

Flow. Manage case when no move-up events

parent 41b01bb4
Pipeline #172849 failed with stage
in 1 minute and 3 seconds
......@@ -416,6 +416,7 @@ def add_iceblock_info(arrival_df: pd.DataFrame, iceblock_df: pd.DataFrame) -> pd
return arrival_df
def add_melted_height(arrival_df: pd.DataFrame, encoder_df: pd.DataFrame, iceblock_df: pd.DataFrame,
normal_speed_range: typing.Tuple[float, float] = (-3.0, -0.01)) -> pd.DataFrame:
"""Add melted block height.
......@@ -437,8 +438,10 @@ def add_melted_height(arrival_df: pd.DataFrame, encoder_df: pd.DataFrame, iceblo
Same as input `arrival_df`, with melted block height.
"""
moveup_events_df = encoder.get_moveup_events(encoder_df, normal_speed_range)
arrival_df = encoder.smooth_unblocking_events(moveup_events_df[moveup_events_df["event_type"] == "unblocking"],
arrival_df)
if len(moveup_events_df) > 0:
unblocking_events_df = moveup_events_df[moveup_events_df["event_type"] == "unblocking"]
if len(unblocking_events_df) > 0:
arrival_df = encoder.smooth_unblocking_events(unblocking_events_df, arrival_df)
stacked_iceblock_df = iceblock.get_total_stacked_height(iceblock_df)
arrival_df = get_absolute_melted_height_interp(arrival_df, stacked_iceblock_df, moveup_events_df,
starting_on_plexi=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment