From 784666532493a9f93248f324cad13677f1c1295a Mon Sep 17 00:00:00 2001 From: Alex Rojas <a.rojas8907@gmail.com> Date: Thu, 30 Nov 2023 16:36:09 +0000 Subject: [PATCH] fixed main.py file --- main.py | 20 ++++++++++---------- notebooks/run-gedi-biomass.ipynb | 15 ++------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/main.py b/main.py index 54039c1..1d7ce1a 100644 --- a/main.py +++ b/main.py @@ -199,14 +199,14 @@ if __name__ == '__main__': # append to df_list df_list.append(new_df) - # Save - try: - out_df = pd.concat(df_list, axis=0, ignore_index=True) - out_df.to_csv(outfp, index=False) - except Exception as e: - print("Couldnt save file: ", l1b_basename) - print("outdir: ", outdir) - print("outfp: ", outfp) - print(e) - sys.exit() +# Save +try: + out_df = pd.concat(df_list, axis=0, ignore_index=True) + out_df.to_csv(outfp, index=False) +except Exception as e: + print("Couldnt save file: ", l1b_basename) + print("outdir: ", outdir) + print("outfp: ", outfp) + print(e) + sys.exit() diff --git a/notebooks/run-gedi-biomass.ipynb b/notebooks/run-gedi-biomass.ipynb index 1fc8eea..d6595fa 100644 --- a/notebooks/run-gedi-biomass.ipynb +++ b/notebooks/run-gedi-biomass.ipynb @@ -53,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "b39e76ac-d765-4b8c-baf1-fe41f3296de9", "metadata": {}, "outputs": [ @@ -61,18 +61,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "on file num: 200\r" - ] - }, - { - "ename": "KeyboardInterrupt", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[3], line 35\u001b[0m\n\u001b[1;32m 33\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m counter\u001b[38;5;241m%\u001b[39m\u001b[38;5;241m100\u001b[39m\u001b[38;5;241m==\u001b[39m\u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 34\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon file num: \u001b[39m\u001b[38;5;124m\"\u001b[39m, counter, end\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;130;01m\\r\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m---> 35\u001b[0m \u001b[43mtime\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msleep\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m800\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 36\u001b[0m counter\u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m\n", - "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + "on file num: 100\r" ] } ], -- GitLab