From ccdca3f0b46b212b5beff93c27f7db449e96de8e Mon Sep 17 00:00:00 2001 From: shaunwbell Date: Tue, 10 Oct 2023 15:38:40 -0700 Subject: [PATCH] Update wetlabs_parser.py (#274) --- src/EcoFOCIpy/io/wetlabs_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EcoFOCIpy/io/wetlabs_parser.py b/src/EcoFOCIpy/io/wetlabs_parser.py index c8521f8..fd9cace 100644 --- a/src/EcoFOCIpy/io/wetlabs_parser.py +++ b/src/EcoFOCIpy/io/wetlabs_parser.py @@ -13,9 +13,9 @@ """ import sys +import datetime import pandas as pd - class wetlabs(object): r""" Wetlabs Unified parser @@ -117,7 +117,7 @@ def lineartimecorr(x,deltaT,T0) : return date T0 = self.rawdata_df.index[0] - deltaT = offset / (self.rawdata_df.index[-1] - T0) + deltaT = datetime.timedelta(seconds=offset) / (self.rawdata_df.index[-1] - T0) self.rawdata_df.index = self.rawdata_df.reset_index().apply(lambda x: lineartimecorr(x.date_time,deltaT,T0), axis=1)