From 52c265398803d4df01bb8a0e1c0f4dba971caf97 Mon Sep 17 00:00:00 2001 From: Baptiste Vandecrux <35140661+BaptisteVandecrux@users.noreply.github.com> Date: Thu, 15 Aug 2024 19:50:35 +0200 Subject: [PATCH] fixing tests --- src/pypromice/postprocess/real_time_utilities.py | 4 ++-- tests/data/test_config1.toml | 1 + tests/data/test_config2.toml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pypromice/postprocess/real_time_utilities.py b/src/pypromice/postprocess/real_time_utilities.py index 2ee3dec4..dd058286 100644 --- a/src/pypromice/postprocess/real_time_utilities.py +++ b/src/pypromice/postprocess/real_time_utilities.py @@ -73,8 +73,8 @@ def get_latest_data( # Apply smoothing to z_boom_u # require at least 2 hourly obs? Sometimes seeing once/day data for z_boom_u - df_limited = rolling_window(df_limited, "z_boom_u", "72h", 2, 1) - + df_limited = rolling_window(df_limited, "z_boom_u", "72h", 2, 3) + # limit to single most recent valid row (convert to series) s_current = df_limited.loc[last_valid_index] diff --git a/tests/data/test_config1.toml b/tests/data/test_config1.toml index 09392c08..6b9e2e95 100644 --- a/tests/data/test_config1.toml +++ b/tests/data/test_config1.toml @@ -2,6 +2,7 @@ station_id = 'TEST1' logger_type = 'CR1000X' nodata = ['-999', 'NAN'] # if one is a string, all must be strings number_of_booms = 1 #1-boom = promice, 2-boom = gc-net +site_type = 'ablation' latitude = 79.91 longitude = 24.09 diff --git a/tests/data/test_config2.toml b/tests/data/test_config2.toml index 8213d955..2c632abe 100644 --- a/tests/data/test_config2.toml +++ b/tests/data/test_config2.toml @@ -2,6 +2,7 @@ station_id = 'TEST2' logger_type = 'CR1000X' nodata = ['-999', 'NAN'] # if one is a string, all must be strings number_of_booms = 2 +site_type = 'accumulation' ['test_raw_transmitted2.txt'] format = 'TX'