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: