Skip to content

Commit

Permalink
Issue deleting variables that don't exist (CameronBodine#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBodine committed Jan 2, 2023
1 parent 30d3478 commit 332a0ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/class_sonObj.py
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ def _fixNoDat(self, dfA, beams):
df.iloc[-1, df.columns.get_loc('f')] = np.nan
# df.iloc[-1, df.columns.get_loc('ping_cnt')] = np.nan
df.iloc[-1, df.columns.get_loc('beam')] = beam
del beam

# reset b
for k, v in b.items():
Expand All @@ -1315,7 +1316,7 @@ def _fixNoDat(self, dfA, beams):
b[cRow['beam'].values[0]] = c
c+=1

del beam, beams, noDat, dfA, cRow, bCnt, c, b
del beams, noDat, dfA, cRow, bCnt, c, b

return df

Expand Down
4 changes: 3 additions & 1 deletion src/main_readFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,9 @@ def read_master_func(humFile='',
print("{:<15s} | {:<15s}".format(key.split(".")[0], key.split(".")[1]))
print("\n*******************************\n****WARNING: INVALID VALUES****\n*******************************")
print("\nPING-Mapper detected issues with\nthe values stored in the above\nsonar channels and attributes.")
del invalid, beam, beams
del invalid, beam
if fixNoDat:
del beams


print("\nDone!")
Expand Down

0 comments on commit 332a0ac

Please sign in to comment.