From 4504e3a921b7a7dd1a8a293c9fafff6a1919b794 Mon Sep 17 00:00:00 2001 From: shaunwbell Date: Wed, 15 Nov 2023 07:03:34 -0800 Subject: [PATCH] Update sbe_parser.py (#285) add another time flag for sbe-16 --- src/EcoFOCIpy/io/sbe_parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/EcoFOCIpy/io/sbe_parser.py b/src/EcoFOCIpy/io/sbe_parser.py index 5ae5d6c..5079a93 100644 --- a/src/EcoFOCIpy/io/sbe_parser.py +++ b/src/EcoFOCIpy/io/sbe_parser.py @@ -91,6 +91,8 @@ def parse(filename=None, return_header=True, datetime_index=True): rawdata_df['date_time'] = [datetime.datetime.strptime(start_time, "%b %d %Y %H:%M:%S") + pd.Timedelta(seconds=x) for x in rawdata_df['timeS']] elif 'timeK' in var_names.values(): #time in elapse seconds, needs start date rawdata_df['date_time'] = [datetime.datetime.strptime('jan 01 2000 00:00:00', "%b %d %Y %H:%M:%S") + pd.Timedelta(seconds=x) for x in rawdata_df['timeK']] + elif 'timeSCP' in var_names.values(): #time in julian date, needs start year + rawdata_df['date_time'] = [datetime.datetime(datetime.datetime.strptime(start_time, "%b %d %Y %H:%M:%S").year,1,1) + pd.Timedelta(days=x-1) for x in rawdata_df['timeSCP']] else: