From c391edf75578ef80e7f2eab8219e078617c6132d Mon Sep 17 00:00:00 2001 From: Chris Leaman Date: Tue, 27 Nov 2018 15:50:17 +1100 Subject: [PATCH] Keep old index number of site when parsing .mat file --- src/data/parse_mat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data/parse_mat.py b/src/data/parse_mat.py index 4fb29d3..7a368da 100644 --- a/src/data/parse_mat.py +++ b/src/data/parse_mat.py @@ -151,6 +151,7 @@ def parse_profiles_and_sites(profiles_mat): site_counter = 0 for i, site in enumerate(mat_data["site"]): + logger.debug('Processing site {} of {}'.format(i+1, len(mat_data['site']))) # Give each site a unique id if len(site_rows) == 0 or site_rows[-1]["beach"] != site: @@ -205,6 +206,7 @@ def parse_profiles_and_sites(profiles_mat): profile_rows.append( { "site_id": site_id, + "site_no": i, "lon": lon[0], "lat": lat[0], "profile_type": profile_type,