Skip to content

Commit

Permalink
Update adcp_parser.py (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunwbell authored Oct 30, 2024
1 parent 5083103 commit 897bff2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/EcoFOCIpy/io/adcp_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def load_pg_file(self, pgfile_path=None, datetime_index=True):
if self.depdir:
pgfile_path = self.depdir + '.PG'

self.pg_df = pd.read_csv(pgfile_path,delimiter='\s+',header=None,names=['date','time','bin','pg3beam-good','pgtransf-good','pg1beam-bad','pg4beam-good'])
self.pg_df = pd.read_csv(pgfile_path,delimiter=r'\s+',header=None,names=['date','time','bin','pg3beam-good','pgtransf-good','pg1beam-bad','pg4beam-good'])
self.pg_df["date_time"] = pd.to_datetime(self.pg_df.date+' '+self.pg_df.time,format="%y/%m/%d %H:%M:%S")

if datetime_index:
Expand All @@ -49,7 +49,7 @@ def load_ein_file(self, einfile_path=None, datetime_index=True):
if self.depdir:
einfile_path = self.depdir + '.EIN'

self.ein_df = pd.read_csv(einfile_path,delimiter='\s+',header=None,names=['date','time','bin','agc1','agc2','agc3','agc4'])
self.ein_df = pd.read_csv(einfile_path,delimiter=r'\s+',header=None,names=['date','time','bin','agc1','agc2','agc3','agc4'])
self.ein_df["date_time"] = pd.to_datetime(self.ein_df.date+' '+self.ein_df.time,format="%y/%m/%d %H:%M:%S")

if datetime_index:
Expand All @@ -61,7 +61,7 @@ def load_vel_file(self, velfile_path=None, datetime_index=True):
if self.depdir:
velfile_path = self.depdir + '.VEL'

self.vel_df = pd.read_csv(velfile_path,delimiter='\s+',header=None,
self.vel_df = pd.read_csv(velfile_path,delimiter=r'\s+',header=None,
names=['date','time','bin','u_curr_comp','v_curr_comp','w_curr_comp','w_curr_comp_err'])
self.vel_df["date_time"] = pd.to_datetime(self.vel_df.date+' '+self.vel_df.time,format="%y/%m/%d %H:%M:%S")

Expand All @@ -74,7 +74,7 @@ def load_scal_file(self, scalfile_path=None, datetime_index=True):
if self.depdir:
scalfile_path = self.depdir + '.SCA'

self.scal_df = pd.read_csv(scalfile_path,delimiter='\s+',header=None,
self.scal_df = pd.read_csv(scalfile_path,delimiter=r'\s+',header=None,
names=['date','time','unknown','temperature','heading','pitch','roll','heading_stdev','pitch_stdev','roll_stdev'])
self.scal_df["date_time"] = pd.to_datetime(self.scal_df.date+' '+self.scal_df.time,format="%y/%m/%d %H:%M:%S")

Expand Down

0 comments on commit 897bff2

Please sign in to comment.