Compare commits

..

No commits in common. '1e1567ab14489ad2c150c138f3a26ad0f3dfdd62' and '4e7414e7fc6955997fef9a0a8c10cf1da27b52b0' have entirely different histories.

@ -107,11 +107,7 @@ for site in os.listdir(images_dir): # Loop through SITES
# Add site stability data (# registered / # processed) # Add site stability data (# registered / # processed)
for i, row in stats_csv.iterrows(): for i, row in stats_csv.iterrows():
stability = "{0:.0%}".format(stats_csv.at[i, '# registered'] / stats_csv.at[i, '# photoshop'])
if stats_csv.at[i, '# photoshop'] != 0:
stability = "{0:.0%}".format(stats_csv.at[i, '# registered'] / stats_csv.at[i, '# photoshop'])
else:
stability = 'NaN' # or whatever value makes sense in your context
stats_csv.at[i,'stability'] = stability stats_csv.at[i,'stability'] = stability
stats_csv.set_index('site', inplace = True) stats_csv.set_index('site', inplace = True)

@ -40,9 +40,6 @@ coastsnap_sites_csv = pd.read_csv(sites_csv_path)
images_parent_dir = coastsnap_sites_csv.parent_directory[0] images_parent_dir = coastsnap_sites_csv.parent_directory[0]
images_dir = os.path.join(images_parent_dir, "Images") images_dir = os.path.join(images_parent_dir, "Images")
site_list = coastsnap_sites_csv['site_name'] # Loop through sites in coastsnap_sites.csv
#site_list = os.listdir(images_dir) # Loop through all sites in /CoastSnap/Images
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# Tag image function # Tag image function
@ -230,7 +227,7 @@ if args.tag_reregistered:
if args.site: if args.site:
count = loop_reregistered(args.site, tag, reregister_all) count = loop_reregistered(args.site, tag, reregister_all)
else: else:
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir): for site in os.listdir(images_dir):
x = loop_reregistered(site, tag, reregister_all) x = loop_reregistered(site, tag, reregister_all)
count = count + x count = count + x
@ -250,7 +247,7 @@ if args.tag_reregistered:
if args.site: # Case 1: User specifies a site if args.site: # Case 1: User specifies a site
loop_reregistered(args.site, tag, reregister_all) loop_reregistered(args.site, tag, reregister_all)
else: # Case 2: No site specified. Tag all images else: # Case 2: No site specified. Tag all images
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir): for site in os.listdir(images_dir):
loop_reregistered(site, tag, reregister_all) loop_reregistered(site, tag, reregister_all)
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
@ -261,7 +258,7 @@ else:
if args.site: # Case 1: User specifies a site if args.site: # Case 1: User specifies a site
main(args.site) main(args.site)
else: # Case 2: No site specified. Tag all images else: # Case 2: No site specified. Tag all images
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir): for site in os.listdir(images_dir):
main(site) main(site)

Loading…
Cancel
Save