From 1e2debf715c28670acdb0107558537612ccdcc1c Mon Sep 17 00:00:00 2001
From: davidh-ssec <david.hoese@ssec.wisc.edu>
Date: Tue, 19 Dec 2017 16:13:44 -0600
Subject: [PATCH] Fix symbol renaming in frame generation for legacy db

---
 aosstower/level_00/parser.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/aosstower/level_00/parser.py b/aosstower/level_00/parser.py
index a681cb4..c1188d5 100644
--- a/aosstower/level_00/parser.py
+++ b/aosstower/level_00/parser.py
@@ -219,8 +219,9 @@ def read_frames(source, error_handler=lambda *a: None, tail=False):
 def loggernet_to_tower(rec_dict, symbol_names):
     """Convert loggernet record dictionary to our standard naming"""
     # assume that the next record after the traditional frame is the timestamp
+    old_symbols = ['timestamp'] + ParserV1V2.names
     new_symbols = ['timestamp'] + symbol_names
-    return _make_frame(zip(new_symbols, rec_dict.values()), new_symbols, rename_timestamp=True)
+    return _make_frame(zip(old_symbols, rec_dict.values()), new_symbols, rename_timestamp=True)
 
 
 def ldmp_generator(station_name, tables, symbol_names=ParserV1V2.names):
-- 
GitLab