From 0ab71290e47868ef6d2107dc437fed5db4100d14 Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Fri, 8 Jul 2022 18:38:42 +1000 Subject: [PATCH] Updated images_snapshot.py --- coastsnap/images_snapshot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coastsnap/images_snapshot.py b/coastsnap/images_snapshot.py index 895203f..0a6f6cc 100644 --- a/coastsnap/images_snapshot.py +++ b/coastsnap/images_snapshot.py @@ -68,7 +68,8 @@ for site in os.listdir(images_dir): # Loop through SITES for image_filename in image_list: # Loop through IMAGES year_path = year_path.replace('Photoshop', 'Registered') - registered_image_path = year_path + '/' + image_filename[:-4] + '_registered.jpg' + image_filename_no_suffix = image_filename.replace("_tagged",""); + registered_image_path = year_path + '/' + image_filename_no_suffix[:-4] + '_registered.jpg' # Finding the Latest Deleted Image Logic: # Iterate through 'Images/Processed' @@ -106,7 +107,7 @@ for site in os.listdir(images_dir): # Loop through SITES # Add site stability data (# registered / # processed) for i, row in stats_csv.iterrows(): - stability = "{0:.0%}".format(stats_csv.at[i, '# registered'] / stats_csv.at[i, '# processed']) + stability = "{0:.0%}".format(stats_csv.at[i, '# registered'] / stats_csv.at[i, '# photoshop']) stats_csv.at[i,'stability'] = stability stats_csv.set_index('site', inplace = True)