Skip to content

Commit

Permalink
Update sbe_parser.py (#285)
Browse files Browse the repository at this point in the history
add another time flag for sbe-16
  • Loading branch information
shaunwbell authored Nov 15, 2023
1 parent 2ac9914 commit 4504e3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/EcoFOCIpy/io/sbe_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4504e3a

Please sign in to comment.