From 44424b0dff22945733c0922c233a598b82319a86 Mon Sep 17 00:00:00 2001
From: Alex Rojas <a.rojas8907@gmail.com>
Date: Thu, 19 Oct 2023 01:59:17 +0000
Subject: [PATCH] updated main.py

---
 main.py                          |  3 +--
 notebooks/run-gedi-biomass.ipynb | 12 ++++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/main.py b/main.py
index 6a39c4c..12d2ac0 100644
--- a/main.py
+++ b/main.py
@@ -123,7 +123,7 @@ if __name__ == '__main__':
     orbit_num = re.findall("O[0-9]{5}", l1b_basename)[0]
     track_num = re.findall("T[0-9]{5}", l1b_basename)[0]
     date_str = re.findall("[0-9]{13}", l1b_basename)[0]
-    outfp = os.path.join(outdir, f"GEDI_bioindex_{date_str}_{orbit_num}_{track_num}.csv")
+    outfp = os.path.join(outdir, "output", f"GEDI_bioindex_{date_str}_{orbit_num}_{track_num}.csv")
     
     # init df_list to concat afterwards
     df_list = []
@@ -194,7 +194,6 @@ if __name__ == '__main__':
     try:
         out_df = pd.concat(df_list, axis=0, ignore_index=True)
         out_df.to_csv(outfp, index=False)  
-        out_df.to_csv(outfp, "output", index=False)       
     except:
         print("Couldnt save file: ", l1b_fp)
         sys.exit()
diff --git a/notebooks/run-gedi-biomass.ipynb b/notebooks/run-gedi-biomass.ipynb
index 1c08f84..148ba05 100644
--- a/notebooks/run-gedi-biomass.ipynb
+++ b/notebooks/run-gedi-biomass.ipynb
@@ -98,7 +98,7 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "[{'job_id': 'be530e9c-8c8f-4680-b133-9db2fab35056', 'status': 'Accepted', 'machine_type': None, 'architecture': None, 'machine_memory_size': None, 'directory_size': None, 'operating_system': None, 'job_start_time': None, 'job_end_time': None, 'job_duration_seconds': None, 'cpu_usage': None, 'cache_usage': None, 'mem_usage': None, 'max_mem_usage': None, 'swap_usage': None, 'read_io_stats': None, 'write_io_stats': None, 'sync_io_stats': None, 'async_io_stats': None, 'total_io_stats': None, 'error_details': None, 'response_code': 200, 'outputs': []}]\n"
+      "[{'job_id': '9e4d8c3e-c8e2-47df-82cf-e9f0f4357ce8', 'status': 'Accepted', 'machine_type': None, 'architecture': None, 'machine_memory_size': None, 'directory_size': None, 'operating_system': None, 'job_start_time': None, 'job_end_time': None, 'job_duration_seconds': None, 'cpu_usage': None, 'cache_usage': None, 'mem_usage': None, 'max_mem_usage': None, 'swap_usage': None, 'read_io_stats': None, 'write_io_stats': None, 'sync_io_stats': None, 'async_io_stats': None, 'total_io_stats': None, 'error_details': None, 'response_code': 200, 'outputs': []}]\n"
      ]
     }
    ],
@@ -117,7 +117,7 @@
      "output_type": "stream",
      "text": [
       "Accepted\n",
-      "be530e9c-8c8f-4680-b133-9db2fab35056\n"
+      "7c2243dc-d90c-4ac0-8d57-6651f98b1b10\n"
      ]
     }
    ],
@@ -131,7 +131,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 10,
    "id": "2018077f-9640-4e70-bd01-a9d939b3626a",
    "metadata": {},
    "outputs": [
@@ -140,7 +140,7 @@
      "output_type": "stream",
      "text": [
       "Succeeded\n",
-      "be530e9c-8c8f-4680-b133-9db2fab35056\n"
+      "7c2243dc-d90c-4ac0-8d57-6651f98b1b10\n"
      ]
     }
    ],
@@ -154,7 +154,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 11,
    "id": "873e9ea7-d6cb-4bb9-b082-5bffb4026615",
    "metadata": {},
    "outputs": [
@@ -162,7 +162,7 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "['http://maap-ops-workspace.s3-website-us-west-2.amazonaws.com/arojearthdata/dps_output/arojas_biomass_gedi/master/single_file_test_run/2023/10/19/01/10/48/306256', 's3://s3.us-west-2.amazonaws.com:80/maap-ops-workspace/arojearthdata/dps_output/arojas_biomass_gedi/master/single_file_test_run/2023/10/19/01/10/48/306256', 'https://s3.console.aws.amazon.com/s3/buckets/maap-ops-workspace/arojearthdata/dps_output/arojas_biomass_gedi/master/single_file_test_run/2023/10/19/01/10/48/306256/?region=us-east-1&tab=overview']\n"
+      "['http://maap-ops-workspace.s3-website-us-west-2.amazonaws.com/arojearthdata/dps_output/arojas_biomass_gedi/master/single_file_test_run/2023/10/19/01/44/37/145570', 's3://s3.us-west-2.amazonaws.com:80/maap-ops-workspace/arojearthdata/dps_output/arojas_biomass_gedi/master/single_file_test_run/2023/10/19/01/44/37/145570', 'https://s3.console.aws.amazon.com/s3/buckets/maap-ops-workspace/arojearthdata/dps_output/arojas_biomass_gedi/master/single_file_test_run/2023/10/19/01/44/37/145570/?region=us-east-1&tab=overview']\n"
      ]
     }
    ],
-- 
GitLab