From 6662c2bda908514ed4d75b1ab66410af57b20c7a Mon Sep 17 00:00:00 2001 From: Pratichhya <39898768+Pratichhya@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:08:10 +0100 Subject: [PATCH 1/4] removed widgets from metadata --- .../FuseTS - CropSAR Full Workflow.ipynb | 360 ------------------ 1 file changed, 360 deletions(-) diff --git a/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb b/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb index e35c5ef..f0cc07d 100644 --- a/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb +++ b/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb @@ -421,366 +421,6 @@ "interpreter": { "hash": "5c03b434e59eed88f0de80727dd778a0649e6474303457c247ef449eabdd7cac" } - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "075be31fc63941ab8c7f3c0ac8ee27d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "1c42eea0ba6f4a00b594b7317991a774": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "4dea090226fb4def9909b02d5a79f92a": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletAttributionControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletAttributionControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletAttributionControlView", - "options": [ - "position", - "prefix" - ], - "position": "bottomright", - "prefix": "ipyleaflet" - } - }, - "5bde1dfbad6a4c38bdeec7f198292be2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletZoomControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletZoomControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletZoomControlView", - "options": [ - "position", - "zoom_in_text", - "zoom_in_title", - "zoom_out_text", - "zoom_out_title" - ], - "position": "topleft", - "zoom_in_text": "+", - "zoom_in_title": "Zoom in", - "zoom_out_text": "-", - "zoom_out_title": "Zoom out" - } - }, - "78e3180acb034052bdfe52ecbcde3dd2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "7dfc8a56f36447f388cd7450ad0f209e": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletGeoJSONModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletGeoJSONModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletGeoJSONView", - "base": false, - "bottom": false, - "data": { - "coordinates": [ - [ - [ - -4.875091217039325, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77290587433312 - ] - ] - ], - "type": "Polygon" - }, - "hover_style": {}, - "layers": [], - "name": "", - "options": [], - "pane": "", - "point_style": {}, - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "style": { - "color": "red", - "dashArray": "9", - "fillOpacity": 0.5, - "opacity": 1, - "weight": 1.9 - }, - "subitems": [], - "visible": true - } - }, - "a6b2219658314282b9714ead2b5bcbb8": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "move" - } - }, - "ae380de71eee4a5db3f93b4d72391c55": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapModel", - "state": { - "_dom_classes": [], - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletMapView", - "bottom": 6242364, - "bounce_at_zoom_limits": true, - "box_zoom": true, - "center": [ - 41.773545983990005, - -4.874164245603778 - ], - "close_popup_on_click": true, - "controls": [ - "IPY_MODEL_5bde1dfbad6a4c38bdeec7f198292be2", - "IPY_MODEL_4dea090226fb4def9909b02d5a79f92a" - ], - "crs": { - "custom": false, - "name": "EPSG3857" - }, - "default_style": "IPY_MODEL_1c42eea0ba6f4a00b594b7317991a774", - "double_click_zoom": true, - "dragging": true, - "dragging_style": "IPY_MODEL_a6b2219658314282b9714ead2b5bcbb8", - "east": -4.862265586853028, - "fullscreen": false, - "inertia": true, - "inertia_deceleration": 3000, - "inertia_max_speed": 1500, - "interpolation": "bilinear", - "keyboard": true, - "keyboard_pan_offset": 80, - "keyboard_zoom_offset": 1, - "layers": [ - "IPY_MODEL_fa72b583a1fd4247911a5500ec07dc62", - "IPY_MODEL_7dfc8a56f36447f388cd7450ad0f209e" - ], - "layout": "IPY_MODEL_075be31fc63941ab8c7f3c0ac8ee27d4", - "left": 8160901, - "max_zoom": null, - "min_zoom": null, - "modisdate": "2023-10-25", - "north": 41.77675258417862, - "options": [ - "bounce_at_zoom_limits", - "box_zoom", - "center", - "close_popup_on_click", - "double_click_zoom", - "dragging", - "fullscreen", - "inertia", - "inertia_deceleration", - "inertia_max_speed", - "interpolation", - "keyboard", - "keyboard_pan_offset", - "keyboard_zoom_offset", - "max_zoom", - "min_zoom", - "prefer_canvas", - "scroll_wheel_zoom", - "tap", - "tap_tolerance", - "touch_zoom", - "world_copy_jump", - "zoom", - "zoom_animation_threshold", - "zoom_delta", - "zoom_snap" - ], - "panes": {}, - "prefer_canvas": false, - "right": 8162010, - "scroll_wheel_zoom": false, - "south": 41.77035147225083, - "style": "IPY_MODEL_78e3180acb034052bdfe52ecbcde3dd2", - "tap": true, - "tap_tolerance": 15, - "top": 6241964, - "touch_zoom": true, - "west": -4.886062145233155, - "window_url": "https://zzuftopcnl9-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231024-060124_RC00_576097381", - "world_copy_jump": false, - "zoom": 16, - "zoom_animation_threshold": 4, - "zoom_delta": 1, - "zoom_snap": 1 - } - }, - "fa72b583a1fd4247911a5500ec07dc62": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletTileLayerModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletTileLayerModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletTileLayerView", - "attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", - "base": true, - "bottom": true, - "bounds": null, - "detect_retina": false, - "loading": false, - "max_native_zoom": null, - "max_zoom": 18, - "min_native_zoom": null, - "min_zoom": 1, - "name": "Esri.WorldImagery", - "no_wrap": false, - "opacity": 1, - "options": [ - "attribution", - "bounds", - "detect_retina", - "max_native_zoom", - "max_zoom", - "min_native_zoom", - "min_zoom", - "no_wrap", - "tile_size", - "tms", - "zoom_offset" - ], - "pane": "", - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "show_loading": false, - "subitems": [], - "tile_size": 256, - "tms": false, - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "visible": true, - "zoom_offset": 0 - } - } - } } }, "nbformat": 4, From eb29cadb11773a68fc0ca66890e91c6139066314 Mon Sep 17 00:00:00 2001 From: Pratichhya <39898768+Pratichhya@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:12:20 +0100 Subject: [PATCH 2/4] removed widgets info from metadata --- .../OpenEO/FuseTS - MOGPR Full Workflow.ipynb | 360 ------------------ .../FuseTS - MOGPR Multi Source Fusion.ipynb | 360 ------------------ .../OpenEO/FuseTS - MOGPR S1 and S2.ipynb | 360 ------------------ 3 files changed, 1080 deletions(-) diff --git a/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb b/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb index 20f56ea..4a8608d 100644 --- a/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb +++ b/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb @@ -461,366 +461,6 @@ "interpreter": { "hash": "5c03b434e59eed88f0de80727dd778a0649e6474303457c247ef449eabdd7cac" } - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "075be31fc63941ab8c7f3c0ac8ee27d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "1c42eea0ba6f4a00b594b7317991a774": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "4dea090226fb4def9909b02d5a79f92a": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletAttributionControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletAttributionControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletAttributionControlView", - "options": [ - "position", - "prefix" - ], - "position": "bottomright", - "prefix": "ipyleaflet" - } - }, - "5bde1dfbad6a4c38bdeec7f198292be2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletZoomControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletZoomControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletZoomControlView", - "options": [ - "position", - "zoom_in_text", - "zoom_in_title", - "zoom_out_text", - "zoom_out_title" - ], - "position": "topleft", - "zoom_in_text": "+", - "zoom_in_title": "Zoom in", - "zoom_out_text": "-", - "zoom_out_title": "Zoom out" - } - }, - "78e3180acb034052bdfe52ecbcde3dd2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "7dfc8a56f36447f388cd7450ad0f209e": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletGeoJSONModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletGeoJSONModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletGeoJSONView", - "base": false, - "bottom": false, - "data": { - "coordinates": [ - [ - [ - -4.875091217039325, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77290587433312 - ] - ] - ], - "type": "Polygon" - }, - "hover_style": {}, - "layers": [], - "name": "", - "options": [], - "pane": "", - "point_style": {}, - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "style": { - "color": "red", - "dashArray": "9", - "fillOpacity": 0.5, - "opacity": 1, - "weight": 1.9 - }, - "subitems": [], - "visible": true - } - }, - "a6b2219658314282b9714ead2b5bcbb8": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "move" - } - }, - "ae380de71eee4a5db3f93b4d72391c55": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapModel", - "state": { - "_dom_classes": [], - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletMapView", - "bottom": 6242364, - "bounce_at_zoom_limits": true, - "box_zoom": true, - "center": [ - 41.773545983990005, - -4.874164245603778 - ], - "close_popup_on_click": true, - "controls": [ - "IPY_MODEL_5bde1dfbad6a4c38bdeec7f198292be2", - "IPY_MODEL_4dea090226fb4def9909b02d5a79f92a" - ], - "crs": { - "custom": false, - "name": "EPSG3857" - }, - "default_style": "IPY_MODEL_1c42eea0ba6f4a00b594b7317991a774", - "double_click_zoom": true, - "dragging": true, - "dragging_style": "IPY_MODEL_a6b2219658314282b9714ead2b5bcbb8", - "east": -4.862265586853028, - "fullscreen": false, - "inertia": true, - "inertia_deceleration": 3000, - "inertia_max_speed": 1500, - "interpolation": "bilinear", - "keyboard": true, - "keyboard_pan_offset": 80, - "keyboard_zoom_offset": 1, - "layers": [ - "IPY_MODEL_fa72b583a1fd4247911a5500ec07dc62", - "IPY_MODEL_7dfc8a56f36447f388cd7450ad0f209e" - ], - "layout": "IPY_MODEL_075be31fc63941ab8c7f3c0ac8ee27d4", - "left": 8160901, - "max_zoom": null, - "min_zoom": null, - "modisdate": "2023-10-25", - "north": 41.77675258417862, - "options": [ - "bounce_at_zoom_limits", - "box_zoom", - "center", - "close_popup_on_click", - "double_click_zoom", - "dragging", - "fullscreen", - "inertia", - "inertia_deceleration", - "inertia_max_speed", - "interpolation", - "keyboard", - "keyboard_pan_offset", - "keyboard_zoom_offset", - "max_zoom", - "min_zoom", - "prefer_canvas", - "scroll_wheel_zoom", - "tap", - "tap_tolerance", - "touch_zoom", - "world_copy_jump", - "zoom", - "zoom_animation_threshold", - "zoom_delta", - "zoom_snap" - ], - "panes": {}, - "prefer_canvas": false, - "right": 8162010, - "scroll_wheel_zoom": false, - "south": 41.77035147225083, - "style": "IPY_MODEL_78e3180acb034052bdfe52ecbcde3dd2", - "tap": true, - "tap_tolerance": 15, - "top": 6241964, - "touch_zoom": true, - "west": -4.886062145233155, - "window_url": "https://zzuftopcnl9-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231024-060124_RC00_576097381", - "world_copy_jump": false, - "zoom": 16, - "zoom_animation_threshold": 4, - "zoom_delta": 1, - "zoom_snap": 1 - } - }, - "fa72b583a1fd4247911a5500ec07dc62": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletTileLayerModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletTileLayerModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletTileLayerView", - "attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", - "base": true, - "bottom": true, - "bounds": null, - "detect_retina": false, - "loading": false, - "max_native_zoom": null, - "max_zoom": 18, - "min_native_zoom": null, - "min_zoom": 1, - "name": "Esri.WorldImagery", - "no_wrap": false, - "opacity": 1, - "options": [ - "attribution", - "bounds", - "detect_retina", - "max_native_zoom", - "max_zoom", - "min_native_zoom", - "min_zoom", - "no_wrap", - "tile_size", - "tms", - "zoom_offset" - ], - "pane": "", - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "show_loading": false, - "subitems": [], - "tile_size": 256, - "tms": false, - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "visible": true, - "zoom_offset": 0 - } - } - } } }, "nbformat": 4, diff --git a/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb b/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb index 3b56e30..5a10ce6 100644 --- a/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb +++ b/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb @@ -613,366 +613,6 @@ "interpreter": { "hash": "5c03b434e59eed88f0de80727dd778a0649e6474303457c247ef449eabdd7cac" } - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "075be31fc63941ab8c7f3c0ac8ee27d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "1c42eea0ba6f4a00b594b7317991a774": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "4dea090226fb4def9909b02d5a79f92a": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletAttributionControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletAttributionControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletAttributionControlView", - "options": [ - "position", - "prefix" - ], - "position": "bottomright", - "prefix": "ipyleaflet" - } - }, - "5bde1dfbad6a4c38bdeec7f198292be2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletZoomControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletZoomControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletZoomControlView", - "options": [ - "position", - "zoom_in_text", - "zoom_in_title", - "zoom_out_text", - "zoom_out_title" - ], - "position": "topleft", - "zoom_in_text": "+", - "zoom_in_title": "Zoom in", - "zoom_out_text": "-", - "zoom_out_title": "Zoom out" - } - }, - "78e3180acb034052bdfe52ecbcde3dd2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "7dfc8a56f36447f388cd7450ad0f209e": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletGeoJSONModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletGeoJSONModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletGeoJSONView", - "base": false, - "bottom": false, - "data": { - "coordinates": [ - [ - [ - -4.875091217039325, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77290587433312 - ] - ] - ], - "type": "Polygon" - }, - "hover_style": {}, - "layers": [], - "name": "", - "options": [], - "pane": "", - "point_style": {}, - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "style": { - "color": "red", - "dashArray": "9", - "fillOpacity": 0.5, - "opacity": 1, - "weight": 1.9 - }, - "subitems": [], - "visible": true - } - }, - "a6b2219658314282b9714ead2b5bcbb8": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "move" - } - }, - "ae380de71eee4a5db3f93b4d72391c55": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapModel", - "state": { - "_dom_classes": [], - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletMapView", - "bottom": 6242364, - "bounce_at_zoom_limits": true, - "box_zoom": true, - "center": [ - 41.773545983990005, - -4.874164245603778 - ], - "close_popup_on_click": true, - "controls": [ - "IPY_MODEL_5bde1dfbad6a4c38bdeec7f198292be2", - "IPY_MODEL_4dea090226fb4def9909b02d5a79f92a" - ], - "crs": { - "custom": false, - "name": "EPSG3857" - }, - "default_style": "IPY_MODEL_1c42eea0ba6f4a00b594b7317991a774", - "double_click_zoom": true, - "dragging": true, - "dragging_style": "IPY_MODEL_a6b2219658314282b9714ead2b5bcbb8", - "east": -4.862265586853028, - "fullscreen": false, - "inertia": true, - "inertia_deceleration": 3000, - "inertia_max_speed": 1500, - "interpolation": "bilinear", - "keyboard": true, - "keyboard_pan_offset": 80, - "keyboard_zoom_offset": 1, - "layers": [ - "IPY_MODEL_fa72b583a1fd4247911a5500ec07dc62", - "IPY_MODEL_7dfc8a56f36447f388cd7450ad0f209e" - ], - "layout": "IPY_MODEL_075be31fc63941ab8c7f3c0ac8ee27d4", - "left": 8160901, - "max_zoom": null, - "min_zoom": null, - "modisdate": "2023-10-25", - "north": 41.77675258417862, - "options": [ - "bounce_at_zoom_limits", - "box_zoom", - "center", - "close_popup_on_click", - "double_click_zoom", - "dragging", - "fullscreen", - "inertia", - "inertia_deceleration", - "inertia_max_speed", - "interpolation", - "keyboard", - "keyboard_pan_offset", - "keyboard_zoom_offset", - "max_zoom", - "min_zoom", - "prefer_canvas", - "scroll_wheel_zoom", - "tap", - "tap_tolerance", - "touch_zoom", - "world_copy_jump", - "zoom", - "zoom_animation_threshold", - "zoom_delta", - "zoom_snap" - ], - "panes": {}, - "prefer_canvas": false, - "right": 8162010, - "scroll_wheel_zoom": false, - "south": 41.77035147225083, - "style": "IPY_MODEL_78e3180acb034052bdfe52ecbcde3dd2", - "tap": true, - "tap_tolerance": 15, - "top": 6241964, - "touch_zoom": true, - "west": -4.886062145233155, - "window_url": "https://zzuftopcnl9-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231024-060124_RC00_576097381", - "world_copy_jump": false, - "zoom": 16, - "zoom_animation_threshold": 4, - "zoom_delta": 1, - "zoom_snap": 1 - } - }, - "fa72b583a1fd4247911a5500ec07dc62": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletTileLayerModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletTileLayerModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletTileLayerView", - "attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", - "base": true, - "bottom": true, - "bounds": null, - "detect_retina": false, - "loading": false, - "max_native_zoom": null, - "max_zoom": 18, - "min_native_zoom": null, - "min_zoom": 1, - "name": "Esri.WorldImagery", - "no_wrap": false, - "opacity": 1, - "options": [ - "attribution", - "bounds", - "detect_retina", - "max_native_zoom", - "max_zoom", - "min_native_zoom", - "min_zoom", - "no_wrap", - "tile_size", - "tms", - "zoom_offset" - ], - "pane": "", - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "show_loading": false, - "subitems": [], - "tile_size": 256, - "tms": false, - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "visible": true, - "zoom_offset": 0 - } - } - } } }, "nbformat": 4, diff --git a/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb b/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb index 2be0274..2115a37 100644 --- a/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb +++ b/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb @@ -759,366 +759,6 @@ "interpreter": { "hash": "5c03b434e59eed88f0de80727dd778a0649e6474303457c247ef449eabdd7cac" } - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "075be31fc63941ab8c7f3c0ac8ee27d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "1c42eea0ba6f4a00b594b7317991a774": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "4dea090226fb4def9909b02d5a79f92a": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletAttributionControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletAttributionControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletAttributionControlView", - "options": [ - "position", - "prefix" - ], - "position": "bottomright", - "prefix": "ipyleaflet" - } - }, - "5bde1dfbad6a4c38bdeec7f198292be2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletZoomControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletZoomControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletZoomControlView", - "options": [ - "position", - "zoom_in_text", - "zoom_in_title", - "zoom_out_text", - "zoom_out_title" - ], - "position": "topleft", - "zoom_in_text": "+", - "zoom_in_title": "Zoom in", - "zoom_out_text": "-", - "zoom_out_title": "Zoom out" - } - }, - "78e3180acb034052bdfe52ecbcde3dd2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "7dfc8a56f36447f388cd7450ad0f209e": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletGeoJSONModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletGeoJSONModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletGeoJSONView", - "base": false, - "bottom": false, - "data": { - "coordinates": [ - [ - [ - -4.875091217039325, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77290587433312 - ] - ] - ], - "type": "Polygon" - }, - "hover_style": {}, - "layers": [], - "name": "", - "options": [], - "pane": "", - "point_style": {}, - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "style": { - "color": "red", - "dashArray": "9", - "fillOpacity": 0.5, - "opacity": 1, - "weight": 1.9 - }, - "subitems": [], - "visible": true - } - }, - "a6b2219658314282b9714ead2b5bcbb8": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "move" - } - }, - "ae380de71eee4a5db3f93b4d72391c55": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapModel", - "state": { - "_dom_classes": [], - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletMapView", - "bottom": 6242364, - "bounce_at_zoom_limits": true, - "box_zoom": true, - "center": [ - 41.773545983990005, - -4.874164245603778 - ], - "close_popup_on_click": true, - "controls": [ - "IPY_MODEL_5bde1dfbad6a4c38bdeec7f198292be2", - "IPY_MODEL_4dea090226fb4def9909b02d5a79f92a" - ], - "crs": { - "custom": false, - "name": "EPSG3857" - }, - "default_style": "IPY_MODEL_1c42eea0ba6f4a00b594b7317991a774", - "double_click_zoom": true, - "dragging": true, - "dragging_style": "IPY_MODEL_a6b2219658314282b9714ead2b5bcbb8", - "east": -4.862265586853028, - "fullscreen": false, - "inertia": true, - "inertia_deceleration": 3000, - "inertia_max_speed": 1500, - "interpolation": "bilinear", - "keyboard": true, - "keyboard_pan_offset": 80, - "keyboard_zoom_offset": 1, - "layers": [ - "IPY_MODEL_fa72b583a1fd4247911a5500ec07dc62", - "IPY_MODEL_7dfc8a56f36447f388cd7450ad0f209e" - ], - "layout": "IPY_MODEL_075be31fc63941ab8c7f3c0ac8ee27d4", - "left": 8160901, - "max_zoom": null, - "min_zoom": null, - "modisdate": "2023-10-25", - "north": 41.77675258417862, - "options": [ - "bounce_at_zoom_limits", - "box_zoom", - "center", - "close_popup_on_click", - "double_click_zoom", - "dragging", - "fullscreen", - "inertia", - "inertia_deceleration", - "inertia_max_speed", - "interpolation", - "keyboard", - "keyboard_pan_offset", - "keyboard_zoom_offset", - "max_zoom", - "min_zoom", - "prefer_canvas", - "scroll_wheel_zoom", - "tap", - "tap_tolerance", - "touch_zoom", - "world_copy_jump", - "zoom", - "zoom_animation_threshold", - "zoom_delta", - "zoom_snap" - ], - "panes": {}, - "prefer_canvas": false, - "right": 8162010, - "scroll_wheel_zoom": false, - "south": 41.77035147225083, - "style": "IPY_MODEL_78e3180acb034052bdfe52ecbcde3dd2", - "tap": true, - "tap_tolerance": 15, - "top": 6241964, - "touch_zoom": true, - "west": -4.886062145233155, - "window_url": "https://zzuftopcnl9-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231024-060124_RC00_576097381", - "world_copy_jump": false, - "zoom": 16, - "zoom_animation_threshold": 4, - "zoom_delta": 1, - "zoom_snap": 1 - } - }, - "fa72b583a1fd4247911a5500ec07dc62": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletTileLayerModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletTileLayerModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletTileLayerView", - "attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", - "base": true, - "bottom": true, - "bounds": null, - "detect_retina": false, - "loading": false, - "max_native_zoom": null, - "max_zoom": 18, - "min_native_zoom": null, - "min_zoom": 1, - "name": "Esri.WorldImagery", - "no_wrap": false, - "opacity": 1, - "options": [ - "attribution", - "bounds", - "detect_retina", - "max_native_zoom", - "max_zoom", - "min_native_zoom", - "min_zoom", - "no_wrap", - "tile_size", - "tms", - "zoom_offset" - ], - "pane": "", - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "show_loading": false, - "subitems": [], - "tile_size": 256, - "tms": false, - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "visible": true, - "zoom_offset": 0 - } - } - } } }, "nbformat": 4, From 3dde7f8615651a492b06efc96fbec209dda3cb81 Mon Sep 17 00:00:00 2001 From: Pratichhya <39898768+Pratichhya@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:16:39 +0100 Subject: [PATCH 3/4] updated widgets --- workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb | 360 ------------------ .../BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb | 360 ------------------ 2 files changed, 720 deletions(-) diff --git a/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb b/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb index 80bff88..51b4a4f 100644 --- a/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb +++ b/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb @@ -1497,366 +1497,6 @@ "interpreter": { "hash": "5c03b434e59eed88f0de80727dd778a0649e6474303457c247ef449eabdd7cac" } - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "075be31fc63941ab8c7f3c0ac8ee27d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "1c42eea0ba6f4a00b594b7317991a774": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "4dea090226fb4def9909b02d5a79f92a": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletAttributionControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletAttributionControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletAttributionControlView", - "options": [ - "position", - "prefix" - ], - "position": "bottomright", - "prefix": "ipyleaflet" - } - }, - "5bde1dfbad6a4c38bdeec7f198292be2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletZoomControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletZoomControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletZoomControlView", - "options": [ - "position", - "zoom_in_text", - "zoom_in_title", - "zoom_out_text", - "zoom_out_title" - ], - "position": "topleft", - "zoom_in_text": "+", - "zoom_in_title": "Zoom in", - "zoom_out_text": "-", - "zoom_out_title": "Zoom out" - } - }, - "78e3180acb034052bdfe52ecbcde3dd2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "7dfc8a56f36447f388cd7450ad0f209e": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletGeoJSONModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletGeoJSONModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletGeoJSONView", - "base": false, - "bottom": false, - "data": { - "coordinates": [ - [ - [ - -4.875091217039325, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77290587433312 - ] - ] - ], - "type": "Polygon" - }, - "hover_style": {}, - "layers": [], - "name": "", - "options": [], - "pane": "", - "point_style": {}, - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "style": { - "color": "red", - "dashArray": "9", - "fillOpacity": 0.5, - "opacity": 1, - "weight": 1.9 - }, - "subitems": [], - "visible": true - } - }, - "a6b2219658314282b9714ead2b5bcbb8": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "move" - } - }, - "ae380de71eee4a5db3f93b4d72391c55": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapModel", - "state": { - "_dom_classes": [], - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletMapView", - "bottom": 6242364, - "bounce_at_zoom_limits": true, - "box_zoom": true, - "center": [ - 41.773545983990005, - -4.874164245603778 - ], - "close_popup_on_click": true, - "controls": [ - "IPY_MODEL_5bde1dfbad6a4c38bdeec7f198292be2", - "IPY_MODEL_4dea090226fb4def9909b02d5a79f92a" - ], - "crs": { - "custom": false, - "name": "EPSG3857" - }, - "default_style": "IPY_MODEL_1c42eea0ba6f4a00b594b7317991a774", - "double_click_zoom": true, - "dragging": true, - "dragging_style": "IPY_MODEL_a6b2219658314282b9714ead2b5bcbb8", - "east": -4.862265586853028, - "fullscreen": false, - "inertia": true, - "inertia_deceleration": 3000, - "inertia_max_speed": 1500, - "interpolation": "bilinear", - "keyboard": true, - "keyboard_pan_offset": 80, - "keyboard_zoom_offset": 1, - "layers": [ - "IPY_MODEL_fa72b583a1fd4247911a5500ec07dc62", - "IPY_MODEL_7dfc8a56f36447f388cd7450ad0f209e" - ], - "layout": "IPY_MODEL_075be31fc63941ab8c7f3c0ac8ee27d4", - "left": 8160901, - "max_zoom": null, - "min_zoom": null, - "modisdate": "2023-10-25", - "north": 41.77675258417862, - "options": [ - "bounce_at_zoom_limits", - "box_zoom", - "center", - "close_popup_on_click", - "double_click_zoom", - "dragging", - "fullscreen", - "inertia", - "inertia_deceleration", - "inertia_max_speed", - "interpolation", - "keyboard", - "keyboard_pan_offset", - "keyboard_zoom_offset", - "max_zoom", - "min_zoom", - "prefer_canvas", - "scroll_wheel_zoom", - "tap", - "tap_tolerance", - "touch_zoom", - "world_copy_jump", - "zoom", - "zoom_animation_threshold", - "zoom_delta", - "zoom_snap" - ], - "panes": {}, - "prefer_canvas": false, - "right": 8162010, - "scroll_wheel_zoom": false, - "south": 41.77035147225083, - "style": "IPY_MODEL_78e3180acb034052bdfe52ecbcde3dd2", - "tap": true, - "tap_tolerance": 15, - "top": 6241964, - "touch_zoom": true, - "west": -4.886062145233155, - "window_url": "https://zzuftopcnl9-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231024-060124_RC00_576097381", - "world_copy_jump": false, - "zoom": 16, - "zoom_animation_threshold": 4, - "zoom_delta": 1, - "zoom_snap": 1 - } - }, - "fa72b583a1fd4247911a5500ec07dc62": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletTileLayerModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletTileLayerModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletTileLayerView", - "attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", - "base": true, - "bottom": true, - "bounds": null, - "detect_retina": false, - "loading": false, - "max_native_zoom": null, - "max_zoom": 18, - "min_native_zoom": null, - "min_zoom": 1, - "name": "Esri.WorldImagery", - "no_wrap": false, - "opacity": 1, - "options": [ - "attribution", - "bounds", - "detect_retina", - "max_native_zoom", - "max_zoom", - "min_native_zoom", - "min_zoom", - "no_wrap", - "tile_size", - "tms", - "zoom_offset" - ], - "pane": "", - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "show_loading": false, - "subitems": [], - "tile_size": 256, - "tms": false, - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "visible": true, - "zoom_offset": 0 - } - } - } } }, "nbformat": 4, diff --git a/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb b/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb index 6e87fb7..331ad8c 100644 --- a/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb +++ b/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb @@ -43758,366 +43758,6 @@ "interpreter": { "hash": "5c03b434e59eed88f0de80727dd778a0649e6474303457c247ef449eabdd7cac" } - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "075be31fc63941ab8c7f3c0ac8ee27d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "1c42eea0ba6f4a00b594b7317991a774": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "4dea090226fb4def9909b02d5a79f92a": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletAttributionControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletAttributionControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletAttributionControlView", - "options": [ - "position", - "prefix" - ], - "position": "bottomright", - "prefix": "ipyleaflet" - } - }, - "5bde1dfbad6a4c38bdeec7f198292be2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletZoomControlModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletZoomControlModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletZoomControlView", - "options": [ - "position", - "zoom_in_text", - "zoom_in_title", - "zoom_out_text", - "zoom_out_title" - ], - "position": "topleft", - "zoom_in_text": "+", - "zoom_in_title": "Zoom in", - "zoom_out_text": "-", - "zoom_out_title": "Zoom out" - } - }, - "78e3180acb034052bdfe52ecbcde3dd2": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "grab" - } - }, - "7dfc8a56f36447f388cd7450ad0f209e": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletGeoJSONModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletGeoJSONModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletGeoJSONView", - "base": false, - "bottom": false, - "data": { - "coordinates": [ - [ - [ - -4.875091217039325, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77290587433312 - ], - [ - -4.872773788450457, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77450614847532 - ], - [ - -4.875091217039325, - 41.77290587433312 - ] - ] - ], - "type": "Polygon" - }, - "hover_style": {}, - "layers": [], - "name": "", - "options": [], - "pane": "", - "point_style": {}, - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "style": { - "color": "red", - "dashArray": "9", - "fillOpacity": 0.5, - "opacity": 1, - "weight": 1.9 - }, - "subitems": [], - "visible": true - } - }, - "a6b2219658314282b9714ead2b5bcbb8": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapStyleModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "cursor": "move" - } - }, - "ae380de71eee4a5db3f93b4d72391c55": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletMapModel", - "state": { - "_dom_classes": [], - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletMapModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletMapView", - "bottom": 6242364, - "bounce_at_zoom_limits": true, - "box_zoom": true, - "center": [ - 41.773545983990005, - -4.874164245603778 - ], - "close_popup_on_click": true, - "controls": [ - "IPY_MODEL_5bde1dfbad6a4c38bdeec7f198292be2", - "IPY_MODEL_4dea090226fb4def9909b02d5a79f92a" - ], - "crs": { - "custom": false, - "name": "EPSG3857" - }, - "default_style": "IPY_MODEL_1c42eea0ba6f4a00b594b7317991a774", - "double_click_zoom": true, - "dragging": true, - "dragging_style": "IPY_MODEL_a6b2219658314282b9714ead2b5bcbb8", - "east": -4.862265586853028, - "fullscreen": false, - "inertia": true, - "inertia_deceleration": 3000, - "inertia_max_speed": 1500, - "interpolation": "bilinear", - "keyboard": true, - "keyboard_pan_offset": 80, - "keyboard_zoom_offset": 1, - "layers": [ - "IPY_MODEL_fa72b583a1fd4247911a5500ec07dc62", - "IPY_MODEL_7dfc8a56f36447f388cd7450ad0f209e" - ], - "layout": "IPY_MODEL_075be31fc63941ab8c7f3c0ac8ee27d4", - "left": 8160901, - "max_zoom": null, - "min_zoom": null, - "modisdate": "2023-10-25", - "north": 41.77675258417862, - "options": [ - "bounce_at_zoom_limits", - "box_zoom", - "center", - "close_popup_on_click", - "double_click_zoom", - "dragging", - "fullscreen", - "inertia", - "inertia_deceleration", - "inertia_max_speed", - "interpolation", - "keyboard", - "keyboard_pan_offset", - "keyboard_zoom_offset", - "max_zoom", - "min_zoom", - "prefer_canvas", - "scroll_wheel_zoom", - "tap", - "tap_tolerance", - "touch_zoom", - "world_copy_jump", - "zoom", - "zoom_animation_threshold", - "zoom_delta", - "zoom_snap" - ], - "panes": {}, - "prefer_canvas": false, - "right": 8162010, - "scroll_wheel_zoom": false, - "south": 41.77035147225083, - "style": "IPY_MODEL_78e3180acb034052bdfe52ecbcde3dd2", - "tap": true, - "tap_tolerance": 15, - "top": 6241964, - "touch_zoom": true, - "west": -4.886062145233155, - "window_url": "https://zzuftopcnl9-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231024-060124_RC00_576097381", - "world_copy_jump": false, - "zoom": 16, - "zoom_animation_threshold": 4, - "zoom_delta": 1, - "zoom_snap": 1 - } - }, - "fa72b583a1fd4247911a5500ec07dc62": { - "model_module": "jupyter-leaflet", - "model_module_version": "^0.17", - "model_name": "LeafletTileLayerModel", - "state": { - "_model_module": "jupyter-leaflet", - "_model_module_version": "^0.17", - "_model_name": "LeafletTileLayerModel", - "_view_count": null, - "_view_module": "jupyter-leaflet", - "_view_module_version": "^0.17", - "_view_name": "LeafletTileLayerView", - "attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", - "base": true, - "bottom": true, - "bounds": null, - "detect_retina": false, - "loading": false, - "max_native_zoom": null, - "max_zoom": 18, - "min_native_zoom": null, - "min_zoom": 1, - "name": "Esri.WorldImagery", - "no_wrap": false, - "opacity": 1, - "options": [ - "attribution", - "bounds", - "detect_retina", - "max_native_zoom", - "max_zoom", - "min_native_zoom", - "min_zoom", - "no_wrap", - "tile_size", - "tms", - "zoom_offset" - ], - "pane": "", - "popup": null, - "popup_max_height": null, - "popup_max_width": 300, - "popup_min_width": 50, - "show_loading": false, - "subitems": [], - "tile_size": 256, - "tms": false, - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "visible": true, - "zoom_offset": 0 - } - } - } } }, "nbformat": 4, From bca40395e4fb572ed35a34131dd14817f34b96a9 Mon Sep 17 00:00:00 2001 From: Pratichhya <39898768+Pratichhya@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:36:58 +0100 Subject: [PATCH 4/4] linting --- .../FuseTS - CropSAR Full Workflow.ipynb | 44 +++-- .../OpenEO/FuseTS - MOGPR Full Workflow.ipynb | 82 +++++----- .../FuseTS - MOGPR Multi Source Fusion.ipynb | 153 +++++++++--------- .../OpenEO/FuseTS - MOGPR S1 and S2.ipynb | 111 ++++++------- src/fusets/openeo/__init__.py | 12 +- src/fusets/openeo/services/publish_mogpr.py | 10 +- .../openeo/services/publish_mogpr_s1_s2.py | 16 +- .../openeo/services/publish_phenology.py | 6 +- tests/conftest.py | 6 +- tests/fusets_openeo_tests/test_performance.py | 6 +- workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb | 43 +++-- .../BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb | 38 ++--- 12 files changed, 273 insertions(+), 254 deletions(-) diff --git a/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb b/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb index f0cc07d..9fbd108 100644 --- a/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb +++ b/notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb @@ -86,7 +86,6 @@ }, "outputs": [], "source": [ - "\n", "import json\n", "import warnings\n", "\n", @@ -118,7 +117,7 @@ "source": [ "year = 2019\n", "\n", - "with open('field.geojson', 'r') as input:\n", + "with open(\"field.geojson\", \"r\") as input:\n", " spat_ext = json.load(input)\n", " input.close()\n", "temp_ext = [f\"{year}-01-01\", f\"{year}-12-30\"]" @@ -245,12 +244,7 @@ "service = \"CropSAR_px\"\n", "namespace = \"vito\"\n", "cropsar_cube = connection.datacube_from_process(\n", - " service,\n", - " namespace=namespace,\n", - " geometry=spat_ext,\n", - " startdate=temp_ext[0],\n", - " enddate=temp_ext[1],\n", - " version=2\n", + " service, namespace=namespace, geometry=spat_ext, startdate=temp_ext[0], enddate=temp_ext[1], version=2\n", ")" ] }, @@ -271,11 +265,11 @@ "metadata": {}, "outputs": [], "source": [ - "service = 'phenology'\n", - "namespace = 'u:fusets'\n", - "phenology = connection.datacube_from_process(service,\n", - " namespace=f'https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}',\n", - " data=cropsar_cube)" + "service = \"phenology\"\n", + "namespace = \"u:fusets\"\n", + "phenology = connection.datacube_from_process(\n", + " service, namespace=f\"https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}\", data=cropsar_cube\n", + ")" ] }, { @@ -320,14 +314,18 @@ } ], "source": [ - "phenology_output_file = './phenology.nc'\n", - "phenology_job = phenology.execute_batch(phenology_output_file, out_format=\"netcdf\",\n", - " title=f'FuseTS - CropSAR - Phenology', job_options={\n", - " 'udf-dependency-archives': [\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv',\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static'\n", + "phenology_output_file = \"./phenology.nc\"\n", + "phenology_job = phenology.execute_batch(\n", + " phenology_output_file,\n", + " out_format=\"netcdf\",\n", + " title=f\"FuseTS - CropSAR - Phenology\",\n", + " job_options={\n", + " \"udf-dependency-archives\": [\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv\",\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static\",\n", " ]\n", - " })" + " },\n", + ")" ] }, { @@ -361,11 +359,11 @@ "import math\n", "\n", "nc_file = nc.Dataset(phenology_output_file)\n", - "keys = [x for x in nc_file.variables.keys() if x not in ['phenology', 'x', 'y', 'crs']]\n", + "keys = [x for x in nc_file.variables.keys() if x not in [\"phenology\", \"x\", \"y\", \"crs\"]]\n", "keys.sort()\n", "\n", - "lat = nc_file.variables['x'][:]\n", - "lon = nc_file.variables['y'][:]\n", + "lat = nc_file.variables[\"x\"][:]\n", + "lon = nc_file.variables[\"y\"][:]\n", "\n", "ncols = 2\n", "nrows = math.ceil(len(keys) / ncols)\n", diff --git a/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb b/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb index 4a8608d..37f93e4 100644 --- a/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb +++ b/notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb @@ -85,7 +85,6 @@ }, "outputs": [], "source": [ - "\n", "import json\n", "import warnings\n", "\n", @@ -119,17 +118,17 @@ "year = 2023\n", "\n", "spat_ext = {\n", - " \"type\": \"Polygon\",\n", - " \"coordinates\": [\n", - " [\n", - " [5.170012098271149, 51.25062964728295],\n", - " [5.17085904378298, 51.24882567194015],\n", - " [5.17857421368097, 51.2468515482926],\n", - " [5.178972704726344, 51.24982704376254],\n", - " [5.170012098271149, 51.25062964728295],\n", - " ]\n", - " ],\n", - " }\n", + " \"type\": \"Polygon\",\n", + " \"coordinates\": [\n", + " [\n", + " [5.170012098271149, 51.25062964728295],\n", + " [5.17085904378298, 51.24882567194015],\n", + " [5.17857421368097, 51.2468515482926],\n", + " [5.178972704726344, 51.24982704376254],\n", + " [5.170012098271149, 51.25062964728295],\n", + " ]\n", + " ],\n", + "}\n", "temp_ext = [f\"{year}-01-01\", f\"{year}-12-30\"]" ] }, @@ -249,13 +248,20 @@ "metadata": {}, "outputs": [], "source": [ - "service = 'mogpr_s1_s2'\n", - "namespace = 'u:fusets'\n", - "mogpr = connection.datacube_from_process(service,\n", - " namespace=f'https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}',\n", - " polygon=spat_ext, date=temp_ext, s1_collection='RVI ASC', s2_collection='NDVI')\n", + "service = \"mogpr_s1_s2\"\n", + "namespace = \"u:fusets\"\n", + "mogpr = connection.datacube_from_process(\n", + " service,\n", + " namespace=f\"https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}\",\n", + " polygon=spat_ext,\n", + " date=temp_ext,\n", + " s1_collection=\"RVI ASC\",\n", + " s2_collection=\"NDVI\",\n", + ")\n", "\n", - "mogpr.metadata = CollectionMetadata(metadata={},dimensions=[BandDimension(name='bands',bands=[Band('RVI ASC'),Band('NDVI')])])" + "mogpr.metadata = CollectionMetadata(\n", + " metadata={}, dimensions=[BandDimension(name=\"bands\", bands=[Band(\"RVI ASC\"), Band(\"NDVI\")])]\n", + ")" ] }, { @@ -275,7 +281,7 @@ "metadata": {}, "outputs": [], "source": [ - "mogpr_ndvi = mogpr.band('NDVI')" + "mogpr_ndvi = mogpr.band(\"NDVI\")" ] }, { @@ -285,11 +291,11 @@ "metadata": {}, "outputs": [], "source": [ - "service = 'phenology'\n", - "namespace = 'u:fusets'\n", - "phenology = connection.datacube_from_process(service,\n", - " namespace=f'https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}',\n", - " data=mogpr_ndvi)" + "service = \"phenology\"\n", + "namespace = \"u:fusets\"\n", + "phenology = connection.datacube_from_process(\n", + " service, namespace=f\"https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}\", data=mogpr_ndvi\n", + ")" ] }, { @@ -357,15 +363,19 @@ } ], "source": [ - "phenology_output_file = './phenology.nc'\n", - "phenology_job = phenology.execute_batch(phenology_output_file, out_format=\"netcdf\",\n", - " title=f'FuseTS - MOGPR - Phenology', job_options={\n", - " 'executor-memory': '8g',\n", - " 'udf-dependency-archives': [\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv',\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static'\n", - " ]\n", - " })" + "phenology_output_file = \"./phenology.nc\"\n", + "phenology_job = phenology.execute_batch(\n", + " phenology_output_file,\n", + " out_format=\"netcdf\",\n", + " title=f\"FuseTS - MOGPR - Phenology\",\n", + " job_options={\n", + " \"executor-memory\": \"8g\",\n", + " \"udf-dependency-archives\": [\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv\",\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static\",\n", + " ],\n", + " },\n", + ")" ] }, { @@ -401,11 +411,11 @@ "import math\n", "\n", "nc_file = nc.Dataset(phenology_output_file)\n", - "keys = [x for x in nc_file.variables.keys() if x not in ['phenology', 'x', 'y', 'crs']]\n", + "keys = [x for x in nc_file.variables.keys() if x not in [\"phenology\", \"x\", \"y\", \"crs\"]]\n", "keys.sort()\n", "\n", - "lat = nc_file.variables['x'][:]\n", - "lon = nc_file.variables['y'][:]\n", + "lat = nc_file.variables[\"x\"][:]\n", + "lon = nc_file.variables[\"y\"][:]\n", "\n", "ncols = 2\n", "nrows = math.ceil(len(keys) / ncols)\n", diff --git a/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb b/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb index 5a10ce6..3dbe8ad 100644 --- a/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb +++ b/notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb @@ -67,8 +67,8 @@ "Requirement already satisfied: packaging>=21.3 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from xarray>=0.12.3->openeo) (23.1)\n", "Requirement already satisfied: six>=1.5 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from python-dateutil>=2.8.2->pandas>0.20.0->openeo) (1.16.0)\n", "\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip available: \u001B[0m\u001B[31;49m22.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m24.0\u001B[0m\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n" + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" ] } ], @@ -86,7 +86,6 @@ }, "outputs": [], "source": [ - "\n", "import json\n", "import warnings\n", "\n", @@ -129,28 +128,13 @@ " \"type\": \"Polygon\",\n", " \"coordinates\": [\n", " [\n", - " [\n", - " 5.170012098271149,\n", - " 51.25062964728295\n", - " ],\n", - " [\n", - " 5.17085904378298,\n", - " 51.24882567194015\n", - " ],\n", - " [\n", - " 5.17857421368097,\n", - " 51.2468515482926\n", - " ],\n", - " [\n", - " 5.178972704726344,\n", - " 51.24982704376254\n", - " ],\n", - " [\n", - " 5.170012098271149,\n", - " 51.25062964728295\n", - " ]\n", + " [5.170012098271149, 51.25062964728295],\n", + " [5.17085904378298, 51.24882567194015],\n", + " [5.17857421368097, 51.2468515482926],\n", + " [5.178972704726344, 51.24982704376254],\n", + " [5.170012098271149, 51.25062964728295],\n", " ]\n", - " ]\n", + " ],\n", "}\n", "temp_ext = [f\"{year}-01-01\", f\"{year}-12-01\"]" ] @@ -279,24 +263,22 @@ "metadata": {}, "outputs": [], "source": [ - "scl = connection.load_collection('SENTINEL2_L2A',\n", - " spatial_extent=spat_ext,\n", - " temporal_extent=temp_ext,\n", - " bands=[\"SCL\"])\n", + "scl = connection.load_collection(\"SENTINEL2_L2A\", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=[\"SCL\"])\n", "cloud_mask = scl.process(\n", " \"to_scl_dilation_mask\",\n", " data=scl,\n", - " kernel1_size=17, kernel2_size=77,\n", + " kernel1_size=17,\n", + " kernel2_size=77,\n", " mask1_values=[2, 4, 5, 6, 7],\n", " mask2_values=[3, 8, 9, 10, 11],\n", - " erosion_kernel_size=3)\n", - "base_s2 = connection.load_collection('SENTINEL2_L2A',\n", - " spatial_extent=spat_ext,\n", - " temporal_extent=temp_ext,\n", - " bands=[\"B04\", \"B08\"])\n", + " erosion_kernel_size=3,\n", + ")\n", + "base_s2 = connection.load_collection(\n", + " \"SENTINEL2_L2A\", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=[\"B04\", \"B08\"]\n", + ")\n", "base_s2 = base_s2.mask(cloud_mask)\n", - "base_s2 = base_s2.ndvi(red=\"B04\", nir=\"B08\", target_band='NDVI')\n", - "base_s2 = base_s2.filter_bands(bands=['NDVI'])\n", + "base_s2 = base_s2.ndvi(red=\"B04\", nir=\"B08\", target_band=\"NDVI\")\n", + "base_s2 = base_s2.filter_bands(bands=[\"NDVI\"])\n", "base_s2 = base_s2.mask_polygon(spat_ext)" ] }, @@ -315,15 +297,14 @@ "metadata": {}, "outputs": [], "source": [ - "base_s1 = connection.load_collection('SENTINEL1_GRD',\n", - " spatial_extent=spat_ext,\n", - " temporal_extent=temp_ext,\n", - " bands=[\"VH\", \"VV\"])\n", + "base_s1 = connection.load_collection(\n", + " \"SENTINEL1_GRD\", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=[\"VH\", \"VV\"]\n", + ")\n", "\n", "VH = base_s1.band(\"VH\")\n", "VV = base_s1.band(\"VV\")\n", "base_s1 = (VH + VH) / (VV + VH)\n", - "base_s1 = base_s1.add_dimension(name=\"bands\", label=\"RVI\",type=\"bands\")" + "base_s1 = base_s1.add_dimension(name=\"bands\", label=\"RVI\", type=\"bands\")" ] }, { @@ -360,8 +341,8 @@ "metadata": {}, "outputs": [], "source": [ - "base_s2 = base_s2.aggregate_spatial(spat_ext, reducer='mean')\n", - "base_s2.download('./mogpr-multisource-s2-base.json', format='json')" + "base_s2 = base_s2.aggregate_spatial(spat_ext, reducer=\"mean\")\n", + "base_s2.download(\"./mogpr-multisource-s2-base.json\", format=\"json\")" ] }, { @@ -371,8 +352,8 @@ "metadata": {}, "outputs": [], "source": [ - "base_s1 = base_s1.aggregate_spatial(spat_ext, reducer='mean')\n", - "base_s1.download('./mogpr-multisource-s1-base.json', format='json')" + "base_s1 = base_s1.aggregate_spatial(spat_ext, reducer=\"mean\")\n", + "base_s1.download(\"./mogpr-multisource-s1-base.json\", format=\"json\")" ] }, { @@ -391,11 +372,14 @@ "metadata": {}, "outputs": [], "source": [ - "service = 'mogpr'\n", - "namespace = 'u:fusets'\n", - "mogpr = connection.datacube_from_process(service,\n", - " namespace=f'https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}',\n", - " data=merged_datacube, include_uncertainties=True)" + "service = \"mogpr\"\n", + "namespace = \"u:fusets\"\n", + "mogpr = connection.datacube_from_process(\n", + " service,\n", + " namespace=f\"https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}\",\n", + " data=merged_datacube,\n", + " include_uncertainties=True,\n", + ")" ] }, { @@ -414,7 +398,7 @@ "metadata": {}, "outputs": [], "source": [ - "mogpr_output_file = './mogpr-multisource.nc'" + "mogpr_output_file = \"./mogpr-multisource.nc\"" ] }, { @@ -466,14 +450,18 @@ } ], "source": [ - "mogpr_job = mogpr.execute_batch(mogpr_output_file, out_format=\"netcdf\",\n", - " title=f'FuseTS - MOGPR - Multi Source', job_options={\n", - " 'executor-memory': '8g',\n", - " 'udf-dependency-archives': [ \n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv',\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static'\n", - " ]\n", - " })" + "mogpr_job = mogpr.execute_batch(\n", + " mogpr_output_file,\n", + " out_format=\"netcdf\",\n", + " title=f\"FuseTS - MOGPR - Multi Source\",\n", + " job_options={\n", + " \"executor-memory\": \"8g\",\n", + " \"udf-dependency-archives\": [\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv\",\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static\",\n", + " ],\n", + " },\n", + ")" ] }, { @@ -493,17 +481,16 @@ }, "outputs": [], "source": [ - "cols = ['RVI - Raw', 'NDVI - Raw']\n", + "cols = [\"RVI - Raw\", \"NDVI - Raw\"]\n", "cubes_dfs = []\n", - "for result in ['mogpr-multisource-s1-base.json', 'mogpr-multisource-s2-base.json']:\n", - " with open(result, 'r') as result_file:\n", + "for result in [\"mogpr-multisource-s1-base.json\", \"mogpr-multisource-s2-base.json\"]:\n", + " with open(result, \"r\") as result_file:\n", " df = timeseries_json_to_pandas(json.load(result_file)).to_frame()\n", " df.index = pd.to_datetime(df.index).date\n", - " df.index.name = 't'\n", + " df.index.name = \"t\"\n", " df.columns = [f'{result.split(\"-\")[2].upper()}-RAW']\n", " cubes_dfs.append(df)\n", - " result_file.close()\n", - " " + " result_file.close()" ] }, { @@ -515,12 +502,12 @@ "source": [ "ds = xarray.load_dataset(mogpr_output_file)\n", "for var in ds.data_vars.items():\n", - " if var[0] != 'crs':\n", - " var_df = var[1].mean(dim=['x', 'y'])\n", + " if var[0] != \"crs\":\n", + " var_df = var[1].mean(dim=[\"x\", \"y\"])\n", " var_df = var_df.to_dataframe()\n", " var_df.index = pd.to_datetime(var_df.index)\n", - " var_df['date'] = var_df.index.date\n", - " var_df = var_df.set_index('date')\n", + " var_df[\"date\"] = var_df.index.date\n", + " var_df = var_df.set_index(\"date\")\n", " cubes_dfs.append(var_df)" ] }, @@ -532,7 +519,16 @@ "outputs": [], "source": [ "joined_df = pd.concat(cubes_dfs, axis=1)\n", - "joined_df = joined_df.rename(columns={'S1-RAW': cols[0], 'S2-RAW': cols[1], 'NDVI': 'NDVI - Smoothed', 'RVI': 'RVI - Smoothed', 'unkown_band_2': 'NDVI - Uncertainty', 'unkown_band_3': 'RVI - Uncertainty'})\n", + "joined_df = joined_df.rename(\n", + " columns={\n", + " \"S1-RAW\": cols[0],\n", + " \"S2-RAW\": cols[1],\n", + " \"NDVI\": \"NDVI - Smoothed\",\n", + " \"RVI\": \"RVI - Smoothed\",\n", + " \"unkown_band_2\": \"NDVI - Uncertainty\",\n", + " \"unkown_band_3\": \"RVI - Uncertainty\",\n", + " }\n", + ")\n", "joined_df = joined_df.sort_index()" ] }, @@ -565,16 +561,19 @@ ], "source": [ "plt.figure(figsize=(16, 6))\n", - "std_col_mapping = {\n", - " 'NDVI - Uncertainty': 'NDVI - Smoothed',\n", - " 'RVI - Uncertainty': 'RVI - Smoothed'\n", - "}\n", + "std_col_mapping = {\"NDVI - Uncertainty\": \"NDVI - Smoothed\", \"RVI - Uncertainty\": \"RVI - Smoothed\"}\n", "for col in sorted(joined_df.columns.values):\n", " values = joined_df[~joined_df[col].isna()]\n", - " if 'Uncertainty' in col:\n", - " plt.fill_between(values.index, values[std_col_mapping[col]] - values[col], values[std_col_mapping[col]] + values[col], alpha=0.2, label=col)\n", + " if \"Uncertainty\" in col:\n", + " plt.fill_between(\n", + " values.index,\n", + " values[std_col_mapping[col]] - values[col],\n", + " values[std_col_mapping[col]] + values[col],\n", + " alpha=0.2,\n", + " label=col,\n", + " )\n", " else:\n", - " plt.plot(values.index, values[col], '.' if 'Raw' in col else '-.', label=col)\n", + " plt.plot(values.index, values[col], \".\" if \"Raw\" in col else \"-.\", label=col)\n", "plt.grid(True)\n", "plt.legend()" ] diff --git a/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb b/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb index 2115a37..8c2f07e 100644 --- a/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb +++ b/notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb @@ -85,7 +85,6 @@ }, "outputs": [], "source": [ - "\n", "import warnings\n", "\n", "import matplotlib.pyplot as plt\n", @@ -122,28 +121,13 @@ " \"type\": \"Polygon\",\n", " \"coordinates\": [\n", " [\n", - " [\n", - " 5.170012098271149,\n", - " 51.25062964728295\n", - " ],\n", - " [\n", - " 5.17085904378298,\n", - " 51.24882567194015\n", - " ],\n", - " [\n", - " 5.17857421368097,\n", - " 51.2468515482926\n", - " ],\n", - " [\n", - " 5.178972704726344,\n", - " 51.24982704376254\n", - " ],\n", - " [\n", - " 5.170012098271149,\n", - " 51.25062964728295\n", - " ]\n", + " [5.170012098271149, 51.25062964728295],\n", + " [5.17085904378298, 51.24882567194015],\n", + " [5.17857421368097, 51.2468515482926],\n", + " [5.178972704726344, 51.24982704376254],\n", + " [5.170012098271149, 51.25062964728295],\n", " ]\n", - " ]\n", + " ],\n", "}\n", "temp_ext = [f\"{year}-01-01\", f\"{year}-12-31\"]" ] @@ -260,8 +244,8 @@ "metadata": {}, "outputs": [], "source": [ - "service = 'mogpr_s1_s2'\n", - "namespace = 'u:fusets'" + "service = \"mogpr_s1_s2\"\n", + "namespace = \"u:fusets\"" ] }, { @@ -368,10 +352,16 @@ "metadata": {}, "outputs": [], "source": [ - "mogpr = connection.datacube_from_process(service,\n", - " namespace=f'https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}',\n", - " polygon=spat_ext, date=temp_ext, s1_collection='RVI ASC', s2_collection='NDVI',\n", - " include_uncertainties=True, include_raw_inputs=True)" + "mogpr = connection.datacube_from_process(\n", + " service,\n", + " namespace=f\"https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}\",\n", + " polygon=spat_ext,\n", + " date=temp_ext,\n", + " s1_collection=\"RVI ASC\",\n", + " s2_collection=\"NDVI\",\n", + " include_uncertainties=True,\n", + " include_raw_inputs=True,\n", + ")" ] }, { @@ -390,7 +380,7 @@ "metadata": {}, "outputs": [], "source": [ - "mogpr_output_file = './mogpr-s1-s2.nc'" + "mogpr_output_file = \"./mogpr-s1-s2.nc\"" ] }, { @@ -446,14 +436,18 @@ } ], "source": [ - "mogpr_job = mogpr.execute_batch(mogpr_output_file, out_format=\"netcdf\",\n", - " title=f'FuseTS - MOGPR - S1/S2 Data Fusion', job_options={\n", - " 'executor-memory': '8g',\n", - " 'udf-dependency-archives': [\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv',\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static'\n", - " ]\n", - " })" + "mogpr_job = mogpr.execute_batch(\n", + " mogpr_output_file,\n", + " out_format=\"netcdf\",\n", + " title=f\"FuseTS - MOGPR - S1/S2 Data Fusion\",\n", + " job_options={\n", + " \"executor-memory\": \"8g\",\n", + " \"udf-dependency-archives\": [\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv\",\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static\",\n", + " ],\n", + " },\n", + ")" ] }, { @@ -474,12 +468,12 @@ "cubes_dfs = []\n", "ds = xarray.load_dataset(mogpr_output_file)\n", "for var in ds.data_vars.items():\n", - " if var[0] != 'crs':\n", - " var_df = var[1].mean(dim=['x', 'y'])\n", + " if var[0] != \"crs\":\n", + " var_df = var[1].mean(dim=[\"x\", \"y\"])\n", " var_df = var_df.to_dataframe()\n", " var_df.index = pd.to_datetime(var_df.index)\n", - " var_df['date'] = var_df.index.date\n", - " var_df = var_df.set_index('date')\n", + " var_df[\"date\"] = var_df.index.date\n", + " var_df = var_df.set_index(\"date\")\n", " cubes_dfs.append(var_df)" ] }, @@ -672,8 +666,15 @@ "source": [ "joined_df = pd.concat(cubes_dfs, axis=1)\n", "joined_df = joined_df.rename(\n", - " columns={'NDVI': 'NDVI - Smoothed', 'RVI': 'RVI - Smoothed', 'unkown_band_2': 'RVI - Uncertainty',\n", - " 'unkown_band_3': 'NDVI - Uncertainty', 'unkown_band_4': 'RVI - Raw', 'unkown_band_5': 'NDVI - Raw'})\n", + " columns={\n", + " \"NDVI\": \"NDVI - Smoothed\",\n", + " \"RVI\": \"RVI - Smoothed\",\n", + " \"unkown_band_2\": \"RVI - Uncertainty\",\n", + " \"unkown_band_3\": \"NDVI - Uncertainty\",\n", + " \"unkown_band_4\": \"RVI - Raw\",\n", + " \"unkown_band_5\": \"NDVI - Raw\",\n", + " }\n", + ")\n", "joined_df" ] }, @@ -708,19 +709,21 @@ ], "source": [ "plt.figure(figsize=(16, 6))\n", - "std_col_mapping = {\n", - " 'NDVI - Uncertainty': 'NDVI - Smoothed',\n", - " 'RVI - Uncertainty': 'RVI - Smoothed'\n", - "}\n", + "std_col_mapping = {\"NDVI - Uncertainty\": \"NDVI - Smoothed\", \"RVI - Uncertainty\": \"RVI - Smoothed\"}\n", "for col in sorted(joined_df.columns.values):\n", - " values = joined_df[~joined_df[col].isna()] \n", - " if 'Uncertainty' in col:\n", - " plt.fill_between(values.index, values[std_col_mapping[col]] - values[col],\n", - " values[std_col_mapping[col]] + values[col], alpha=0.2, label=col)\n", - " elif 'Raw' in col:\n", - " plt.plot(values.index.to_numpy(), values[col].to_numpy(), '-x' if 'Raw' in col else '-.', label=col)\n", + " values = joined_df[~joined_df[col].isna()]\n", + " if \"Uncertainty\" in col:\n", + " plt.fill_between(\n", + " values.index,\n", + " values[std_col_mapping[col]] - values[col],\n", + " values[std_col_mapping[col]] + values[col],\n", + " alpha=0.2,\n", + " label=col,\n", + " )\n", + " elif \"Raw\" in col:\n", + " plt.plot(values.index.to_numpy(), values[col].to_numpy(), \"-x\" if \"Raw\" in col else \"-.\", label=col)\n", " else:\n", - " plt.plot(values.index.to_numpy(), values[col].to_numpy(), '.' if 'Raw' in col else '-.', label=col)\n", + " plt.plot(values.index.to_numpy(), values[col].to_numpy(), \".\" if \"Raw\" in col else \"-.\", label=col)\n", "plt.grid(True)\n", "plt.legend()" ] diff --git a/src/fusets/openeo/__init__.py b/src/fusets/openeo/__init__.py index 24cb8e1..4100fb0 100644 --- a/src/fusets/openeo/__init__.py +++ b/src/fusets/openeo/__init__.py @@ -72,16 +72,18 @@ def load_xarray(collection_id, spatial_extent, temporal_extent, properties=None, if openeo_connection == None: openeo_connection = openeo.connect("openeo.cloud").authenticate_oidc() print(spatial_extent) - scl = openeo_connection.load_collection( - collection_id, temporal_extent=temporal_extent, bands=["SCL"] - ).filter_bbox(spatial_extent) + scl = openeo_connection.load_collection(collection_id, temporal_extent=temporal_extent, bands=["SCL"]).filter_bbox( + spatial_extent + ) cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) data = openeo_connection.load_collection( collection_id, temporal_extent=temporal_extent, bands=["B02", "B03", "B04"] ).filter_bbox(spatial_extent) diff --git a/src/fusets/openeo/services/publish_mogpr.py b/src/fusets/openeo/services/publish_mogpr.py index d0791da..b33bea4 100644 --- a/src/fusets/openeo/services/publish_mogpr.py +++ b/src/fusets/openeo/services/publish_mogpr.py @@ -29,16 +29,16 @@ def execute_udf(): temp_ext = ["2023-01-01", "2023-03-31"] # Setup NDVI cube - scl = connection.load_collection( - "SENTINEL2_L2A", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["SCL"] - ) + scl = connection.load_collection("SENTINEL2_L2A", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["SCL"]) cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) base_s2 = connection.load_collection( "SENTINEL2_L2A", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["B04", "B08"] ) diff --git a/src/fusets/openeo/services/publish_mogpr_s1_s2.py b/src/fusets/openeo/services/publish_mogpr_s1_s2.py index e43c153..c401c38 100644 --- a/src/fusets/openeo/services/publish_mogpr_s1_s2.py +++ b/src/fusets/openeo/services/publish_mogpr_s1_s2.py @@ -151,16 +151,16 @@ def _load_ndvi(connection, polygon, date): :param date: :return: """ - scl = connection.load_collection( - "SENTINEL2_L2A", spatial_extent=polygon, temporal_extent=date, bands=["SCL"] - ) + scl = connection.load_collection("SENTINEL2_L2A", spatial_extent=polygon, temporal_extent=date, bands=["SCL"]) cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) base_s2 = connection.load_collection( "SENTINEL2_L2A", spatial_extent=polygon, temporal_extent=date, bands=["B04", "B08"] ) @@ -201,10 +201,12 @@ def _load_evi(connection, polygon, date): cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) base_s2 = connection.load_collection( collection_id="SENTINEL2_L2A", spatial_extent=polygon, diff --git a/src/fusets/openeo/services/publish_phenology.py b/src/fusets/openeo/services/publish_phenology.py index a7acc94..e0b08fc 100644 --- a/src/fusets/openeo/services/publish_phenology.py +++ b/src/fusets/openeo/services/publish_phenology.py @@ -56,10 +56,12 @@ def test_udf(): cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) base = connection.load_collection( "SENTINEL2_L2A_SENTINELHUB", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["B04", "B08"] ) diff --git a/tests/conftest.py b/tests/conftest.py index e7d9607..9f3cc34 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -118,10 +118,12 @@ def wetland_sentinel2_ndvi(areas): cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) data = openeo_connection.load_collection( "SENTINEL2_L2A", temporal_extent=("2020-01-01", "2021-01-01"), bands=["B08", "B04"] ).filter_bbox(areas["wetland"]) diff --git a/tests/fusets_openeo_tests/test_performance.py b/tests/fusets_openeo_tests/test_performance.py index 2edd443..1f97bd3 100644 --- a/tests/fusets_openeo_tests/test_performance.py +++ b/tests/fusets_openeo_tests/test_performance.py @@ -50,10 +50,12 @@ def start_job(data, context: dict, **kwargs) -> openeo.BatchJob: cloud_mask = scl.process( "to_scl_dilation_mask", data=scl, - kernel1_size=17, kernel2_size=77, + kernel1_size=17, + kernel2_size=77, mask1_values=[2, 4, 5, 6, 7], mask2_values=[3, 8, 9, 10, 11], - erosion_kernel_size=3) + erosion_kernel_size=3, + ) base = connection.load_collection( "SENTINEL2_L2A", spatial_extent=aoi, diff --git a/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb b/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb index 51b4a4f..c7b256b 100644 --- a/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb +++ b/workshops/BIDS/demo/BiDS_Demo_FuseTS.ipynb @@ -257,7 +257,7 @@ "source": [ "year = 2019\n", "\n", - "with open('field.geojson', 'r') as input:\n", + "with open(\"field.geojson\", \"r\") as input:\n", " spat_ext = json.load(input)\n", " input.close()\n", "temp_ext = [f\"{year}-01-01\", f\"{year}-12-30\"]" @@ -1317,7 +1317,7 @@ "metadata": {}, "outputs": [], "source": [ - "phenology_output_file = './phenology.nc'" + "phenology_output_file = \"./phenology.nc\"" ] }, { @@ -1330,12 +1330,7 @@ "service = \"CropSAR_px\"\n", "namespace = \"vito\"\n", "cropsar_cube = connection.datacube_from_process(\n", - " service,\n", - " namespace=namespace,\n", - " geometry=spat_ext,\n", - " startdate=temp_ext[0],\n", - " enddate=temp_ext[1],\n", - " version=2\n", + " service, namespace=namespace, geometry=spat_ext, startdate=temp_ext[0], enddate=temp_ext[1], version=2\n", ")" ] }, @@ -1346,11 +1341,11 @@ "metadata": {}, "outputs": [], "source": [ - "service = 'phenology'\n", - "namespace = 'u:fusets'\n", - "phenology = connection.datacube_from_process(service,\n", - " namespace=f'https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}',\n", - " data=cropsar_cube)" + "service = \"phenology\"\n", + "namespace = \"u:fusets\"\n", + "phenology = connection.datacube_from_process(\n", + " service, namespace=f\"https://openeo.vito.be/openeo/1.1/processes/{namespace}/{service}\", data=cropsar_cube\n", + ")" ] }, { @@ -1387,13 +1382,17 @@ } ], "source": [ - "phenology_job = phenology.execute_batch(phenology_output_file, out_format=\"netcdf\",\n", - " title=f'FuseTS - CropSAR - Phenology', job_options={\n", - " 'udf-dependency-archives': [\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv',\n", - " 'https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static'\n", + "phenology_job = phenology.execute_batch(\n", + " phenology_output_file,\n", + " out_format=\"netcdf\",\n", + " title=f\"FuseTS - CropSAR - Phenology\",\n", + " job_options={\n", + " \"udf-dependency-archives\": [\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets_venv.zip#tmp/venv\",\n", + " \"https://artifactory.vgt.vito.be:443/artifactory/auxdata-public/ai4food/fusets.zip#tmp/venv_static\",\n", " ]\n", - " })" + " },\n", + ")" ] }, { @@ -1427,11 +1426,11 @@ "import math\n", "\n", "nc_file = nc.Dataset(phenology_output_file)\n", - "keys = [x for x in nc_file.variables.keys() if x not in ['phenology', 'x', 'y', 'crs']]\n", + "keys = [x for x in nc_file.variables.keys() if x not in [\"phenology\", \"x\", \"y\", \"crs\"]]\n", "keys.sort()\n", "\n", - "lat = nc_file.variables['x'][:]\n", - "lon = nc_file.variables['y'][:]\n", + "lat = nc_file.variables[\"x\"][:]\n", + "lon = nc_file.variables[\"y\"][:]\n", "\n", "ncols = 2\n", "nrows = math.ceil(len(keys) / ncols)\n", diff --git a/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb b/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb index 331ad8c..2c92209 100644 --- a/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb +++ b/workshops/BIDS/workshop/BiDS_Tutorial_FuseTS.ipynb @@ -68,13 +68,13 @@ "Requirement already satisfied: numpy==1.23.5 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (1.23.5)\n", "Requirement already satisfied: cython in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (3.0.0)\n", "\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip available: \u001B[0m\u001B[31;49m22.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m23.3.1\u001B[0m\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Processing /Users/bramjanssen/projects/vito/FuseTS\n", - " Installing build dependencies ... \u001B[?25ldone\n", - "\u001B[?25h Getting requirements to build wheel ... \u001B[?25ldone\n", - "\u001B[?25h Preparing metadata (pyproject.toml) ... \u001B[?25ldone\n", - "\u001B[?25hRequirement already satisfied: xarray>=0.20.2 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from fusets==2.0.2a1) (2023.1.0)\n", + " Installing build dependencies ... \u001b[?25ldone\n", + "\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n", + "\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n", + "\u001b[?25hRequirement already satisfied: xarray>=0.20.2 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from fusets==2.0.2a1) (2023.1.0)\n", "Requirement already satisfied: vam.whittaker==2.0.2 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from fusets==2.0.2a1) (2.0.2)\n", "Requirement already satisfied: matplotlib>=3.3.4 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from fusets==2.0.2a1) (3.7.2)\n", "Requirement already satisfied: lcmap-pyccd==2021.7.19 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from fusets==2.0.2a1) (2021.7.19)\n", @@ -111,8 +111,8 @@ "Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from scikit-learn>=0.18->lcmap-pyccd==2021.7.19->fusets==2.0.2a1) (3.2.0)\n", "Requirement already satisfied: joblib>=1.1.1 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from scikit-learn>=0.18->lcmap-pyccd==2021.7.19->fusets==2.0.2a1) (1.3.2)\n", "Building wheels for collected packages: fusets\n", - " Building wheel for fusets (pyproject.toml) ... \u001B[?25ldone\n", - "\u001B[?25h Created wheel for fusets: filename=fusets-2.0.2a1-py3-none-any.whl size=50107 sha256=388a609844113d072d217e270fe817a18c922e37692d4e695057d1019c8ea04b\n", + " Building wheel for fusets (pyproject.toml) ... \u001b[?25ldone\n", + "\u001b[?25h Created wheel for fusets: filename=fusets-2.0.2a1-py3-none-any.whl size=50107 sha256=388a609844113d072d217e270fe817a18c922e37692d4e695057d1019c8ea04b\n", " Stored in directory: /private/var/folders/50/09_2zmx12zj6ks4fdl4y9wgc0000gn/T/pip-ephem-wheel-cache-ndrdi4kc/wheels/b6/19/a9/92d4c884045c0183e2ee3ed4eee80cb741354972e677065ddb\n", "Successfully built fusets\n", "Installing collected packages: fusets\n", @@ -122,8 +122,8 @@ " Successfully uninstalled fusets-2.0.2a1\n", "Successfully installed fusets-2.0.2a1\n", "\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip available: \u001B[0m\u001B[31;49m22.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m23.3.1\u001B[0m\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Requirement already satisfied: ipyleaflet in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (0.17.3)\n", "Requirement already satisfied: dask in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (2023.5.0)\n", "Requirement already satisfied: netCDF4 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (1.6.4)\n", @@ -171,8 +171,8 @@ "Requirement already satisfied: executing>=1.2.0 in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from stack-data->ipython>=6.1.0->ipywidgets<9,>=7.6.0->ipyleaflet->-r requirements.txt (line 1)) (1.2.0)\n", "Requirement already satisfied: six in /Users/bramjanssen/projects/vito/FuseTS/venv_clean_v2/lib/python3.8/site-packages (from asttokens>=2.1.0->stack-data->ipython>=6.1.0->ipywidgets<9,>=7.6.0->ipyleaflet->-r requirements.txt (line 1)) (1.16.0)\n", "\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip available: \u001B[0m\u001B[31;49m22.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m23.3.1\u001B[0m\n", - "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n" + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" ] } ], @@ -408,15 +408,17 @@ " \"SENTINEL2_L2A\",\n", " spatial_extent=spat_ext,\n", " temporal_extent=temp_ext,\n", - " bands=[ \"SCL\"],\n", + " bands=[\"SCL\"],\n", ")\n", "cloud_mask = scl.process(\n", " \"to_scl_dilation_mask\",\n", " data=scl,\n", - " kernel1_size=17, kernel2_size=77,\n", + " kernel1_size=17,\n", + " kernel2_size=77,\n", " mask1_values=[2, 4, 5, 6, 7],\n", " mask2_values=[3, 8, 9, 10, 11],\n", - " erosion_kernel_size=3)\n", + " erosion_kernel_size=3,\n", + ")\n", "s2 = connection.load_collection(\n", " \"SENTINEL2_L2A\",\n", " spatial_extent=spat_ext,\n", @@ -41977,9 +41979,7 @@ "# the following code downloads the data, it is commented out,\n", "# since the data was prepared in advance to save time\n", "\n", - "ndvi_job = ndvi_cube.execute_batch(\n", - " ndvi_output_file, title=f\"BiDS - FUSETS - Phenology - Raw NDVI\", out_format=\"netCDF\"\n", - ")\n", + "ndvi_job = ndvi_cube.execute_batch(ndvi_output_file, title=f\"BiDS - FUSETS - Phenology - Raw NDVI\", out_format=\"netCDF\")\n", "\n", "# load the dataset and check it's structure\n", "raw_ndvi_ds = xarray.load_dataset(ndvi_output_file)\n", @@ -42194,7 +42194,7 @@ "\n", "# # Join signals\n", "mogpr_df = pd.concat(cubes_dfs, axis=1)\n", - "mogpr_df = mogpr_df.rename(columns={0: 'NDVI', 1: 'RVI_DESC', 2: 'RVI_ASC'})\n", + "mogpr_df = mogpr_df.rename(columns={0: \"NDVI\", 1: \"RVI_DESC\", 2: \"RVI_ASC\"})\n", "mogpr_df.to_csv(output_file)" ] },