From dee7c7d1ae62bec1969f04f4555c3c879634f025 Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Fri, 24 Jun 2022 12:01:30 +1000 Subject: [PATCH] Tag registered works with No_Tide.mat now --- README.md | 10 +++++----- coastsnap/tag_registered.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c066d41..4ec3f37 100644 --- a/README.md +++ b/README.md @@ -39,15 +39,15 @@ The following is a demo to make sure all of the code is working and for the user path of the CoastsnapAuto/CoastSnap_DEMO directory. 2. Open the CoastsnapAuto/coastsnap directory 3. Run `1_batch_spotteron_download.bat` [30s] -- This downloads 5 images each for 3 sites and stores them in CoastSnap_DEMO/Images/Site_Name/Processed) + - This downloads 5 images each for 3 sites and stores them in CoastSnap_DEMO/Images/Site_Name/Processed) 4. Run `2_batch_photoshop_registration.bat` [2 mins] -- Note: If this doesn't work, edit the .bat file and make sure the path to your photoshop is correct. -- This registers the 15 images in photoshop and stores them in CoastSnap_DEMO/Images/Site_Name/Photoshop + - Note: If this doesn't work, edit the .bat file and make sure the path to your photoshop is correct. + - This registers the 15 images in photoshop and stores them in CoastSnap_DEMO/Images/Site_Name/Photoshop 5. Run `3_batch_tag_registered.bat` [3 mins] -- This tags the photoshop registered images and stores them in CoastSnap_DEMO/Images/Site_Name/Registered. Note: Loading .mat tide data in Python takes a while. + - This tags the photoshop registered images and stores them in CoastSnap_DEMO/Images/Site_Name/Registered. Note: Loading .mat tide data in Python takes a while. 6. Delete any poorly registered/tagged images in CoastSnap_DEMO/Images/Site_Name/Registered 7. Run `4_generate_images_snapshot.bat` -- This generates a snapshot of the CoastSnap images directory at `images_snapshot.csv` + - This generates a snapshot of the CoastSnap images directory at `images_snapshot.csv` ### Update file paths To run this code on the shared oneDrive CoastSnap directory: diff --git a/coastsnap/tag_registered.py b/coastsnap/tag_registered.py index 790cf06..3f1c715 100644 --- a/coastsnap/tag_registered.py +++ b/coastsnap/tag_registered.py @@ -124,7 +124,7 @@ for site in os.listdir(images_dir): # Loop through SITES tides_df = get_site_tide_data(images_parent_dir, site) font = image2tag.get_font() - image2tag.get_tide(tides_df) + if tides_df: image2tag.get_tide(tides_df) image2tag.create_tag() tag_image(image2tag)