--- ###### tags: `isce` `tutorial` --- # ISCE topsApp 教學 ## Install, Download data and source environment 1. ASF 2. Copernicus Dataspace (Sentinel Hub已不提供影像) ## Edit configuration file **建立檔案設定檔** 1. referece/secondary.xml ```=xml <?xml version="1.0" encoding="UTF-8"?> <component name="reference"> <property name="safe">../data/S1A_IW_SLC__1SSV_20150119T135944_20150119T140004_004241_005286_4271.SAFE</property> <property name="swath number">2</property> <!-- Be careful. Metadata for unpacked product will be stored in "output directory".xml file. So don't use the same name for input catalog file and output directory. You will end up overwriting the input catalog. We use referencedir to ensure we dont overwrite reference.xml --> <property name="output directory">referencedir</property> <!-- 下面可填可不填,沒填會自己下載--> <property name="orbit directory">/home/vagrant/orbit/S1A/precise</property> <property name="auxiliary data directory">/home/vagrant/orbit/S1A/aux</property> </component> ``` 2. topsApp.xml 其內容可以直接使用 topsApp.py -h 來獲得 - 建議設定region of interest, swath, demfilename (If available) - 視情況調整dounwrap, dointeferogram, doesd(recommended), rangelooks, azimuthlooks - 如果沒有DEM file,ISCE會自動下載,但是需要先在家目錄下建立.netrc 檔案,並包含NASA earth data 使用者資訊: ``` machine urs.earthdata.nasa.gov login username password ******* ``` ```=xml= <?xml version="1.0" encoding="UTF-8"?> <topsApp> <component name="topsinsar"> <property name="Sensor name">SENTINEL1</property> <component name="reference"> <catalog>reference.xml</catalog> </component> <component name="secondary"> <catalog>secondary.xml</catalog> </component> <property name="swaths">[2]</property> <property name="regionofinterest">23.250931,23.854714,121.288615,121.633691</property> <property name="demfilename">/home/junyan1998/R103/demLat_N21_N26_Lon_E120_E123.dem.wgs84</property> <property name="dounwrap">True</property> <property name="usegpu">False</property> <property name="filterstrength">0.5</property> <property name="doesd">True</property> <property name="dointerferogram">True</property> </component> </topsApp> ``` ## Run steps **執行:`topsApp.py topsApp.xml`** 1. 可以使用`topsApp.py -h --steps` 來了解有哪些步驟需要進行 2. 如果想要從特定步驟開始或結束,可以使用`--start/end=STEP_NAME` 3. 如果只想要執行特定步驟,可以使用`--dostep=STEP_NAME` ## Postprocessing ISCE 結束後會產生merged 資料夾,其中包含檔案(也可以透過指定geocode list 來產生特定檔案即可。 :::spoiler 檔案結構如下(可展開) merged ├── dem.crop ├── dem.crop.vrt ├── dem.crop.xml ├── filt_topophase.conncomp ├── filt_topophase.conncomp.vrt ├── filt_topophase.conncomp.xml ├── filt_topophase.flat ├── filt_topophase.flat.geo ├── filt_topophase.flat.geo.mph ├── filt_topophase.flat.geo.mph.aux.xml ├── filt_topophase.flat.geo.mph.vrt ├── filt_topophase.flat.geo.mph.xml ├── filt_topophase.flat.geo.vrt ├── filt_topophase.flat.geo.xml ├── filt_topophase.flat.vrt ├── filt_topophase.flat.xml ├── filt_topophase.unw ├── filt_topophase.unw.geo ├── filt_topophase.unw.geo.aux.xml ├── filt_topophase.unw.geo.vrt ├── filt_topophase.unw.geo.xml ├── filt_topophase.unw.vrt ├── filt_topophase.unw.xml ├── isce.log ├── lat.rdr.full.vrt ├── lat.rdr.full.xml ├── lon.rdr.full.vrt ├── lon.rdr.full.xml ├── los.rdr ├── los.rdr.full.vrt ├── los.rdr.full.xml ├── los.rdr.geo ├── los.rdr.geo.vrt ├── los.rdr.geo.xml ├── los.rdr.vrt ├── los.rdr.xml ├── ph0.tif ├── phsig.cor ├── phsig.cor.geo ├── phsig.cor.geo.vrt ├── phsig.cor.geo.xml ├── phsig.cor.vrt ├── phsig.cor.xml ├── reference.slc.full.vrt ├── reference.slc.full.xml ├── secondary.slc.full.vrt ├── secondary.slc.full.xml ├── topophase.cor ├── topophase.cor.full.vrt ├── topophase.cor.full.xml ├── topophase.cor.geo ├── topophase.cor.geo.vrt ├── topophase.cor.geo.xml ├── topophase.cor.vrt ├── topophase.cor.xml ├── topophase.flat ├── topophase.flat.full.vrt ├── topophase.flat.full.xml ├── topophase.flat.geo ├── topophase.flat.geo.vrt ├── topophase.flat.geo.xml ├── topophase.flat.vrt ├── topophase.flat.xml ├── z.rdr.full.vrt └── z.rdr.full.xml ::: - filt_topophase.flat.geo 為地理座標轉換過的為解饞(wrapped)相位複數影像(complex)。 - filt_topophase.unw.geo 為解饞過(unwrapped)的干涉影像。 - 可以透過指令,將複數影像的相位轉出: `imageMath.py -e "arg(a)" --a=filt_topophase.flat.geo -t float -s BIL -o filt_topophase.flat.geo.mph ` ## Display 1. 可以利用 mdx.py 來直接讀取影像(需要xwindow支援) 2. 利用qgis可以直接讀取ISCE format image 3. 利用gdal_translate 將影像轉成其他檔案格式(tiff...) `gdal_translate -of GTiff filt_topophase.flat.geo.mph filt_topophase.flat.geo.mph.tif`