diff --git a/laravel_app/app/Models/ProjectReport.php b/laravel_app/app/Models/ProjectReport.php index 24e65bb..edcd81e 100644 --- a/laravel_app/app/Models/ProjectReport.php +++ b/laravel_app/app/Models/ProjectReport.php @@ -30,7 +30,7 @@ public function weeksAgo() public static function weeksAgoForYearAndWeek($year, $week) { - return now()->diffInWeeks(now()->setISODate($year, $week)); + return (now()->week - now()->setISODate($year, $week)->week); } public function getFileName() diff --git a/python_app/Chemba_download.ipynb b/python_app/Chemba_download.ipynb index 28fc6d4..6917df0 100644 --- a/python_app/Chemba_download.ipynb +++ b/python_app/Chemba_download.ipynb @@ -1,8 +1,18 @@ { "cells": [ + { + "cell_type": "markdown", + "id": "0c18e312-8421-47d7-84f9-ed7d5e47e7ee", + "metadata": { + "tags": [] + }, + "source": [ + "#### Load packages and connect to SentinelHub" + ] + }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 1, "id": "b7ca7102-5fd9-481f-90cd-3ba60e288649", "metadata": {}, "outputs": [], @@ -23,12 +33,13 @@ "\n", "config = SHConfig()\n", "\n", - "import time" + "import time\n", + "import shutil" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 2, "id": "330c967c-2742-4a7a-9a61-28bfdaf8eeca", "metadata": {}, "outputs": [], @@ -38,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 3, "id": "49f8496a-a267-4b74-9500-a168e031ed68", "metadata": {}, "outputs": [], @@ -49,7 +60,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 4, "id": "5491a840-779c-4f0c-8164-c3de738b3298", "metadata": {}, "outputs": [], @@ -60,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 5, "id": "eb1fb662-0e25-4ca9-8317-c6953290842b", "metadata": {}, "outputs": [], @@ -72,63 +83,102 @@ " is_timeless=True)" ] }, + { + "cell_type": "markdown", + "id": "6adb603d-8182-48c6-a051-869e16ee7bba", + "metadata": { + "tags": [] + }, + "source": [ + "#### Set some variables\n", + "The only place anything might need to be changed." + ] + }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 6, + "id": "060396e0-e5ee-4b54-b211-5d8bfcba167f", + "metadata": {}, + "outputs": [], + "source": [ + "#project = 'chemba' #or xinavane or chemba_test_8b\n", + "#project = 'xinavane' #or xinavane or chemba_test_8b\n", + "project = 'chemba_test_8b' #or xinavane or chemba_test_8b\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "c9f79e81-dff8-4109-8d26-6c423142dcf2", + "metadata": {}, + "outputs": [], + "source": [ + "# Adjust the number of days needed\n", + "days = 1095 #change back to 28 which is the default. 3 years is 1095 days." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "e18bdf8f-be4b-44ab-baaa-de5de60d92cb", + "metadata": {}, + "outputs": [], + "source": [ + "#delete all the satellite outputs -> then True\n", + "empty_folder_question = False" + ] + }, + { + "cell_type": "markdown", + "id": "81bbb513-0bd2-4277-83e8-6f94051ce70b", + "metadata": { + "tags": [] + }, + "source": [ + "#### Define functions\n", + "After this block, no manual changes to parameters are required. \n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "3f7c8e04-4569-457b-b39d-283582c4ba36", + "metadata": {}, + "outputs": [], + "source": [ + "BASE_PATH = Path('../laravel_app/storage/app') / os.getenv('PROJECT_DIR',project) \n", + "BASE_PATH_SINGLE_IMAGES = Path(BASE_PATH / 'single_images')\n", + "folder_for_merged_tifs = str(BASE_PATH / 'merged_tif')\n", + "folder_for_virtual_raster = str(BASE_PATH / 'merged_virtual')\n", + " \n", + "# Check if the folders exist, and if not, create them\n", + "if not os.path.exists(BASE_PATH_SINGLE_IMAGES):\n", + " os.makedirs(BASE_PATH_SINGLE_IMAGES)\n", + " \n", + "if not os.path.exists(folder_for_merged_tifs):\n", + " os.makedirs(folder_for_merged_tifs)\n", + "\n", + "if not os.path.exists(folder_for_virtual_raster):\n", + " os.makedirs(folder_for_virtual_raster)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, "id": "244b5752-4f02-4347-9278-f6a0a46b88f4", "metadata": {}, "outputs": [], "source": [ - "\"\"\"\n", - "Utilities used by example notebooks\n", - "\"\"\"\n", - "import matplotlib.pyplot as plt\n", - "import numpy as np\n", - "\n", - "\n", - "#def plot_image(image, factor=1.0, clip_range=None, **kwargs):\n", - "# \"\"\"\n", - "# Utility function for plotting RGB images.\n", - "# \"\"\"\n", - "# fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(15, 15))\n", - "# if clip_range is not None:\n", - "# ax.imshow(np.clip(image * factor, *clip_range), **kwargs)\n", - "# else:\n", - "## ax.imshow(image * factor, **kwargs)\n", - " # ax.set_xticks([])\n", - " # ax.set_yticks([]) \n", - "\n", - "\n", - "#evalscript_true_color = \"\"\"\n", - "# //VERSION=3\n", - "#\n", - "# function setup() {\n", - "# return {\n", - "# input: [{\n", - "# bands: [\"B1\", \"B2\", \"B3\", \"B4\", \"UDM\"]\n", - "# }],\n", - "# output: {\n", - "# bands: 5,\n", - "# nodataValue: NA\n", - "# }\n", - "# };\n", - "# }\n", - "#\n", - "# function evaluatePixel(sample) {\n", - "# return [2.5 * sample.B1 / 10000, 2.5 * sample.B2 / 10000, 2.5 * sample.B3 / 10000, 2.5 * sample.B4 / 10000, sample.UDM];\n", - "# }\n", - "#\"\"\"\n", - "\n", "evalscript_true_color = \"\"\"\n", " //VERSION=3\n", "\n", " function setup() {\n", " return {\n", " input: [{\n", - " bands: [\"Red\", \"Green\", \"Blue\", \"NIR\", \"UDM\"]\n", + " bands: [\"Red\", \"Green\", \"Blue\", \"NIR\", \"UDM2_Clear\"]\n", " }],\n", " output: {\n", - " bands: 2 \n", + " bands: 4 \n", " //sampleType: \"FLOAT32\"\n", " }\n", " };\n", @@ -136,57 +186,30 @@ "\n", " function evaluatePixel(sample) {\n", " // Scale the bands\n", - " //var scaledBlue = [2.5 * sample.Blue / 10000];\n", + " var scaledBlue = [2.5 * sample.Blue / 10000];\n", " var scaledGreen = [2.5 * sample.Green / 10000];\n", - " //var scaledRed = [2.5 * sample.Red / 10000];\n", + " var scaledRed = [2.5 * sample.Red / 10000];\n", " var scaledNIR = [2.5 * sample.NIR / 10000];\n", " \n", " // Calculate the CI (Chlorophyll Index) using the scaled values\n", " // var CI = [scaledNIR / scaledGreen - 1] ;\n", "\n", "// Output the scaled bands and CI\n", - " if (sample.UDM == 0) { \n", + " if (sample.UDM2_Clear != 0) { \n", " return [\n", - " //scaledRed,\n", + " scaledRed,\n", " scaledGreen,\n", - " // scaledBlue,\n", + " scaledBlue,\n", " scaledNIR\n", " // sample.UDM,\n", " // CI,\n", " ]\n", " } else {\n", - " return [NaN, NaN]}\n", - " \n", - " }\n", + " return [NaN, NaN, NaN, NaN]}\n", + " }\n", "\"\"\"\n", "\n", - "#def get_true_color_request(time_interval):\n", - "# return SentinelHubRequest(\n", - "# evalscript=evalscript_true_color,\n", - "# input_data=[\n", - "# SentinelHubRequest.input_data(\n", - " # data_collection=DataCollection.planet_data2,\n", - "# time_interval=time_interval\n", - "# )\n", - "# ],\n", - "# responses=[\n", - "# SentinelHubRequest.output_response('default', MimeType.TIFF)\n", - "# ],\n", - "# bbox=chemba_bbox,\n", - "# size=chemba_size,\n", - "# config=config,\n", - "# data_folder='chemba_single_images/'+date,\n", - "#\n", - "# )\n", - "\n", - "BASE_PATH = Path('../laravel_app/storage/app') / os.getenv('PROJECT_DIR','chemba') \n", - "BASE_PATH_SINGLE_IMAGES = Path(BASE_PATH / 'single_images')\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "def get_true_color_request_day_west(time_interval, bbox, size):\n", + "def get_true_color_request_day(time_interval, bbox, size):\n", " return SentinelHubRequest(\n", " evalscript=evalscript_true_color,\n", " input_data=[\n", @@ -205,174 +228,14 @@ "\n", " )\n", "\n", - "#def get_true_color_request_week(time_interval):\n", - "# return SentinelHubRequest(\n", - "# evalscript=evalscript_true_color,\n", - "# input_data=[\n", - "# SentinelHubRequest.input_data(\n", - "# data_collection=DataCollection.planet_data2,\n", - "# time_interval=time_interval\n", - "# )\n", - "# ],\n", - "# responses=[\n", - "# SentinelHubRequest.output_response('default', MimeType.TIFF)\n", - "# ],\n", - "# bbox=chemba_bbox,\n", - "# size=chemba_size,\n", - "# config=config,\n", - "# data_folder='chemba_weekly_img/'+date,\n", - "#\n", - " # )" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "5abb2cc0-5e2f-46cd-9676-3093d07b0624", - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#end = datetime.date.today() - datetime.timedelta(days=1)\n", - "#start = end - datetime.timedelta(days=6)\n", - "\n", - "#end = datetime.date(2022, 7, 1)\n", - "#start = datetime.date(2022, 7, 21)\n", - "\n", - "#n_chunks = start - end\n", - "#n_chunks.days\n" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "a4937240-27f9-44c3-ad9c-cec6f2ffe4c8", - "metadata": {}, - "outputs": [], - "source": [ - "#end = datetime.date(2022, 8, 4) \n", - "#start = datetime.date(2023, 3, 1)\n", - "#days_needed = 6#\n", - "\n", - "#end = datetime.date.today() - datetime.timedelta(days=days_needed - 1)\n", - "#start = end - datetime.timedelta(days=1)\n", - "\n", - "\n", - "#n_chunks = days_needed + 1\n", - "#tdelta = datetime.timedelta(days=1)\n", - "#edges = [(start + i*tdelta).isoformat() for i in range(n_chunks)]\n", - "#slots = [(edges[i], edges[i]) for i in range(len(edges))]\n", - "#slots = [(edges[i]) for i in range(len(edges))]\n", - "\n", - "#date = start.strftime(\"%Y-%m-%d\")\n", - "\n", - "#print('Monthly time windows:\\n')\n", - "#for slot in slots:\n", - "# print(slot)" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "848dc773-70d6-4ae6-b05c-d6ebfb41624d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Monthly time windows:\n", - "\n", - "2024-02-03\n", - "2024-02-04\n", - "2024-02-05\n", - "2024-02-06\n", - "2024-02-07\n", - "2024-02-08\n", - "2024-02-09\n", - "2024-02-10\n", - "2024-02-11\n", - "2024-02-12\n", - "2024-02-13\n", - "2024-02-14\n", - "2024-02-15\n", - "2024-02-16\n", - "2024-02-17\n", - "2024-02-18\n", - "2024-02-19\n", - "2024-02-20\n", - "2024-02-21\n", - "2024-02-22\n", - "2024-02-23\n", - "2024-02-24\n", - "2024-02-25\n", - "2024-02-26\n", - "2024-02-27\n", - "2024-02-28\n", - "2024-02-29\n", - "2024-03-01\n" - ] - } - ], - "source": [ - "import datetime\n", - "\n", - "days_needed = int(os.environ.get(\"DAYS\", 28)) #change back to 28 which is the default\n", - " # Adjust the number of days needed\n", - " \n", - "date_str = os.environ.get(\"DATE\")\n", - "if date_str:\n", - " # Parse de datumstring naar een datetime.date object\n", - " end = datetime.datetime.strptime(date_str, \"%Y-%m-%d\").date()\n", - "else:\n", - " # Gebruik de huidige datum als fallback\n", - " end = datetime.date.today() \n", - "\n", - "\n", - "#end = datetime.datetime(2023, 11, 10)\n", - "#start = datetime.datetime(2023, 10, 19)\n", - "start = end - datetime.timedelta(days=days_needed - 1)\n", - "\n", - "slots = [(start + datetime.timedelta(days=i)).strftime('%Y-%m-%d') for i in range(days_needed)]\n", - "\n", - "print('Monthly time windows:\\n')\n", - "for slot in slots:\n", - " print(slot)\n" - ] - }, - { - "cell_type": "markdown", - "id": "0c18e312-8421-47d7-84f9-ed7d5e47e7ee", - "metadata": {}, - "source": [ - "### Download images\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2335139b-dfb1-4371-ae2c-c2b9c8cbf10c", - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "77513576-2fed-4d17-a665-d11267b42390", - "metadata": {}, - "outputs": [], - "source": [ "def download_function(slot, bbox, size):\n", " # create a list of requests\n", - " list_of_requests = [get_true_color_request_day_west(slot, bbox, size)]\n", + " list_of_requests = [get_true_color_request_day(slot, bbox, size)]\n", " list_of_requests = [request.download_list[0] for request in list_of_requests]\n", "\n", " # download data chemba west with multiple threads\n", " data = SentinelHubDownloadClient(config=config).download(list_of_requests, max_threads=15)\n", - " print(f' West downloaded ' +slot)\n", + " print(f' Image downloaded for ' +slot)\n", " \n", " time.sleep(.5)\n", "\n", @@ -380,7 +243,8 @@ " \n", " # List the downloaded Tiffs in the different subfolders with pathlib (native library)\n", " file_list = [f\"{x}/response.tiff\" for x in Path(BASE_PATH_SINGLE_IMAGES / slot).iterdir()]\n", - " print(file_list)\n", + " \n", + " #print(file_list)\n", "\n", " folder_for_merged_tifs = str(BASE_PATH / 'merged_tif' / f\"{slot}.tif\")\n", " folder_for_virtual_raster = str(BASE_PATH / 'merged_virtual' / f\"merged{slot}.vrt\")\n", @@ -393,18 +257,127 @@ " gdal.Translate(folder_for_merged_tifs,folder_for_virtual_raster)" ] }, + { + "cell_type": "code", + "execution_count": 11, + "id": "848dc773-70d6-4ae6-b05c-d6ebfb41624d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Monthly time windows:\n", + "\n", + "2024-02-28\n", + "2024-02-29\n", + "2024-03-01\n", + "2024-03-02\n", + "2024-03-03\n", + "2024-03-04\n", + "2024-03-05\n" + ] + } + ], + "source": [ + "days_needed = int(os.environ.get(\"DAYS\", days))\n", + "date_str = os.environ.get(\"DATE\")\n", + "if date_str:\n", + " # Parse de datumstring naar een datetime.date object\n", + " end = datetime.datetime.strptime(date_str, \"%Y-%m-%d\").date()\n", + "else:\n", + " # Gebruik de huidige datum als fallback\n", + " end = datetime.date.today() \n", + "\n", + "start = end - datetime.timedelta(days=days_needed - 1)\n", + "\n", + "slots = [(start + datetime.timedelta(days=i)).strftime('%Y-%m-%d') for i in range(days_needed)]\n", + "\n", + "print('Monthly time windows:\\n')\n", + "if len(slots) > 10:\n", + " for slot in slots[:3]:\n", + " print(slot)\n", + " print(\"...\")\n", + " for slot in slots[-3:]:\n", + " print(slot)\n", + "else:\n", + " for slot in slots:\n", + " print(slot)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "f8ea846f-783b-4460-a951-7b522273555f", + "metadata": {}, + "source": [ + "#### Download images\n" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "d5830b6e-da0a-416f-867e-cbca4bd434f5", + "id": "b9efd953-7dd9-4e10-aefe-b8215a166796", "metadata": {}, "outputs": [], "source": [ + "if project == 'chemba':\n", + " chosen_area = [[34.946, -17.3516, 34.938, -17.2917], [34.883, -17.3516, 34.938, -17.2917]]\n", + "\n", + "if project == 'chemba_test_8b':\n", + " chosen_area = [[34.946, -17.3516, 34.938, -17.2917], [34.883, -17.3516, 34.938, -17.2917]]\n", + "\n", + "if project == 'xinavane':\n", + " chosen_area = [[32.6790, -25.0333, 32.7453, -25.0235], [32.6213, -25.0647, 32.6284, -25.0570]]" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "6c02d7de-cddf-4fc3-8d23-8431415d07b8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Image downloaded for 2024-02-28\n", + " Image downloaded for 2024-02-28\n", + " Image downloaded for 2024-02-29\n", + " Image downloaded for 2024-02-29\n", + " Image downloaded for 2024-03-01\n", + " Image downloaded for 2024-03-01\n", + " Image downloaded for 2024-03-02\n", + " Image downloaded for 2024-03-02\n" + ] + }, + { + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "Cell \u001b[1;32mIn [12], line 10\u001b[0m\n\u001b[0;32m 8\u001b[0m bbox \u001b[38;5;241m=\u001b[39m BBox(bbox\u001b[38;5;241m=\u001b[39marea, crs\u001b[38;5;241m=\u001b[39mCRS\u001b[38;5;241m.\u001b[39mWGS84)\n\u001b[0;32m 9\u001b[0m size \u001b[38;5;241m=\u001b[39m bbox_to_dimensions(bbox, resolution\u001b[38;5;241m=\u001b[39mresolution)\n\u001b[1;32m---> 10\u001b[0m \u001b[43mdownload_function\u001b[49m\u001b[43m(\u001b[49m\u001b[43mslot\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbbox\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msize\u001b[49m\u001b[43m)\u001b[49m\n", + "Cell \u001b[1;32mIn [10], line 67\u001b[0m, in \u001b[0;36mdownload_function\u001b[1;34m(slot, bbox, size)\u001b[0m\n\u001b[0;32m 64\u001b[0m list_of_requests \u001b[38;5;241m=\u001b[39m [request\u001b[38;5;241m.\u001b[39mdownload_list[\u001b[38;5;241m0\u001b[39m] \u001b[38;5;28;01mfor\u001b[39;00m request \u001b[38;5;129;01min\u001b[39;00m list_of_requests]\n\u001b[0;32m 66\u001b[0m \u001b[38;5;66;03m# download data chemba west with multiple threads\u001b[39;00m\n\u001b[1;32m---> 67\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[43mSentinelHubDownloadClient\u001b[49m\u001b[43m(\u001b[49m\u001b[43mconfig\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mconfig\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdownload\u001b[49m\u001b[43m(\u001b[49m\u001b[43mlist_of_requests\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_threads\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m15\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[0;32m 68\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m Image downloaded for \u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;241m+\u001b[39mslot)\n\u001b[0;32m 70\u001b[0m time\u001b[38;5;241m.\u001b[39msleep(\u001b[38;5;241m.5\u001b[39m)\n", + "File \u001b[1;32m~\\anaconda3\\lib\\site-packages\\sentinelhub\\download\\sentinelhub_client.py:51\u001b[0m, in \u001b[0;36mSentinelHubDownloadClient.download\u001b[1;34m(self, *args, **kwargs)\u001b[0m\n\u001b[0;32m 49\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlock \u001b[38;5;241m=\u001b[39m Lock()\n\u001b[0;32m 50\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m---> 51\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdownload(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m 52\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[0;32m 53\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlock \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n", + "File \u001b[1;32m~\\anaconda3\\lib\\site-packages\\sentinelhub\\download\\client.py:76\u001b[0m, in \u001b[0;36mDownloadClient.download\u001b[1;34m(self, download_requests, max_threads, decode_data, show_progress)\u001b[0m\n\u001b[0;32m 72\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m ThreadPoolExecutor(max_workers\u001b[38;5;241m=\u001b[39mmax_threads) \u001b[38;5;28;01mas\u001b[39;00m executor:\n\u001b[0;32m 73\u001b[0m download_list \u001b[38;5;241m=\u001b[39m [\n\u001b[0;32m 74\u001b[0m executor\u001b[38;5;241m.\u001b[39msubmit(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_single_download, request, decode_data) \u001b[38;5;28;01mfor\u001b[39;00m request \u001b[38;5;129;01min\u001b[39;00m download_requests\n\u001b[0;32m 75\u001b[0m ]\n\u001b[1;32m---> 76\u001b[0m future_order \u001b[38;5;241m=\u001b[39m {future: i \u001b[38;5;28;01mfor\u001b[39;00m i, future \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(download_list)}\n\u001b[0;32m 78\u001b[0m data_list \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28;01mNone\u001b[39;00m] \u001b[38;5;241m*\u001b[39m \u001b[38;5;28mlen\u001b[39m(download_list)\n\u001b[0;32m 79\u001b[0m \u001b[38;5;66;03m# Consider using tqdm.contrib.concurrent.thread_map in the future\u001b[39;00m\n", + "File \u001b[1;32m~\\anaconda3\\lib\\concurrent\\futures\\_base.py:637\u001b[0m, in \u001b[0;36mExecutor.__exit__\u001b[1;34m(self, exc_type, exc_val, exc_tb)\u001b[0m\n\u001b[0;32m 636\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__exit__\u001b[39m(\u001b[38;5;28mself\u001b[39m, exc_type, exc_val, exc_tb):\n\u001b[1;32m--> 637\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mshutdown\u001b[49m\u001b[43m(\u001b[49m\u001b[43mwait\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[0;32m 638\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m\n", + "File \u001b[1;32m~\\anaconda3\\lib\\concurrent\\futures\\thread.py:235\u001b[0m, in \u001b[0;36mThreadPoolExecutor.shutdown\u001b[1;34m(self, wait, cancel_futures)\u001b[0m\n\u001b[0;32m 233\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m wait:\n\u001b[0;32m 234\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m t \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_threads:\n\u001b[1;32m--> 235\u001b[0m \u001b[43mt\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mjoin\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32m~\\anaconda3\\lib\\threading.py:1060\u001b[0m, in \u001b[0;36mThread.join\u001b[1;34m(self, timeout)\u001b[0m\n\u001b[0;32m 1057\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcannot join current thread\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 1059\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m timeout \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m-> 1060\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_wait_for_tstate_lock\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 1061\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 1062\u001b[0m \u001b[38;5;66;03m# the behavior of a negative timeout isn't documented, but\u001b[39;00m\n\u001b[0;32m 1063\u001b[0m \u001b[38;5;66;03m# historically .join(timeout=x) for x<0 has acted as if timeout=0\u001b[39;00m\n\u001b[0;32m 1064\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_wait_for_tstate_lock(timeout\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mmax\u001b[39m(timeout, \u001b[38;5;241m0\u001b[39m))\n", + "File \u001b[1;32m~\\anaconda3\\lib\\threading.py:1080\u001b[0m, in \u001b[0;36mThread._wait_for_tstate_lock\u001b[1;34m(self, block, timeout)\u001b[0m\n\u001b[0;32m 1077\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[0;32m 1079\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m-> 1080\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43mlock\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43macquire\u001b[49m\u001b[43m(\u001b[49m\u001b[43mblock\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m:\n\u001b[0;32m 1081\u001b[0m lock\u001b[38;5;241m.\u001b[39mrelease()\n\u001b[0;32m 1082\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_stop()\n", + "\u001b[1;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], + "source": [ + "# Load areas outside the loop if they remain constant\n", + "bbox_area = json.dumps(chosen_area)\n", + "areas = json.loads(os.getenv('BBOX', bbox_area))\n", + "resolution = 3\n", + "\n", "for slot in slots:\n", - " #areas = [[34.8830, -17.3516, 34.9380, -17.2917], [34.9460, -17.3500, 34.9839, -17.3110]]\n", - " areas = json.loads(os.getenv('BBOX','[[34.946,-17.3516,34.938,-17.2917],[34.883,-17.3516,34.938,-17.2917]]')) \n", " for area in areas:\n", - " resolution = 3\n", " bbox = BBox(bbox=area, crs=CRS.WGS84)\n", " size = bbox_to_dimensions(bbox, resolution=resolution)\n", " download_function(slot, bbox, size)" @@ -412,541 +385,64 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "68db3c15-6f94-432e-b315-c329e4251b21", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-03/d402cfafa9a6ae7d7d658652bf0efc8b/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-03/34e48c2310b8444431f14215de30f9aa/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-04/0b26641b3208b047de35046a36046b4f/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-04/47dd2f1d76f625645d1c166e41b7891d/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-03/d402cfafa9a6ae7d7d658652bf0efc8b/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-03/34e48c2310b8444431f14215de30f9aa/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-03/d402cfafa9a6ae7d7d658652bf0efc8b/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-03/34e48c2310b8444431f14215de30f9aa/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-03/d402cfafa9a6ae7d7d658652bf0efc8b/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-03/34e48c2310b8444431f14215de30f9aa/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-04/0b26641b3208b047de35046a36046b4f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-04/47dd2f1d76f625645d1c166e41b7891d/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-04/0b26641b3208b047de35046a36046b4f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-04/47dd2f1d76f625645d1c166e41b7891d/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-04/0b26641b3208b047de35046a36046b4f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-04/47dd2f1d76f625645d1c166e41b7891d/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-05/9fca53a2fef9850568d21520dcb054ed/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-05/d000a9edf2ebc152621dd43113999b6e/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-06/2cb2971fef19fb55e127e60ec59b400f/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-06/d0e73ee30531ef5f740e7a020924f6e4/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-07/1fb5a037f5c19e7ac6ebcd9ac0c011d3/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-07/656e1f90cbeaebdd0beb773ea9c632b5/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-05/9fca53a2fef9850568d21520dcb054ed/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-05/d000a9edf2ebc152621dd43113999b6e/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-05/9fca53a2fef9850568d21520dcb054ed/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-05/d000a9edf2ebc152621dd43113999b6e/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-05/9fca53a2fef9850568d21520dcb054ed/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-05/d000a9edf2ebc152621dd43113999b6e/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-06/2cb2971fef19fb55e127e60ec59b400f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-06/d0e73ee30531ef5f740e7a020924f6e4/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-06/2cb2971fef19fb55e127e60ec59b400f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-06/d0e73ee30531ef5f740e7a020924f6e4/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-06/2cb2971fef19fb55e127e60ec59b400f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-06/d0e73ee30531ef5f740e7a020924f6e4/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-07/1fb5a037f5c19e7ac6ebcd9ac0c011d3/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-07/656e1f90cbeaebdd0beb773ea9c632b5/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-07/1fb5a037f5c19e7ac6ebcd9ac0c011d3/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-07/656e1f90cbeaebdd0beb773ea9c632b5/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-07/1fb5a037f5c19e7ac6ebcd9ac0c011d3/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-07/656e1f90cbeaebdd0beb773ea9c632b5/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-08/58d1f1e00ac595ba309e35e1fc348d46/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-08/78af404d33e4a7a8a7c63dd7266e9940/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-09/074a64ef0bc1a643b564f223a0406de6/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-09/b5f8af8311ec9839c6837bd702ff704f/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-10/379dbdd27cb513603fb5d48744540e3a/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-10/6a3cb421bfe72d6f1e83e0a4d6a35b74/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-08/58d1f1e00ac595ba309e35e1fc348d46/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-08/78af404d33e4a7a8a7c63dd7266e9940/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-08/58d1f1e00ac595ba309e35e1fc348d46/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-08/78af404d33e4a7a8a7c63dd7266e9940/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-08/58d1f1e00ac595ba309e35e1fc348d46/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-08/78af404d33e4a7a8a7c63dd7266e9940/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-09/074a64ef0bc1a643b564f223a0406de6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-09/b5f8af8311ec9839c6837bd702ff704f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-09/074a64ef0bc1a643b564f223a0406de6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-09/b5f8af8311ec9839c6837bd702ff704f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-09/074a64ef0bc1a643b564f223a0406de6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-09/b5f8af8311ec9839c6837bd702ff704f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-10/379dbdd27cb513603fb5d48744540e3a/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-10/6a3cb421bfe72d6f1e83e0a4d6a35b74/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-10/379dbdd27cb513603fb5d48744540e3a/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-10/6a3cb421bfe72d6f1e83e0a4d6a35b74/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-10/379dbdd27cb513603fb5d48744540e3a/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-10/6a3cb421bfe72d6f1e83e0a4d6a35b74/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-11/963afad1af0c7114e9d5cc8fc3d4adb3/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-11/d6255d2b8f966beece2ee91f86eb1376/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-12/061e7c0b7299137876fb4b0588b5245c/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-12/6df3e48f4e103d1f984e6f331bd20d36/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-13/2ed2af1506c64726d923cd552489298f/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-13/ceeb939ee7bc791dbcacadd68ae43963/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-11/963afad1af0c7114e9d5cc8fc3d4adb3/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-11/d6255d2b8f966beece2ee91f86eb1376/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-11/963afad1af0c7114e9d5cc8fc3d4adb3/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-11/d6255d2b8f966beece2ee91f86eb1376/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-11/963afad1af0c7114e9d5cc8fc3d4adb3/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-11/d6255d2b8f966beece2ee91f86eb1376/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-12/061e7c0b7299137876fb4b0588b5245c/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-12/6df3e48f4e103d1f984e6f331bd20d36/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-12/061e7c0b7299137876fb4b0588b5245c/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-12/6df3e48f4e103d1f984e6f331bd20d36/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-12/061e7c0b7299137876fb4b0588b5245c/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-12/6df3e48f4e103d1f984e6f331bd20d36/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-13/2ed2af1506c64726d923cd552489298f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-13/ceeb939ee7bc791dbcacadd68ae43963/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-13/2ed2af1506c64726d923cd552489298f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-13/ceeb939ee7bc791dbcacadd68ae43963/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-13/2ed2af1506c64726d923cd552489298f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-13/ceeb939ee7bc791dbcacadd68ae43963/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-14/05fab2afd14dde5956b68064eabb5584/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-14/83ab15d2ef5ff12ab974f0a49bdbde87/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-15/83e21f5ef0afaf44f7585092c2130a64/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-15/25bca4ee6801370a109efd9928b6bad2/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-16/2e939b34baa944c9caeb0bb209eaa3ba/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-16/f5a9ca774ee072d83ec449b47fb11398/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-14/05fab2afd14dde5956b68064eabb5584/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-14/83ab15d2ef5ff12ab974f0a49bdbde87/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-14/05fab2afd14dde5956b68064eabb5584/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-14/83ab15d2ef5ff12ab974f0a49bdbde87/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-14/05fab2afd14dde5956b68064eabb5584/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-14/83ab15d2ef5ff12ab974f0a49bdbde87/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-15/83e21f5ef0afaf44f7585092c2130a64/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-15/25bca4ee6801370a109efd9928b6bad2/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-15/83e21f5ef0afaf44f7585092c2130a64/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-15/25bca4ee6801370a109efd9928b6bad2/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-15/83e21f5ef0afaf44f7585092c2130a64/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-15/25bca4ee6801370a109efd9928b6bad2/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-16/2e939b34baa944c9caeb0bb209eaa3ba/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-16/f5a9ca774ee072d83ec449b47fb11398/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-16/2e939b34baa944c9caeb0bb209eaa3ba/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-16/f5a9ca774ee072d83ec449b47fb11398/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-16/2e939b34baa944c9caeb0bb209eaa3ba/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-16/f5a9ca774ee072d83ec449b47fb11398/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-17/6002c8b4be4344e1a427993a1c8f07ee/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-17/6659119a965962848cab25ce29d2229f/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-18/6320223e658e8d5762cd3369fbb49395/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-18/0fbdec0a57e4d0b7d4f4f4e375559007/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-19/09087a431016ff6e49b7fafb76b5a137/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-19/77ebfbc4b72521a8ee8ed0644694a4d8/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-17/6002c8b4be4344e1a427993a1c8f07ee/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-17/6659119a965962848cab25ce29d2229f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-17/6002c8b4be4344e1a427993a1c8f07ee/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-17/6659119a965962848cab25ce29d2229f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-17/6002c8b4be4344e1a427993a1c8f07ee/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-17/6659119a965962848cab25ce29d2229f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-18/6320223e658e8d5762cd3369fbb49395/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-18/0fbdec0a57e4d0b7d4f4f4e375559007/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-18/6320223e658e8d5762cd3369fbb49395/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-18/0fbdec0a57e4d0b7d4f4f4e375559007/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-18/6320223e658e8d5762cd3369fbb49395/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-18/0fbdec0a57e4d0b7d4f4f4e375559007/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-19/09087a431016ff6e49b7fafb76b5a137/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-19/77ebfbc4b72521a8ee8ed0644694a4d8/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-19/09087a431016ff6e49b7fafb76b5a137/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-19/77ebfbc4b72521a8ee8ed0644694a4d8/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-19/09087a431016ff6e49b7fafb76b5a137/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-19/77ebfbc4b72521a8ee8ed0644694a4d8/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-20/de49a1ae7fc7cce6bbb51307b51421a7/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-20/9ea16bc23f981f09a6a07960d25ee917/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-21/60f07bbbd46a263e99acfd16afdd90e7/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-21/c703f5c937fe7d31c01e5dc0e1f1b3c6/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-22/4cc6c6c928fbe9261b235a1a2bd82988/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-22/9a6945737142920a66b01d9243a7dbb0/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-20/de49a1ae7fc7cce6bbb51307b51421a7/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-20/9ea16bc23f981f09a6a07960d25ee917/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-20/de49a1ae7fc7cce6bbb51307b51421a7/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-20/9ea16bc23f981f09a6a07960d25ee917/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-20/de49a1ae7fc7cce6bbb51307b51421a7/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-20/9ea16bc23f981f09a6a07960d25ee917/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-21/60f07bbbd46a263e99acfd16afdd90e7/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-21/c703f5c937fe7d31c01e5dc0e1f1b3c6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-21/60f07bbbd46a263e99acfd16afdd90e7/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-21/c703f5c937fe7d31c01e5dc0e1f1b3c6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-21/60f07bbbd46a263e99acfd16afdd90e7/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-21/c703f5c937fe7d31c01e5dc0e1f1b3c6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-22/4cc6c6c928fbe9261b235a1a2bd82988/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-22/9a6945737142920a66b01d9243a7dbb0/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-22/4cc6c6c928fbe9261b235a1a2bd82988/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-22/9a6945737142920a66b01d9243a7dbb0/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-22/4cc6c6c928fbe9261b235a1a2bd82988/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-22/9a6945737142920a66b01d9243a7dbb0/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-23/fa839ee60099fd816e3735b4bc2b8da9/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-23/f4c483ff844754609c15946f39062af0/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-23/fa839ee60099fd816e3735b4bc2b8da9/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-23/f4c483ff844754609c15946f39062af0/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-23/fa839ee60099fd816e3735b4bc2b8da9/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-23/f4c483ff844754609c15946f39062af0/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-24/948621c2612a3623fe0a8c6f2e232d4c/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-24/5d91bc78a218827aa0c4af8d2b68432f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-24/948621c2612a3623fe0a8c6f2e232d4c/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-24/5d91bc78a218827aa0c4af8d2b68432f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-24/948621c2612a3623fe0a8c6f2e232d4c/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-24/5d91bc78a218827aa0c4af8d2b68432f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-23/fa839ee60099fd816e3735b4bc2b8da9/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-23/f4c483ff844754609c15946f39062af0/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-24/948621c2612a3623fe0a8c6f2e232d4c/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-24/5d91bc78a218827aa0c4af8d2b68432f/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-25/09034667d9d66ad95bb45114be61c294/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-25/640ada1c04508b95d3d7ca885170dcd2/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-25/09034667d9d66ad95bb45114be61c294/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-25/640ada1c04508b95d3d7ca885170dcd2/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-25/09034667d9d66ad95bb45114be61c294/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-25/640ada1c04508b95d3d7ca885170dcd2/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-25/09034667d9d66ad95bb45114be61c294/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-25/640ada1c04508b95d3d7ca885170dcd2/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-26/b1aa534ff4b4f760afdd121039523470/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-26/812fa312f85f5645979751acbfdb4137/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-26/b1aa534ff4b4f760afdd121039523470/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-26/812fa312f85f5645979751acbfdb4137/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-26/b1aa534ff4b4f760afdd121039523470/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-26/812fa312f85f5645979751acbfdb4137/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-27/d4cbaea4023bc70fa32512e73c74130a/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-27/0ca3d8bf2c9b33a927b115f207331be5/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-27/d4cbaea4023bc70fa32512e73c74130a/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-27/0ca3d8bf2c9b33a927b115f207331be5/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-27/d4cbaea4023bc70fa32512e73c74130a/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-26/b1aa534ff4b4f760afdd121039523470/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-26/812fa312f85f5645979751acbfdb4137/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-27/d4cbaea4023bc70fa32512e73c74130a/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-27/0ca3d8bf2c9b33a927b115f207331be5/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-02-28/1e84c7daad84245d60c0117309786237/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-28/0d2f1410b8fa5255b6098413e05b377f/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-27/0ca3d8bf2c9b33a927b115f207331be5/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-28/1e84c7daad84245d60c0117309786237/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-28/0d2f1410b8fa5255b6098413e05b377f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-28/1e84c7daad84245d60c0117309786237/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-28/0d2f1410b8fa5255b6098413e05b377f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-28/1e84c7daad84245d60c0117309786237/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-28/0d2f1410b8fa5255b6098413e05b377f/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-29/08baa805ee5178e3b20ff5f04f1481c6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-29/d0d870079653f92c754e85f897b7f7b6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-29/08baa805ee5178e3b20ff5f04f1481c6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-29/d0d870079653f92c754e85f897b7f7b6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-29/08baa805ee5178e3b20ff5f04f1481c6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['../laravel_app/storage/app/chemba/single_images/2024-02-29/08baa805ee5178e3b20ff5f04f1481c6/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-02-29/d0d870079653f92c754e85f897b7f7b6/response.tiff']\n", - "['../laravel_app/storage/app/chemba/single_images/2024-03-01/64455452d2ff2d41bae9e25445244dec/response.tiff', '../laravel_app/storage/app/chemba/single_images/2024-03-01/cf97b72e82132dca014a764f85f3ea05/response.tiff']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-02-29/d0d870079653f92c754e85f897b7f7b6/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-03-01/64455452d2ff2d41bae9e25445244dec/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-03-01/cf97b72e82132dca014a764f85f3ea05/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-03-01/64455452d2ff2d41bae9e25445244dec/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-03-01/cf97b72e82132dca014a764f85f3ea05/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-03-01/64455452d2ff2d41bae9e25445244dec/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: ../laravel_app/storage/app/chemba/single_images/2024-03-01/cf97b72e82132dca014a764f85f3ea05/response.tiff: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n", - "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.\n" - ] - } - ], + "outputs": [], "source": [ "for slot in slots:\n", " merge_files(slot)" ] }, + { + "cell_type": "markdown", + "id": "4274d8e7-1ea3-46db-9528-069ede0b2132", + "metadata": { + "tags": [] + }, + "source": [ + "#### Delete intermediate files\n" + ] + }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "id": "cb3fa856-a550-4899-844a-e69209bba3ad", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Emptied folder: ../laravel_app/storage/app/chemba/merged_virtual\n", - "Emptied folder: ../laravel_app/storage/app/chemba/single_images\n" - ] - } - ], + "outputs": [], "source": [ - "\n", - "import shutil\n", - " \n", "# List of folder names\n", "\n", "folders_to_empty = [BASE_PATH / 'merged_virtual', BASE_PATH_SINGLE_IMAGES]\n", " \n", "# Function to empty folders\n", "\n", - "def empty_folders(folders):\n", - "\n", + "# Function to empty folders\n", + "def empty_folders(folders, run=True):\n", + " if not run:\n", + " print(\"Skipping empty_folders function.\")\n", + " return\n", + " \n", " for folder in folders:\n", - "\n", " try:\n", - "\n", " for filename in os.listdir(folder):\n", - "\n", " file_path = os.path.join(folder, filename)\n", - "\n", " try:\n", - "\n", " if os.path.isfile(file_path):\n", - "\n", " os.unlink(file_path)\n", - "\n", " elif os.path.isdir(file_path):\n", - "\n", " shutil.rmtree(file_path)\n", - "\n", " except Exception as e:\n", - "\n", " print(f\"Error: {e}\")\n", - "\n", " print(f\"Emptied folder: {folder}\")\n", - "\n", " except OSError as e:\n", - "\n", " print(f\"Error: {e}\")\n", - " \n", - "# Call the function to empty folders\n", "\n", - "empty_folders(folders_to_empty)" + "# Call the function to empty folders only if the 'run' parameter is set to True\n", + "empty_folders(folders_to_empty, run=empty_folder_question)\n" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d7989454-7634-4116-ad8e-82ca3cbefc0f", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -965,7 +461,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.11.4" } }, "nbformat": 4, diff --git a/python_app/planet_download_8band.ipynb b/python_app/planet_download_8band.ipynb new file mode 100644 index 0000000..7450286 --- /dev/null +++ b/python_app/planet_download_8band.ipynb @@ -0,0 +1,506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "0c18e312-8421-47d7-84f9-ed7d5e47e7ee", + "metadata": { + "tags": [] + }, + "source": [ + "#### Load packages and connect to SentinelHub" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "b7ca7102-5fd9-481f-90cd-3ba60e288649", + "metadata": {}, + "outputs": [], + "source": [ + "# $ pip install sentinelhub\n", + "# pip install gdal\n", + "\n", + "import os\n", + "import json\n", + "import datetime\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "from pathlib import Path\n", + "from osgeo import gdal\n", + "\n", + "from sentinelhub import MimeType, CRS, BBox, SentinelHubRequest, SentinelHubDownloadClient, \\\n", + " DataCollection, bbox_to_dimensions, DownloadRequest, SHConfig, BBoxSplitter, read_data\n", + "\n", + "config = SHConfig()\n", + "\n", + "import time\n", + "import shutil" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "330c967c-2742-4a7a-9a61-28bfdaf8eeca", + "metadata": {}, + "outputs": [], + "source": [ + "#pip install pipreqs" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "49f8496a-a267-4b74-9500-a168e031ed68", + "metadata": {}, + "outputs": [], + "source": [ + "#import pipreqs\n", + "#pipreqs Resilience BV/4002 CMD App - General/4002 CMD Team/4002 TechnicalData/04 WP2 technical/python/Chemba_download.ipynb" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "5491a840-779c-4f0c-8164-c3de738b3298", + "metadata": {}, + "outputs": [], + "source": [ + "config.sh_client_id = '1a72d811-4f0e-4447-8282-df09608cff44'\n", + "config.sh_client_secret = 'FcBlRL29i9ZmTzhmKTv1etSMFs5PxSos'" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "eb1fb662-0e25-4ca9-8317-c6953290842b", + "metadata": {}, + "outputs": [], + "source": [ + "collection_id = '4e56d0cb-c402-40ff-97bb-c2b9e6bfcf2a'\n", + "byoc = DataCollection.define_byoc(\n", + " collection_id,\n", + " name='planet_data_8b',\n", + " is_timeless=True)" + ] + }, + { + "cell_type": "markdown", + "id": "6adb603d-8182-48c6-a051-869e16ee7bba", + "metadata": { + "tags": [] + }, + "source": [ + "#### Set some variables\n", + "The only place anything might need to be changed." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "060396e0-e5ee-4b54-b211-5d8bfcba167f", + "metadata": {}, + "outputs": [], + "source": [ + "#project = 'chemba' #or xinavane or chemba_test_8b\n", + "#project = 'xinavane' #or xinavane or chemba_test_8b\n", + "project = 'chemba_test_8b' #or xinavane or chemba_test_8b\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "c9f79e81-dff8-4109-8d26-6c423142dcf2", + "metadata": {}, + "outputs": [], + "source": [ + "# Adjust the number of days needed\n", + "days = 7 #change back to 28 which is the default. 3 years is 1095 days." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "e18bdf8f-be4b-44ab-baaa-de5de60d92cb", + "metadata": {}, + "outputs": [], + "source": [ + "#delete all the satellite outputs -> then True\n", + "empty_folder_question = False" + ] + }, + { + "cell_type": "markdown", + "id": "81bbb513-0bd2-4277-83e8-6f94051ce70b", + "metadata": { + "tags": [] + }, + "source": [ + "#### Define functions\n", + "After this block, no manual changes to parameters are required. \n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "3f7c8e04-4569-457b-b39d-283582c4ba36", + "metadata": {}, + "outputs": [], + "source": [ + "BASE_PATH = Path('../laravel_app/storage/app') / os.getenv('PROJECT_DIR', project) \n", + "BASE_PATH_SINGLE_IMAGES = Path(BASE_PATH / 'single_images')\n", + "folder_for_merged_tifs = str(BASE_PATH / 'merged_tif')\n", + "folder_for_virtual_raster = str(BASE_PATH / 'merged_virtual')\n", + " \n", + "# Check if the folders exist, and if not, create them\n", + "if not os.path.exists(BASE_PATH_SINGLE_IMAGES):\n", + " os.makedirs(BASE_PATH_SINGLE_IMAGES)\n", + " \n", + "if not os.path.exists(folder_for_merged_tifs):\n", + " os.makedirs(folder_for_merged_tifs)\n", + "\n", + "if not os.path.exists(folder_for_virtual_raster):\n", + " os.makedirs(folder_for_virtual_raster)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "244b5752-4f02-4347-9278-f6a0a46b88f4", + "metadata": {}, + "outputs": [], + "source": [ + "evalscript_true_color = \"\"\"\n", + " //VERSION=3\n", + "\n", + " function setup() {\n", + " return {\n", + " input: [{\n", + " bands: \n", + " [\"CoastalBlue\", \"Blue\", \"Green\", \"GreenI\", \"Yellow\", \"Red\", \n", + " \"RedEdge\", \"NIR\", \"UDM2_Clear\"]\n", + " }],\n", + " output: {\n", + " bands: 9 \n", + " //sampleType: \"FLOAT32\"\n", + " }\n", + " };\n", + " }\n", + "\n", + " function evaluatePixel(sample) {\n", + " var scaledBlue = [2.5 * sample.Blue / 10000];\n", + " var scaledGreen = [2.5 * sample.Green / 10000];\n", + " var scaledRed = [2.5 * sample.Red / 10000];\n", + " var scaledCoastalBlue = [2.5 * sample.CoastalBlue / 10000];\n", + " var scaledGreenI = [2.5 * sample.GreenI / 10000];\n", + " var scaledYellow = [2.5 * sample.Yellow / 10000];\n", + " var scaledRedEdge = [2.5 * sample.RedEdge / 10000];\n", + " var scaledNIR = [2.5 * sample.NIR / 10000];\n", + " var UDM2_Clear = UDM2_Clear\n", + " \n", + " // Output the scaled bands\n", + " \n", + " // if (sample.UDM2_Clear != 0) { \n", + " return [\n", + " scaledCoastalBlue,\n", + " scaledBlue,\n", + " scaledGreen,\n", + " scaledGreenI,\n", + " scaledYellow,\n", + " scaledRed, \n", + " scaledRedEdge,\n", + " scaledNIR,\n", + " UDM2_Clear\n", + " ]\n", + " // } else {\n", + " // return [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]}\n", + " \n", + " } \n", + "\n", + "\"\"\"\n", + "\n", + "def get_true_color_request_day(time_interval, bbox, size):\n", + " return SentinelHubRequest(\n", + " evalscript=evalscript_true_color,\n", + " input_data=[\n", + " SentinelHubRequest.input_data(\n", + " data_collection=DataCollection.planet_data_8b,\n", + " time_interval=(time_interval, time_interval)\n", + " )\n", + " ],\n", + " responses=[\n", + " SentinelHubRequest.output_response('default', MimeType.TIFF)\n", + " ],\n", + " bbox=bbox,\n", + " size=size,\n", + " config=config,\n", + " data_folder=str(BASE_PATH_SINGLE_IMAGES / time_interval),\n", + "\n", + " )\n", + "\n", + "def download_function(slot, bbox, size):\n", + " # create a list of requests\n", + " list_of_requests = [get_true_color_request_day(slot, bbox, size)]\n", + " list_of_requests = [request.download_list[0] for request in list_of_requests]\n", + "\n", + " # download data chemba west with multiple threads\n", + " data = SentinelHubDownloadClient(config=config).download(list_of_requests, max_threads=15)\n", + " print(f' Image downloaded for ' +slot)\n", + " \n", + " time.sleep(.1)\n", + "\n", + "def merge_files(slot):\n", + " \n", + " # List the downloaded Tiffs in the different subfolders with pathlib (native library)\n", + " file_list = [f\"{x}/response.tiff\" for x in Path(BASE_PATH_SINGLE_IMAGES / slot).iterdir()]\n", + " \n", + " #print(file_list)\n", + "\n", + " folder_for_merged_tifs = str(BASE_PATH / 'merged_tif' / f\"{slot}.tif\")\n", + " folder_for_virtual_raster = str(BASE_PATH / 'merged_virtual' / f\"merged{slot}.vrt\")\n", + "\n", + " # Create a virtual raster\n", + " vrt_all = gdal.BuildVRT(folder_for_virtual_raster, file_list)\n", + " vrt_all = gdal.BuildVRT(folder_for_virtual_raster, file_list)\n", + "\n", + " # Convert to JPEG\n", + " gdal.Translate(folder_for_merged_tifs,folder_for_virtual_raster)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "848dc773-70d6-4ae6-b05c-d6ebfb41624d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Monthly time windows:\n", + "\n", + "2024-03-19\n", + "2024-03-20\n", + "2024-03-21\n", + "2024-03-22\n", + "2024-03-23\n", + "2024-03-24\n", + "2024-03-25\n" + ] + } + ], + "source": [ + "days_needed = int(os.environ.get(\"DAYS\", days))\n", + "date_str = os.environ.get(\"DATE\")\n", + "if date_str:\n", + " # Parse de datumstring naar een datetime.date object\n", + " end = datetime.datetime.strptime(date_str, \"%Y-%m-%d\").date()\n", + "else:\n", + " # Gebruik de huidige datum als fallback\n", + " end = datetime.date.today() \n", + "\n", + "start = end - datetime.timedelta(days=days_needed - 1)\n", + "\n", + "slots = [(start + datetime.timedelta(days=i)).strftime('%Y-%m-%d') for i in range(days_needed)]\n", + "\n", + "print('Monthly time windows:\\n')\n", + "if len(slots) > 10:\n", + " for slot in slots[:3]:\n", + " print(slot)\n", + " print(\"...\")\n", + " for slot in slots[-3:]:\n", + " print(slot)\n", + "else:\n", + " for slot in slots:\n", + " print(slot)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "93c715f7-4f7e-428e-bbb9-53a2d8f6e2c8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Monthly time windows:\n", + "\n", + "2024-03-19\n" + ] + } + ], + "source": [ + "end = datetime.datetime(2024, 3, 19)\n", + "start = end \n", + "days_needed =1\n", + "slots = [(start + datetime.timedelta(days=i)).strftime('%Y-%m-%d') for i in range(days_needed)]\n", + "\n", + "print('Monthly time windows:\\n')\n", + "if len(slots) > 10:\n", + " for slot in slots[:3]:\n", + " print(slot)\n", + " print(\"...\")\n", + " for slot in slots[-3:]:\n", + " print(slot)\n", + "else:\n", + " for slot in slots:\n", + " print(slot)" + ] + }, + { + "cell_type": "markdown", + "id": "f8ea846f-783b-4460-a951-7b522273555f", + "metadata": {}, + "source": [ + "#### Download images\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "1fb5dc6c-de83-4fb2-b3f7-ee9e7060a80d", + "metadata": {}, + "outputs": [], + "source": [ + "if project == 'chemba':\n", + " chosen_area = [[34.946, -17.3516, 34.938, -17.2917], [34.883, -17.3516, 34.938, -17.2917]]\n", + "\n", + "if project == 'chemba_test_8b':\n", + " chosen_area = [[34.946, -17.3516, 34.938, -17.2917], [34.883, -17.3516, 34.938, -17.2917]]\n", + "\n", + "if project == 'xinavane':\n", + " chosen_area = [[32.6790, -25.0333, 32.7453, -25.0235], [32.6213, -25.0647, 32.6284, -25.0570]]" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "6c02d7de-cddf-4fc3-8d23-8431415d07b8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Image downloaded for 2024-03-19\n", + " Image downloaded for 2024-03-19\n" + ] + } + ], + "source": [ + "# Load areas outside the loop if they remain constant\n", + "bbox_area = json.dumps(chosen_area)\n", + "areas = json.loads(os.getenv('BBOX', bbox_area))\n", + "resolution = 3\n", + "\n", + "for slot in slots:\n", + " for area in areas:\n", + " bbox = BBox(bbox=area, crs=CRS.WGS84)\n", + " size = bbox_to_dimensions(bbox, resolution=resolution)\n", + " download_function(slot, bbox, size)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "68db3c15-6f94-432e-b315-c329e4251b21", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Merging complete\n" + ] + } + ], + "source": [ + "for slot in slots:\n", + " merge_files(slot)\n", + "\n", + "print('Merging complete')" + ] + }, + { + "cell_type": "markdown", + "id": "4274d8e7-1ea3-46db-9528-069ede0b2132", + "metadata": { + "tags": [] + }, + "source": [ + "#### Delete intermediate files\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cb3fa856-a550-4899-844a-e69209bba3ad", + "metadata": {}, + "outputs": [], + "source": [ + "# List of folder names\n", + "\n", + "folders_to_empty = [BASE_PATH / 'merged_virtual', BASE_PATH_SINGLE_IMAGES]\n", + " \n", + "# Function to empty folders\n", + "\n", + "# Function to empty folders\n", + "def empty_folders(folders, run=True):\n", + " if not run:\n", + " print(\"Skipping empty_folders function.\")\n", + " return\n", + " \n", + " for folder in folders:\n", + " try:\n", + " for filename in os.listdir(folder):\n", + " file_path = os.path.join(folder, filename)\n", + " try:\n", + " if os.path.isfile(file_path):\n", + " os.unlink(file_path)\n", + " elif os.path.isdir(file_path):\n", + " shutil.rmtree(file_path)\n", + " except Exception as e:\n", + " print(f\"Error: {e}\")\n", + " print(f\"Emptied folder: {folder}\")\n", + " except OSError as e:\n", + " print(f\"Error: {e}\")\n", + "\n", + "# Call the function to empty folders only if the 'run' parameter is set to True\n", + "empty_folders(folders_to_empty, run=empty_folder_question)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0145b399-dfad-448a-9f0d-fa975fb01ad2", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/r_app/2_CI_data_prep.R b/r_app/2_CI_data_prep.R index 8ffa998..aeca955 100644 --- a/r_app/2_CI_data_prep.R +++ b/r_app/2_CI_data_prep.R @@ -508,7 +508,7 @@ dir.create(merged_final) dir.create(harvest_dir) -weeks_ago = 0 +#weeks_ago = 0 # Creating weekly mosaic dates <- date_list(weeks_ago) print(dates) @@ -743,13 +743,14 @@ if (new_project_question == TRUE) { pivot_stats <- extracted_values %>% map(readRDS) %>% list_rbind() %>% - group_by(pivot_quadrant) %>% + group_by(subField) %>% summarise(across(everything(), ~ first(na.omit(.)))) combined_CI_data <- readRDS(here(cumulative_CI_vals_dir,"combined_CI_data.rds")) #%>% drop_na(pivot_quadrant) pivot_stats2 <- bind_rows(pivot_stats, combined_CI_data) # pivot_stats2 <- combined_CI_data print("All CI values extracted from latest 7 images.") + saveRDS(combined_CI_data, here(cumulative_CI_vals_dir,"combined_CI_data.rds")) #used to save the rest of the data into one file } diff --git a/r_app/CI_report_dashboard_planet.Rmd b/r_app/CI_report_dashboard_planet.Rmd index 23fb69f..871d2c2 100644 --- a/r_app/CI_report_dashboard_planet.Rmd +++ b/r_app/CI_report_dashboard_planet.Rmd @@ -137,11 +137,11 @@ AllPivots0 <- field_boundaries_sf # pivots_dates$pivot <- factor(pivots_dates$pivot, levels = c("1.1", "1.2", "1.3", "1.4", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "1.12", "1.13", "1.14" , "1.16" , "1.17" , "1.18" ,"2.1", "2.2", "2.3" , "2.4", "2.5", "3.1", "3.2", "3.3", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "5.1" ,"5.2", "5.3", "5.4", "6.1", "6.2", "DL1.1", "DL1.3")) AllPivots <- merge(AllPivots0, harvesting_data, by = c("Field", "subField")) #%>% - # rename(pivot = pivot.x) #%>% select(-pivot.y) +#rename(Field = pivot, subField = pivot_quadrant) #%>% select(-pivot.y) head(AllPivots) AllPivots_merged <- AllPivots %>% - group_by(Field) %>% summarise(sub_area = first(sub_area)) + group_by(Field) #%>% summarise(sub_area = first(sub_area)) AllPivots_merged <- st_transform(AllPivots_merged, crs = proj4string(CI)) @@ -393,7 +393,7 @@ walk(pivots_estate$pivot, ~ { ```{r looping over sub_area, echo=FALSE, fig.height=3.8, fig.width=10, message=FALSE, warning=FALSE, results='asis'} -pivots_grouped <- AllPivots_merged %>% +pivots_grouped <- AllPivots_merged %>% group_by(sub_area) %>% arrange(sub_area) # Optional: arrange the groups alphabetically by sub_area @@ -403,7 +403,7 @@ for (subgroup in unique(pivots_grouped$sub_area)) { cat("\n # Subgroup: ", subgroup, "\n") # Add a title for the subgroup subset_data <- filter(pivots_grouped, sub_area == subgroup) cat("\n") - walk(subset_data$Field, ~ { + walk(AllPivots_merged$Field, ~ { cat("\n") # Add an empty line for better spacing ci_plot(.x) cat("\n") diff --git a/r_app/Rplots.pdf b/r_app/Rplots.pdf index bf8c066..de7759a 100644 Binary files a/r_app/Rplots.pdf and b/r_app/Rplots.pdf differ