<?xml version="1.0" encoding="UTF-8"?>
<alos2burstApp>
  <component name="alos2burstinsar">


    <!--Note that, in ScanSAR-stripmap interferometry, ScanSAR must be reference! see section
    2. SET PARAMETERS in 'alos2_tutorial.txt' to determine if you are doing ScanSAR-stripmap
    interferometry-->
    <property name="reference directory">../../../z_common_data/insarzd_test_dataset/gorkha/d048/150405</property>
    <property name="secondary directory">../../../z_common_data/insarzd_test_dataset/gorkha/d048/150503</property>
    <!--Normally no need to set frame numbers, but if reference and secondary frames do not meet the following
    one-to-one correspondence, you need to set frame numbers here. See instructions below on how to find
    and set frame numbers.

    Reference Data Folder               Secondary Data Folder
       Frame ****     .............     Frame ****
       Frame ****     .............     Frame ****
       Frame ****     .............     Frame ****
       Frame ****     .............     Frame ****
    -->
    <property name="reference frames">[3055]</property>
    <property name="secondary frames">[3055]</property>

    <!--optional, see instructions below on how to get DEM and water body. If you only process one
    interferogram, you can choose not to set these and the program will download them for you. If you
    process a stack of interferograms, it's better to set these so that the program won't download them
    multiple times. -->
    <property name="dem for coregistration">../../../z_common_data/insarzd_test_dataset/gorkha/dem/demLat_N22_N33_Lon_E078_E092.dem.wgs84</property>
    <property name="dem for geocoding">../../../z_common_data/insarzd_test_dataset/gorkha/dem/3/demLat_N22_N33_Lon_E078_E092.dem.wgs84</property>
    <property name="water body">/net/kraken/nobak/cunrenl/z_common_data/insarzd_test_dataset/gorkha/wbd/swbdLat_N22_N33_Lon_E078_E092.wbd</property>






<!--=====================================================================================================
                                    instructions for alos2App.py/alos2burstApp.py

This is the input file of alos2App.py/alos2burstApp.py. Below are all parameters users can set.
Instructions on how to set these parameters are also provided. Parameter default values are shown in the
brackets. Remove the first four characters and the last three characters in a parameter line to set a
parameter value.

For the techinques and algorithms implemented in the software, refer to:

1. ScanSAR or multi-mode InSAR processing
C. Liang and E. J. Fielding, "Interferometry with ALOS-2 full-aperture ScanSAR data,"
IEEE Transactions on Geoscience and Remote Sensing, vol. 55, no. 5, pp. 2739-2750, May 2017.

2. Ionospheric correction, burst-by-burst ScanSAR processing, and burst-mode spectral diversity (SD) or
multi-aperture InSAR (MAI) processing
C. Liang and E. J. Fielding, "Measuring azimuth deformation with L-band ALOS-2 ScanSAR interferometry,"
IEEE Transactions on Geoscience and Remote Sensing, vol. 55, no. 5, pp. 2725-2738, May 2017.

3. Ionospheric correction
C. Liang, Z. Liu, E. J. Fielding, and R. Bürgmann, "InSAR time series analysis of L-band wide-swath SAR
data acquired by ALOS-2,"
IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-4506, Aug. 2018.
======================================================================================================-->


    <!--Note that, in ScanSAR-stripmap interferometry, ScanSAR must be reference!-->
    <!--<property name="reference directory">None</property>-->
    <!--<property name="secondary directory">None</property>-->

    <!--=========================================================================================
    This is a list of frames, e.g., [0680, 0690]. Here is how you can find frame number. Below
    is a JAXA SLC product
    0000168233_001001_ALOS2183010690-171012.zip
    After you unpack the JAXA SLC product, you will find an image file like:
    IMG-HH-ALOS2183010685-171012-FBDR1.1__A
                     ^^^^
    The number 0685 (indicated by ^) is the frame number. DON'T use the frame number in the zip
    file name, as it may be incorrect (like the above example).
    ==========================================================================================-->
    <!--<property name="referenceFrames">None</property>-->
    <!--<property name="secondary frames">None</property>-->
    <!--<property name="reference polarization">HH</property>-->
    <!--<property name="secondary polarization">HH</property>-->


    <!--<property name="starting swath">None</property>-->
    <!--<property name="ending swath">None</property>-->




    <!--=========================================================================================
    DEM and water body will be automatically downloaded if not specified. If you want to process
    multiple pairs over one area, we recommend downloading your own dem using to avoid download
    it multiple times. Here is how you can download a DEM and water body.
    #3 arcsec for geocoding
    mkdir dem_3_arcsec
    cd dem_3_arcsec
    dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11
    fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
    rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
    cd ../

    #1 arcsec for creating differential interferogram
    mkdir dem_1_arcsec
    cd dem_1_arcsec
    dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11
    fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
    rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
    cd ../

    #water body
    #do correct missing water body tiles problem here!!! check usage of wbd.py for more details,
    #or simply follow the commands below
    mkdir wbd_1_arcsec
    cd wbd_1_arcsec
    wbd.py 29 37 125 133
    fixImageXml.py -i swbdLat_*_*_Lon_*_*.wbd -f
    cd ../
    ==========================================================================================-->
    <!--<property name="dem for coregistration">None</property>-->
    <!--<property name="dem for geocoding">None</property>-->

    <!--=========================================================================================
    this water body is used to create water body in radar coordinate used in processing.
    radar-coordinate water body is created four times in runRdr2Geo.py, runLook.py, runIonUwrap.py
    and runLookSd.py, respectively. radar-coordinate water body is used in:
    (1) determining the number of offsets in slc offset estimation, and radar/dem offset
        estimation
    (2) masking filtered interferogram or unwrapped interferogram
    (3) masking filtered interferogram or unwrapped interferogram in sd processing
    (4) mask coherence in ionosphere fitting and filtering
    ==========================================================================================-->
    <!--<property name="water body">None</property>-->


    <!--<property name="use virtual file">True</property>-->
    <!--<property name="use GPU">False</property>-->


    <!--=========================================================================================
    always remove unsynchronized signal, since no extra computation required, and it does
    improve coherence (example: indonesia_sep_2018/d25r/180927-181011_burst_3subswaths)
    ==========================================================================================-->
    <!--<property name="burst synchronization threshold">100.0</property>-->


    <!--=========================================================================================
    This is for determining the number of offsets to be estimated between reference and secondary SLCs.
    for areas where no water body data available, turn this off, otherwise the program will use
    geometrical offset, which is not accuate enough. If it still does not work, set
    "number of range offsets for slc matching" and "number of azimuth offsets for slc matching"
    ==========================================================================================-->
    <!--<property name="use water body to dertermine number of matching offsets">True</property>-->

    <!--=========================================================================================
    These are 2-D lists, with frame as the first dimension and swath as the second dimension.
    For example, if you want to process two frames and three swaths, you can specify one of
    these parameters as:
    [[20, 30, 20],[15, 20, 20]]
    ==========================================================================================-->
    <!--<property name="number of range offsets for slc matching">None</property>-->
    <!--<property name="number of azimuth offsets for slc matching">None</property>-->


<!--============================================================================================================================================
Instructions on number of looks used by the software
In alos2burstApp.py, number of range/azimuth looks 1 is always 1. Usually there is no need to set number of range/azimuth looks sim
(automatically set).

total number of looks of InSAR processing is:       number of range/azimuth looks 1 * number of range/azimuth looks 2
total number of looks in ionosphere estimation is:  number of range/azimuth looks 1 * number of range/azimuth looks ion
total number of looks in radar/DEM matching is:     number of range/azimuth looks 1 * number of range/azimuth looks sim
total number of looks of SD processing is:          number of range/azimuth looks 1 * number of range/azimuth looks sd

Below is the default number of looks used by the software. REMEMBER, NORMALLY YOU ONLY NEED TO CHANGE number of range/azimuth looks 2
AND number of range/azimuth looks sd!!!

==================================================================================================================
 Operation Mode | Mode (AUIG2) | Mode (in file name) | look1 (r*a) | look2 (r*a) | look_ion (r*a) | look_sd (r*a)
==================================================================================================================
   ScanSAR      |     WD1      | WBS, WBD, WWS, WWD  |     1*1     |     7*2     |     42*12      |      14*4
==================================================================================================================

To find the acquisition mode code, check the unpacked ALOS-2 product. For example, in the following
file name

IMG-HH-ALOS2183010685-171012-FBDR1.1__A
                             ^^^
FBD (indicated by ^) is the acquisition mode code.
=============================================================================================================================================-->

    <!--=========================================================================================
    These are the numbers of looks to be taken when forming the interferogram.
    these two parameters are always 1, not to be set by users
    ==========================================================================================-->
    <!--<property name="number of range looks 1">None</property>-->
    <!--<property name="number of azimuth looks 1">None</property>-->


    <!--=========================================================================================
    These are the numbers of looks to be taken after taking the numbers of range/azimuth looks 1
    ==========================================================================================-->
    <!--<property name="number of range looks 2">None</property>-->
    <!--<property name="number of azimuth looks 2">None</property>-->


    <!--=========================================================================================
    These are the numbers of looks to be taken after taking the numbers of range/azimuth looks 1.
    This is for matching the radar image and DEM
    ==========================================================================================-->
    <!--<property name="number of range looks sim">None</property>-->
    <!--<property name="number of azimuth looks sim">None</property>-->


    <!--<property name="do matching when computing adjacent swath offset">True</property>-->
    <!--<property name="do matching when computing adjacent frame offset">True</property>-->


    <!--=========================================================================================
    These are interferogram filtering parameters
    ==========================================================================================-->
    <!--<property name="interferogram filter strength">0.3</property>-->
    <!--<property name="filterWinsize">32</property>-->
    <!--<property name="interferogram filter step size">4</property>-->
    <!--<property name="remove magnitude before filtering">True</property>-->


    <!--=========================================================================================
    water body mask starting step: None, filt, unwrap
    ==========================================================================================-->
    <!--<property name="water body mask starting step">unwrap</property>-->


    <!--=========================================================================================
    This is a list of files to be geocoded
    Wild card such as * is accepted, e.g. filt_*-*_5rlks_28alks.unw.conncomp
    ==========================================================================================-->
    <!--<property name="geocode file list">None</property>-->

    <!--=========================================================================================
    This is a four-element list [s, n, w, e], e.g. [26.24, 30.04, 33.45, 37.79].
    ==========================================================================================-->
    <!--<property name="geocode bounding box">None</property>-->

    <!--=========================================================================================
    geocode interpolation method: sinc, bilinear, bicubic, nearest
    ==========================================================================================-->
    <!--<property name="geocode interpolation method">None</property>-->


    <!--=========================================================================================
    These parameters are for ionospheric corrections
    ==========================================================================================-->
    <!--<property name="do ionospheric phase estimation">True</property>-->
    <!--<property name="apply ionospheric phase correction">True</property>-->

    <!--=========================================================================================
    These are the numbers of looks to be taken after taking the numbers of range/azimuth looks 1.
    This is for ionospheric correction.
    Use a larger number of looks results in smaller image size, which saves time in filtering in
    ionosphere estimation. However, a larger number of looks may also lead to phase aliasing in
    the resulting inteferograms and therefore lead to phase unwrapping errors, which causes
    significant errors in ionosphere estimation.
    Below are the default number of looks used by the software
    number of range looks ion,    spotlightModes: 16, stripmapModes: 16, scansarModes: 40
    number of azimuth looks ion,  spotlightModes: 16, stripmapModes: 16, scansarModes: 16
    If the area does not have strong troposhere or phase variations (normally in areas with large
    height differences such as edges of Tibetan Plateau), a larger number of looks can be used,
    e.g. double the default numbers of range/azimuth looks.
    ==========================================================================================-->
    <!--<property name="number of range looks ion">None</property>-->
    <!--<property name="number of azimuth looks ion">None</property>-->

    <!--=========================================================================================
    seperated islands or areas usually affect ionosphere estimation and it's better to mask them
    out. check ion/ion_cal/lower_40rlks_224alks.int (here number of looks 40 and 224 depends on
    your particular case) for areas to be masked out.
    The parameter is a 2-D list. Each element in the 2-D list is a four-element list: [firstLine,
    lastLine, firstColumn, lastColumn], with line/column numbers starting with 1. If one of the
    four elements is specified as -1, the program will use firstLine/lastLine/firstColumn/
    lastColumn instead. For exmple, if you want to mask the following two areas out, you can
    specify a 2-D list like:
    [[100, 200, 100, 200],[1000, 1200, 500, 600]]
    ==========================================================================================-->
    <!--<property name="areas masked out in ionospheric phase estimation">None</property>-->

    <!--=========================================================================================
    a 2-D list. e.g. if you are processing two ScanSAR frames, each with five swaths, and you do
    not want phase difference of swath 1 and 2 in frame 2 snap to fixed values, the parameter can be specified
    as:
    [[True, True, True, True], [False, True, True, True]]
    ==========================================================================================-->
    <!--<property name="swath phase difference snap to fixed values">None</property>-->

    <!--=========================================================================================
    a 2-D list. e.g. if you are processing two ScanSAR frames, each with five swaths, and you want
    to use a phase difference value 0.21 (rad) for swath 1 and 2 in frame 2, the parameter can be
    specified as:
    [[None, None, None, None], [0.21, None, None, None]]
    This parameter has highest priority in determing phase difference between swaths.
    ==========================================================================================-->
    <!--<property name="swath phase difference of lower band">None</property>-->
    <!--<property name="swath phase difference of upper band">None</property>-->

    <!--<property name="apply polynomial fit before filtering ionosphere phase">True</property>-->
    <!--<property name="whether filtering ionosphere phase">True</property>-->
    <!--<property name="apply polynomial fit in adaptive filtering window">True</property>-->
    <!--<property name="whether do secondary filtering of ionosphere phase">True</property>-->
    <!--<property name="maximum window size for filtering ionosphere phase">301</property>-->
    <!--<property name="minimum window size for filtering ionosphere phase">11</property>-->
    <!--<property name="window size of secondary filtering of ionosphere phase">5</property>-->

    <!--=========================================================================================
    Normally no need to set this parameter, it will be automatically determined.
    ==========================================================================================-->
    <!--<property name="standard deviation of ionosphere phase after filtering">None</property>-->

    <!--=========================================================================================
    parameters for filtering subband interferograms used for ionospheric phase estimation
    ==========================================================================================-->
    <!--<property name="filter subband interferogram">False</property>-->
    <!--<property name="subband interferogram filter strength">0.3</property>-->
    <!--<property name="subband interferogram filter window size">32</property>-->
    <!--<property name="subband interferogram filter step size">4</property>-->
    <!--<property name="remove magnitude before filtering subband interferogram">True</property>-->


    <!--=========================================================================================
    These parameters are for spectral diversity
    ==========================================================================================-->
    <!--<property name="number of range looks sd">None</property>-->
    <!--<property name="number of azimuth looks sd">None</property>-->
    <!--<property name="interferogram filter strength SD">0.3</property>-->
    <!--<property name="interferogram filter window size SD">32</property>-->
    <!--<property name="interferogram filter step size SD">4</property>-->

    <!--=========================================================================================
    water body mask starting step: None, filt, unwrap
    ==========================================================================================-->
    <!--<property name="water body mask starting step SD">unwrap</property>-->

    <!--=========================================================================================
    union or intersection when combining sd interferograms
    ==========================================================================================-->
    <!--<property name="union when combining sd interferograms">True</property>-->


    <!--=========================================================================================
    This is a list of files to be geocoded
    Wild card such as * is accepted, e.g. filt_*-*_5rlks_28alks.unw.conncomp
    ==========================================================================================-->
    <!--<property name="geocode file list SD">None</property>-->

    <!--=========================================================================================
    geocode interpolation method for SD: sinc, bilinear, bicubic, nearest
    ==========================================================================================-->
    <!--<property name="geocode interpolation method SD">None</property>-->


    <!--=========================================================================================
    system parameters, better not set these
    ==========================================================================================-->
    <!--<property name="pickle dump directory">PICKLE</property>-->
    <!--<property name="pickle load directory">PICKLE</property>-->
    <!--<property name="renderer">xml</property>-->

  </component>
</alos2burstApp>
