From 9e4c287ba080385e3a7774bf4f375365f5b05d62 Mon Sep 17 00:00:00 2001 From: Chiara Monforte <75482817+MOchiara@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:00:31 +0200 Subject: [PATCH] Removed redundant lines on sunrise_sunset (#206) --- glidertools/optics.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/glidertools/optics.py b/glidertools/optics.py index ea486bc..cbe7c73 100644 --- a/glidertools/optics.py +++ b/glidertools/optics.py @@ -448,10 +448,8 @@ def sunset_sunrise(time, lat, lon): # set days as index df = df.set_index(df.time.values.astype("datetime64[D]")) - # groupby days and find sunrise for unique days # groupby days and find sunrise/sunset for unique days grp_avg = df.groupby(df.index).mean(numeric_only=False) - date = grp_avg.index.to_pydatetime() date = grp_avg.index time_utc = ts.utc(date.year, date.month, date.day, date.hour)