Skip to content

Commit

Permalink
Doc review (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfguerrerom authored Nov 16, 2023
2 parents 30e73d8 + 0c7448e commit 93512ff
Show file tree
Hide file tree
Showing 16 changed files with 678 additions and 649 deletions.
91 changes: 46 additions & 45 deletions docs/source/cookbook/ccdc.rst

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions docs/source/cookbook/ccdc_slice.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CCDC slice
==========
*Create CCDC slices out of CCDC assets*

Background
----------
Expand All @@ -22,7 +23,7 @@ Once logged into the SEPAL interface, open the **Recipe** menu by selecting the

.. thumbnail:: ../_images/cookbook/ccdc_slice/recipe_selection.png
:group: recipe-ccdc-slice
:title: Selection menu for SEPAL recipes
:title: **Selection menu** for **SEPAL recipes**
:width: 60%
:align: center

Expand Down Expand Up @@ -52,9 +53,9 @@ The following steps describe parameter selection, which can be found in the lowe

The buttons open the following dialogues:

- :guilabel:`SRC` Selection of CCDC asset source
- :guilabel:`DAT` Date or date range selection
- :guilabel:`OPT` CCDC slicing parameters
- :guilabel:`SRC`: Selection of CCDC asset source
- :guilabel:`DAT`: Date or date range selection
- :guilabel:`OPT`: CCDC slicing parameters


Selection of CCDC asset source
Expand All @@ -64,8 +65,8 @@ CCDC slices are created out of CCDC assets. Here you have the choice to select t

Two options are provided:

- Option 1 is to directly point to an existing SEPAL recipe. Note that in this case, the CCDC asset needs to be regenerated on the fly based on the parameter settings of the CCDC asset. In most cases this is computationally demanding and may lead to time-out errors. Therefore, it is rather recommended to opt for Option 2.
- Option 2 is where an existing CCDC asset is selected from GEE. In this case, the CCDC asset needs to be exported first, so you can point to its location within GEE directly. This usually allows for instant visualization, as the slicing procedure does not require lots of computing power.
- **Option 1** is to directly point to an existing SEPAL recipe. Note that in this case, the CCDC asset needs to be regenerated on the fly based on the parameter settings of the CCDC asset. In most cases, this is computationally demanding and may lead to timeout errors. Therefore, it is recommended to opt for Option 2.
- **Option 2** is where an existing CCDC asset is selected from GEE. In this case, the CCDC asset needs to be exported first, so you can point to its location within GEE directly. This usually allows for instant visualization, as the slicing procedure does not require much computing power.

Date (range) selection
^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -84,20 +85,20 @@ CCDC slicing parameters
Specific date
"""""""""""""

In case a single date has been selected, the **Slicing parameters** will appear as shown in the following figure.
In case a single date has been selected, the **Slicing parameters** will appear, as shown in the following figure.

.. thumbnail:: ../_images/cookbook/ccdc_slice/ccdc_slice_date_parameters.png
:group: recipe-ccdc-slice
:title: Selection menu for CCDC slicing parameters
:title: **Selection menu** for **CCDC slicing parameters**
:align: center

The first parameter is the number of **Harmonics** used to extract the modelled reflectance at the given point in time. Three harmonic terms are set by default. Lowering this number will result in a smooth time series that does not depict intra-annual periodicity. Setting this value to 1 will only capture the inter-annual periodicity (i.e. annual seasonality), while a value of 0 results in the mean value over the segment's time period.

The **Gap strategy** relates to the presence of gaps between two temporal segments (i.e. the presence of a break). After a detected break, CCDC reinitializes a new model (i.e. new segment) only after a couple of observations. In between, no model is available from which to extract the data. In order to avoid masked pixels, the user has the possibility to:

- :btn:`Interpolate` Use a temporally weighted mean between the previous and subsequent model for the given data.
- :btn:`Extrapolate`Use the extrapolated value of the closest, previous, or next model for the given data.
- :btn:`Mask`Mask the value as *no data*.
- :btn:`Interpolate`: Use a temporally weighted mean between the previous and subsequent model for the given data.
- :btn:`Extrapolate`: Use the extrapolated value of the closest, previous or next model for the given data.
- :btn:`Mask`: Mask the value as *No data*.

In case of extrapolation, the additional option, **Segment to extrapolate**, allows you to choose either the model parameters from the previous, next or closest segment with respect to the selected data. Furthermore, the **Max days to extrapolate** setting allows you to limit the number of days until this procedure is considered valid. If the difference between the selected date and the segment's valid time period is greater than this threshold value, the pixel will be automatically masked.

Expand All @@ -108,7 +109,7 @@ In case a date range has been selected, the **Slicing parameters** will appear a

.. thumbnail:: ../_images/cookbook/ccdc_slice/ccdc_slice_date_range_parameters.png
:group: recipe-ccdc-slice
:title: Selection menu for CCDC slice parameters – date range
:title: **Selection menu** for **CCDC slice parameters – date range**
:align: center

The first parameter is the number of **Harmonics** used to extract the modelled reflectance at the given point in time. Three harmonic terms are set by default. Lowering this number will result in a smooth time series that does not depict intra-annual periodicity. Setting this value to 1 will only capture the inter-annual periodicity (i.e. annual seasonality), while a value of 0 results in the mean value over the segment's time period.
Expand All @@ -122,7 +123,7 @@ SEPAL offers four ways of selecting the remaining break:
- :guilabel:`First`: The first break within the **Slice date** range.
- :guilabel:`Last`: The last break within the **Slice date** range.
- :guilabel:`Magnitude`: The break with the highest magnitude of change.
- :guilabel:`Confidence`: The break with the highest confidence value (see :doc:`ccdc` for more information about confidence computation).
- :guilabel:`Confidence`: The break with the highest confidence value (for more information about confidence computation, see :doc:`ccdc`).

By selecting a specific break direction, the break selection will only take into acount the break with a :guilabel:`decrease` or :guilabel:`increase` magnitude. By default, we consider :guilabel:`Any` break direction.

Expand All @@ -131,23 +132,23 @@ By moving the slider, you will ignore the break with a low confidence from the a
Visualization
-------------

Select the :btn:`<fa-solid fa-chart-area>` button to start the plotting tool (1).
Select the :btn:`<fa-solid fa-chart-area>` button to start the plotting tool (**1**).

Move the pointer to the main map; the pointer will be transformed into :icon:`fa-solid fa-plus`.

Click anywhere in the AOI to plot data for this specific location in the pop-up window that appears.

The plotting area (3) is the same as the one presented in the CCDC recipe with small adjustments to the slicing operation. Refer to :doc:`ccdc` for a complete description.
The plotting area (**3**) is the same as the one presented in the CCDC recipe with small adjustments to the slicing operation. Refer to :doc:`ccdc` for a complete description.

The plotting area covers all of the CCDC asset range (4); the user will see the slice in red (it will be a sector of the plot if a date range is selected and a red line if a single date is selected).
The plotting area covers all of the CCDC asset range (**4**); the user will see the slice in red (it will be a sector of the plot if a date range is selected and a red line if a single date is selected).

.. thumbnail:: ../_images/cookbook/ccdc_slice/pixel_analysis.png
:title: Pixel analysis of a date range slice of a CCDC asset
:group: recipe-ccdc-slice

.. attention::

The plot feature is retrieving information from GEE on the fly and serving it in an interactive window. This operation can take time, depending on the number of available observations and the complexity of the selected preprocessing parameters. If the pop-up window displays a spinning wheel, wait up to two minutes to see the data displayed.
The plot feature is retrieving information from GEE on the fly and serving it in an interactive window. This operation can take time, depending on the number of available observations and the complexity of the selected pre-processing parameters. If the pop-up window displays a spinning wheel, wait up to two minutes to see the data displayed.

Export
------
Expand Down
47 changes: 25 additions & 22 deletions docs/source/cookbook/class_change.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class change
============
*Build a class change map between two categorical maps that share the same legend with the Class change recipe*

Overview
--------

Often, we want to build the class change map between two categorical maps that share the same legend. If the two images are taken at different times, it will help us understand how the vegetation classification has evolved between these two dates. It can be tedious to build the new legend (forest -> forest, forest -> urban, etc.) and manually write the rules to identify each class. SEPAL will automatically build the legend of the resulting categorical map from the initial legend and compute all pixels automatically.
Often, we want to build the class change map between two categorical maps that share the same legend. If the two images are taken at different times, this can help us understand how the vegetation classification has evolved between two dates. It can be tedious to build the new legend (forest -> forest, forest -> urban, etc.) and manually write the rules to identify each class. SEPAL will automatically build the legend of the resulting categorical map from the initial legend and compute all pixels automatically.

.. note::

Expand All @@ -13,15 +14,15 @@ Often, we want to build the class change map between two categorical maps that s
Start
-----

Once the class change recipe is selected, SEPAL will present the **Process** in a new tab (1).
Once the **Class change** recipe is selected, SEPAL will present the **Process** in a new tab (see **1** in figure below).

The **Parameters** will open in the lower-right side of your screen (2).
**Parameters** will open in the lower-right side of your screen (2).

.. thumbnail:: ../_images/cookbook/class_change/landing.png
:group: recipe_class_change
:title: The landing page of the class change recipe.
:title: The landing page of the **Class change** recipe.

The first step is to change the name of the recipe. This name will be used to name your files and recipes in SEPAL folders. Use the best-suited convention for your need. Simply double-click the tab and enter a new name (it will default to :code:`Class_change_<now>`).
The first step is to change the name of the recipe. This name will be used to name your files and recipes in **SEPAL folders**. Use the best-suited convention for your need. Simply double-click the tab and enter a new name (it will default to :code:`Class_change_<now>`).

.. thumbnail:: ../_images/cookbook/class_change/default_title.png
:title: Class change default title
Expand All @@ -36,14 +37,14 @@ Parameters

In the lower-right corner, the following four tabs are available, allowing users to customize the class change to their needs:

- :guilabel:`FRM`: The source categorical image.
- :guilabel:`TO`: The destination categorical image.
- :guilabel:`LEG`: The legend of the transition classes.
- :guilabel:`OPT`: The optional parameters of the recipe.
- :guilabel:`FRM`: the source categorical image
- :guilabel:`TO`: the destination categorical image
- :guilabel:`LEG`: the legend of the transition classes
- :guilabel:`OPT`: the optional parameters of the recipe

.. thumbnail:: ../_images/cookbook/class_change/parameters.png
:group: recipe_class_change
:title: The four tabs to set up SEPAL class change recipe
:title: The four tabs to set up SEPAL **Class change** recipe

Select images
^^^^^^^^^^^^^
Expand All @@ -52,17 +53,19 @@ The first step is to select the two images to compare. Since :guilabel:`FRM` and

Select a categorical image, which can be a classification recipe or any categorical asset from your Google Earth Engine (GEE) account. In both cases, you'll need to select the band to use for the transition and the legend.

If the selected asset/recipe is a classification recipe (or its export), the legend will be automatically generated with the metadata of the file. If it's not, you'll need to upload it manually. Select :btn:`fa-solid fa-pen-to-square` to open the **Legend editing** tool. It's the same as the one described in the classification recipe (see :doc:`classification`).
If the selected asset/recipe is a **Classification** recipe (or its export), the legend will be automatically generated with the metadata of the file. If it's not, you'll need to upload it manually.

Select :btn:`fa-solid fa-pen-to-square` to open the **Legend editing** tool. It's the same as the one described in the **Classification** recipe (see :doc:`classification`).

.. thumbnail:: ../_images/cookbook/class_change/from.png
:group: recipe_class_change
:width: 49%
:title: The **from** image selection (in this example, a classification recipe forest/non-forest for the year 2020)
:title: The **from** image selection (in this example, a **Classification** recipe forest/non-forest [FNF] for the year 2020)

.. thumbnail:: ../_images/cookbook/class_change/to.png
:group: recipe_class_change
:width: 49%
:title: The **to** image selection (in this example, a classification recipe forest/non-forest for the year 2021)
:title: The **to** image selection (in this example, a **Classification** recipe forest/non-forest [FNF] for the year 2021)

Customize legend
^^^^^^^^^^^^^^^^
Expand All @@ -82,7 +85,7 @@ Options

If the selected asset is from a SEPAL classification, it will embed a probability value for each classified pixel. SEPAL will propose clever map transitioning based on these values.

For example, a high-confidence forest pixel changes into a low-confidence non-forest piexl. The change will be taken into account only if the minimum confidence is reached by the **to** pixel. By default, no filtering is performed and the slider is set to 0.
For example, a high-confidence forest pixel changes into a low-confidence non-forest pixel. The change will be taken into account only if the minimum confidence is reached by the **to** pixel. By default, no filtering is performed and the slider is set to 0.

.. note::

Expand All @@ -102,17 +105,17 @@ Export

You cannot export a recipe as an asset or a :code:`.tiff` file without a small computation quota (if you are a new user, see :doc:`../setup/resource`).

Select the :icon:`fa-solid fa-cloud-arrow-down` tab to open the **Retrieve** panel, where you can select the **Exportation parameters**.
Select the :icon:`fa-solid fa-cloud-arrow-down` tab to open the **Retrieve** pane, where you can select the **Exportation parameters**.

.. thumbnail:: ../_images/cookbook/class_change/export.png
:title: the last panel of the class change recipe: the exportation
:title: The last pane of the **Class change** recipe: the exportation
:group: recipe_class_change


Bands
"""""

You need to select the band to export in the recipe. You will have access to :guilabel:`transition` (the new class change values) and :guilabel:`confidence`, if you selected **Classification recipe assets**.
Select the band to export in the recipe. You will have access to :guilabel:`transition` (the new class change values) and :guilabel:`confidence`, if you selected **Classification recipe assets**.

Scale
"""""
Expand All @@ -122,18 +125,18 @@ You can set a custom scale for exportation by changing the value of the slider (
Destination
"""""""""""

You can export the image to :guilabel:`SEPAL workspace` or to :guilabel:`GEE asset`. The same image will be exported, but in the first case you will find it in :code:`.tif` format in the :code:`Downloads` folder; in the second case, the image will be exported to your GEE account **Asset** list.
You can export the image to :guilabel:`SEPAL workspace` or to :guilabel:`GEE asset`. The same image will be exported, but in the first case, you will find it in :code:`.tif` format in the :code:`Downloads` folder; in the second case, the image will be exported to your GEE account **Asset** list.

.. attention::

If :guilabel:`GEE asset` is not displayed, it means that your GEE account is not connected to your SEPAL account (see :doc:`../setup/gee`).
If :guilabel:`GEE asset` is not displayed, your GEE account is not connected to your SEPAL account (see :doc:`../setup/gee`).

Select :guilabel:`apply` to start the download process.

Exportation status
""""""""""""""""""

In the **Task** tab (lower-left corner using the :icon:`fa-solid fa-list-check` or :icon:`fa-solid fa-spinner` buttons, depending on the loading status), you will see the list of different loading tasks. The interface will provide you with information about the task progress and display an error if the exportation has failed.
In the **Tasks** tab (lower-left corner using the :icon:`fa-solid fa-list-check` or :icon:`fa-solid fa-spinner` buttons, depending on the loading status), you will see the list of different loading tasks. The interface will provide you with information about the task progress and display an error if the exportation has failed.

If you are unsatisfied with the way we present information, the task can also be monitored using the `GEE task manager <https://code.earthengine.google.com/tasks>`__.

Expand All @@ -145,10 +148,10 @@ When the task is finished, the frame will be displayed in green (see the second

.. thumbnail:: ../_images/cookbook/class_change/download.png
:width: 49%
:title: Evolution of the downloading process of the recipe displayed in the task manager of SEPAL
:title: Evolution of the downloading process of the recipe displayed in the **Task manager** of SEPAL
:group: recipe_class_change

.. thumbnail:: ../_images/cookbook/class_change/download_complete.png
:width: 49%
:title: Completed downloading process of the recipe displayed in the task manager of SEPAL
:title: Completed downloading process of the recipe displayed in the **Task manager** of SEPAL
:group: recipe_class_change
Loading

0 comments on commit 93512ff

Please sign in to comment.