<commit_before>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CNR-IREA P-SBAS Sentinel-1 processing on-demand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This tutorial describes how to submit a job for the CNR-IREA P-SBAS Sentinel-1 (S1) processing on-demand service to obtain a ground displacement time series from S1 SLAC (Level-1) data. 
P-SBAS stands for Parallel Small BAseline Subset and it is a DInSAR processing chain for the generation of Earth deformation time series and mean velocity maps
The tutorial is addressed to users already familiar with InSAR processing, analysis and products, and gives some hints and recommendation for the best service usage experience.

The provided service performs the full P-SBAS DInSAR chain from SLC data (Level 1) retrieval to displacement time series generation, upon the **Multi Temporal Analysis (MTA)** processing mode.

The main user actions are the following:

*	select the Input SAR SLC data to be processed;
*	optionally define the area of SAR data to be processed;
*	set input parameters/threshold (e.g. reference point, polarization, …) for P-SBAS DInSAR processing;
*	obtain P-SBAS DInSAR geocoded (Lat/Lon WGS84) results, such as: LOS Displacement time series; Mean LOS Velocity; Temporal Coherence; Average scatterer elevation (Topography).

As additional feature, the possibility to generate single or stack of interferograms co-registered to a single master geometry is also available, within the **Interferogram Generation (IFG)** processing mode.

Users are encouraged to use the P-SBAS DInSAR service here described for scientific purposes. 
The results (including products, maps, time series, files and everything generated by the processors) of the service are available under the `CC-BY license`_. See "Terms and Conditions" section below for more details.
Accordingly, please recognize the effort made by the authors by citing:

**<NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>. (2014) “SBAS-DInSAR Parallel Processing for Deformation Time Series Computation”, IEEE JSTARS, doi: 10.1109/JSTARS.2014.2322671**

**<NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>. (2015) “An On-Demand Web Tool for the Unsupervised Retrieval of Earth’s Surface Deformation from SAR Data: The P-SBAS Service within the ESA G-POD Environment”, Remote Sens. 2015, 7(11), 15630-15650; doi:10.3390/rs71115630**

in relevant talks, documents and publications prepared by using P-SBAS DInSAR results generated by this service.
CNR-IREA and ESA do not respond in any case for the use, interpretation, and quality of the obtained measurements.

In the following, two service runs related to the two different processing modes (MTA and IFG) are provided.

.. _`CC-BY license`: https://creativecommons.org/licenses/by/4.0/

1 Multi Temporal Analysis (MTA) Mode
==================================== 

1.1 Select the processing
-------------------------

* Sign-in on the Portal https://geohazards-tep.eo.esa.int/

* Access the "CNR IREA SBAS Ground Motion Services" Thematic App.

* Open the tab "Processing services" from the right of the map, and then select the processing service “CNR-IREA P-SBAS Sentinel-1 processing on-demand”.

.. figure:: assets/tuto_psbas_ondem_1.png
	:figclass: align-center
        :width: 750px
        :align: center


1.2 Select the files to process
-------------------------------

Input SAR data selection must be carried out with particular care, since a wrong data selection can result to an unfeasible processing.

* The algorithm accepts as inputs **IW Sentinel-1**  **SLC (level 1) data**. RAW data cannot be processed.
* It is very important that the user selects **images related to the same track only** which must be aquired with the same mode (the IW one).
* The system automatically discards duplicated (reprocessed) images and correctly mosaicks SAR data belonging to different “portions” (slices) of the same strip. In case of reprocessed (duplicated) images the newest one is selected.
* **Note that to obtain reliable displacement measurements and to avoid processing failures, it is strongly suggested to select a number of epochs greater then 20 in the case of time series generation mode**.

For this tutorial, a `pre-defined data set`_ has been prepared to speed up the data selection step .

.. _`pre-defined data set`: https://geohazards-tep-ref.terradue.com/t2api/share?url=https%3A%2F%2Fgeohazards-tep-ref.terradue.com%2Ft2api%2Fdata%2Fpackage%2Fsearch%3Fid%3DNapoliS1T222017&id=insarquake

* Browse the Data Packages looking for *Napoli S1 T22 2017* package and click on the load button to upload it.

.. figure:: assets/tuto_psbas_ondem_2.png
	:figclass: align-center
        :width: 750px
        :align: center


* Surf the map to the Napoli (Italy) Area of Interest: the browser page should appear as depicted in the next figure.

.. figure:: assets/tuto_psbas_ondem_3.png
	:figclass: align-center
        :width: 750px
        :align: center

        
* Set the *Job Title* with a meaningful name (e.g. *CNR-IREA P-SBAS S1 Napoli T22 2017 - v1.0.9*) and push the *sel. all* button in the Feature Basket. 
      
.. figure:: assets/tuto_psbas_ondem_4.png
	:figclass: align-center
        :width: 750px
        :align: center

                
* Drag all the selected data and drop them within the *Sentinel-1 input SLCs* field on the right panel.                
                
.. figure:: assets/tuto_psbas_ondem_5.png
	:figclass: align-center
        :width: 750px
        :align: center                

        
1.3 Fill the parameter values
-----------------------------

* Fill the parameters according to the following figure:

.. figure:: assets/tuto_psbas_ondem_6.png
	:figclass: align-center
        :width: 750px
        :align: center


In particular:

* As *Latitude of the Reference Point*, type:

.. code-block:: sbas-parameter
  
  40.848

* As *Longitude of the Reference Point*, type:

.. code-block:: sbas-parameter
  
  14.262
 
.. note:: *Latitude of the Reference Point* and *Longitude of the Reference Point* are the Latitude and Longitude coordinates (in decimal degrees) of the **reference point** for the P-SBAS DInSAR measurement. It should be located in a stable area or its deformation behaviour shall be known. In any case, the user shall verify that input Latitude and Longitude coordinates are on **land** and included **within the selected Area of Interest** (if any). As a suggestion, urbanized areas are usually well suitable to locate the reference point. The *Magic Wand* button can be used to automatically fill these fields with the coordinate values of a Marker placed on the map.


* Leave the *Bounding Box* untouched (Area of Interest empty). 

.. note:: If set, the system automatically processes the identified AoI. Format: LL-Lon, LL-Lat, UR-Lon, UR-Lat. The *Magic Wand* button can be used to automatically fill this field with the bounding coordinate values of a rectangle drawn on the map. Different slices covering the AoI are automatically merged. It is recommended to avoid processing very small areas to allow the system to correctly estimate the co-registration shifts needed by the TOPS mode. The suggested smallest area spans at least 4 S1 bursts, which approximately corresponds to about 80 km along azimuth.

 
* As *Polarization* type:

.. code-block:: sbas-parameter

  vv

.. note:: Possible values are: *vv*, *vh*, *hv*, *hh*. The user shall select the correct polarization according to the selected SLC input data. Default value is *vv*, being the default S1 polarization for data acquired over land.

* As *Processing Mode*, select:

.. code-block:: sbas-parameter
  
	MTA
        
.. note:: Possible values: *MTA* (Multi-Temporal Analysis); *IFG* (Interferogram Generation). Default value is *MTA*. For *IFG* description see Section 2__.

__ `2 Interferogram Generation (IFG) Mode`_

* As *DEM*, select:

.. code-block:: sbas-parameter
  
	srtm_1<commit_msg>A few changes of P-SBAS tutorial<commit_after>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CNR-IREA P-SBAS Sentinel-1 processing on-demand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This tutorial describes how to submit a job for the CNR-IREA P-SBAS Sentinel-1 (S1) processing on-demand service to obtain a ground displacement time series from S1 SLAC (Level-1) data. 
P-SBAS stands for Parallel Small BAseline Subset and it is a DInSAR processing chain for the generation of Earth deformation time series and mean velocity maps
The tutorial is addressed to users already familiar with InSAR processing, analysis and products, and gives some hints and recommendation for the best service usage experience.

The provided service performs the full P-SBAS DInSAR chain from SLC data (Level 1) retrieval to displacement time series generation, upon the **Multi Temporal Analysis (MTA)** processing mode.

The main user actions are the following:

*	select the Input SAR SLC data to be processed;
*	optionally define the area of SAR data to be processed;
*	set input parameters/threshold (e.g. reference point, polarization, …) for P-SBAS DInSAR processing;
*	obtain P-SBAS DInSAR geocoded (Lat/Lon WGS84) results, such as: LOS Displacement time series; Mean LOS Velocity; Temporal Coherence; Average scatterer elevation (Topography).

As additional feature, the possibility to generate single or stack of interferograms co-registered to a single master geometry is also available, within the **Interferogram Generation (IFG)** processing mode.

Users are encouraged to use the P-SBAS DInSAR service here described for scientific purposes. 
The results (including products, maps, time series, files and everything generated by the processors) of the service are available under the `CC-BY license`_. See "Terms and Conditions" section below for more details.
Accordingly, please recognize the effort made by the authors by citing:

**<NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>. (2014) “SBAS-DInSAR Parallel Processing for Deformation Time Series Computation”, IEEE JSTARS, doi: 10.1109/JSTARS.2014.2322671**

**<NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>. (2015) “An On-Demand Web Tool for the Unsupervised Retrieval of Earth’s Surface Deformation from SAR Data: The P-SBAS Service within the ESA G-POD Environment”, Remote Sens. 2015, 7(11), 15630-15650; doi:10.3390/rs71115630**

in relevant talks, documents and publications prepared by using P-SBAS DInSAR results generated by this service.
CNR-IREA and ESA do not respond in any case for the use, interpretation, and quality of the obtained measurements.

In the following, two service runs related to the two different processing modes (MTA and IFG) are provided.

.. _`CC-BY license`: https://creativecommons.org/licenses/by/4.0/

1 Multi Temporal Analysis (MTA) Mode
==================================== 

1.1 Select the processing
-------------------------

* Sign-in on the Portal https://geohazards-tep.eo.esa.int/

* Access the "CNR IREA SBAS Ground Motion Services" Thematic App.

* Open the tab "Processing services" from the right of the map, and then select the processing service “CNR-IREA P-SBAS Sentinel-1 processing on-demand”.

.. figure:: assets/tuto_psbas_ondem_1.png
	:figclass: align-center
        :width: 750px
        :align: center


1.2 Select the files to process
-------------------------------

Input SAR data selection must be carried out with particular care, since a wrong data selection can result to an unfeasible processing.

* The algorithm accepts as inputs **IW Sentinel-1**  **SLC (level 1) data**. RAW data cannot be processed.
* It is very important that the user selects **images related to the same track only** which must be aquired with the same mode (the IW one).
* The system automatically discards duplicated (reprocessed) images and correctly mosaicks SAR data belonging to different “portions” (slices) of the same strip. In case of reprocessed (duplicated) images the newest one is selected.
* **Note that to obtain reliable displacement measurements and to avoid processing failures, it is strongly suggested to select a number of epochs greater then 20 in the case of time series generation mode**.

For this tutorial, a `pre-defined data set`_ has been prepared to speed up the data selection step .

.. _`pre-defined data set`: https://geohazards-tep-ref.terradue.com/t2api/share?url=https%3A%2F%2Fgeohazards-tep-ref.terradue.com%2Ft2api%2Fdata%2Fpackage%2Fsearch%3Fid%3DNapoliS1T222017&id=insarquake

* Browse the Data Packages looking for *Napoli S1 T22 2017* package and click on the load button to upload it.

.. figure:: assets/tuto_psbas_ondem_2.png
	:figclass: align-center
        :width: 750px
        :align: center


* Surf the map to the Napoli (Italy) Area of Interest: the browser page should appear as depicted in the next figure.

.. figure:: assets/tuto_psbas_ondem_3.png
	:figclass: align-center
        :width: 750px
        :align: center

        
* Set the *Job Title* with a meaningful name (e.g. *CNR-IREA P-SBAS S1 Napoli T22 2017 - v1.0.9*) and push the *sel. all* button in the Feature Basket. 
      
.. figure:: assets/tuto_psbas_ondem_4.png
	:figclass: align-center
        :width: 750px
        :align: center

                
* Drag all the selected data and drop them within the *Sentinel-1 input SLCs* field on the right panel.                
                
.. figure:: assets/tuto_psbas_ondem_5.png
	:figclass: align-center
        :width: 750px
        :align: center                

        
1.3 Fill the parameter values
-----------------------------

* Fill the parameters according to the following figure:

.. figure:: assets/tuto_psbas_ondem_6.png
	:figclass: align-center
        :width: 750px
        :align: center


In particular:

* As *Latitude of the Reference Point*, type:

.. code-block:: sbas-parameter
  
  40.848

* As *Longitude of the Reference Point*, type:

.. code-block:: sbas-parameter
  
  14.262
 
.. note:: *Latitude of the Reference Point* and *Longitude of the Reference Point* are the Latitude and Longitude coordinates (in decimal degrees) of the **reference point** for the P-SBAS DInSAR measurement. It should be located in a stable area or its deformation behaviour shall be known. In any case, the user shall verify that input Latitude and Longitude coordinates are on **land** and included **within the selected Area of Interest** (if any). As a suggestion, urbanized areas are usually well suitable to locate the reference point. The *Magic Wand* button can be used to automatically fill these fields with the coordinate values of a Marker placed on the map.


* Leave the *Bounding Box* untouched (Area of Interest empty). 

.. note:: If set, the system automatically processes the identified AoI. Format: LL-Lon, LL-Lat, UR-Lon, UR-Lat. The *Magic Wand* button can be used to automatically fill this field with the bounding coordinate values of a rectangle drawn on the map. Different slices covering the AoI are automatically merged. It is recommended to avoid processing very small areas to allow the system to correctly estimate the co-registration shifts needed by the TOPS mode. The suggested smallest area spans at least 4 S1 bursts, which approximately corresponds to about 80 km along azimuth.

 
* As *Polarization* type:

.. code-block:: sbas-parameter

  vv

.. note:: Possible values are: *vv*, *vh*, *hv*, *hh*. The user shall select the correct polarization according to the selected SLC input data. Default value is *vv*, being the default S1 polarization for data acquired over land.

* As *Processing Mode*, select:

.. code-block:: sbas-parameter
  
	MTA
        
.. note:: Possible values: *MTA* (Multi-Temporal Analysis); *IFG* (Interferogram Generation). Default value is *MTA*. For *IFG* description see Section 2_.

.. _2: `2 Interferogram Generation (IFG) Mode`_

* As *DEM*, select:

.. code-block:: sbas-parameter
  
	srtm_1
{'fraction_non_alphanumeric': 0.1025994362668337, 'fraction_numerical': 0.019605386783589102, 'mean_word_length': 3.803249097472924, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2954443', 'n_tokens_mistral': 4732, 'n_tokens_neox': 4361, 'n_words': 2070}