You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SNAP is a popular application to process SAR data. It allows for the creation of all the required input data for Mintpy. Therefore if MintPy can read this data it becomes possible to apply Multi-temporal InSAR and atmospheric correction to SNAP outputs. SNAP processing can be done manually, in the command line, or using the SNAP python API allowing for automated scripts.
An effort has been made in MintPy to integrate the outputs of SNAP directly for ease of processing. Unlike the SNAP extensional export for PSI with StaMPS, MintPy reads the native SNAP .dim files directly. This makes it possible to generate input files in SNAP and ingest them directly into MintPy. The recipe below should work as long as the correct workflow is followed. The aim is to make the world of open-source multi-temporal InSAR more user-friendly.
Notes
Only limited testing has been done on prep_snap.py. It is possible that different SNAP workflows would not create a .dim file that is not expected by the script. This is because prep_snap.py tries to extract attribute files from the .dim XML file using simple parsing which might be sensitive to different workflows. The script was developed on data prepared by the workflow detailed earlier using Python / SNAP / snappy.
Only geocoded (SNAP terrain correction step) data are supported so far. However, support for datasets in radar geometry should be easy to add.
Only tested on Sentinel-1.
No formal comparison/assessment has been done yet. Use it at your own risk.
We want your help! This page is by no means comprehensive. Contributions in terms of notes, explanations, screenshots, tips, etc., are highly desired. ANYONE could edit this page.
SNAP Workflow
This workflow makes it possible to work with an area of interest covered by any combination of Sentinel-1 bursts / swaths / slices. It should be done for the entire redundant interferogram network of reference and secondary scenes.
Read reference and secondary data
Reference and secondary slice assembly (if required for sentinel-1)
Reference and secondary Apply orbit file
Reference and secondary Split product (extract relevant polarisation and subswaths)
The following is done per subswath [IW1, IW2, IW3]
Enhanced spectral diversity (if more than one burst is present for Sentinel-1)
Interferogram generation
TOPSAR Deburst
Topo-phase removal
Goldstein phase filtering
Merge subswaths of flattened and filtered interferogram products (if more than one swath was done)
Subset by band and extract interferogram (This is the first MintPy input product - optional)
Add elevation band to co-registered product (must be done here to capture baseline attribute data)
Subset by band and extract only the elevation band (This is the second MintPy input product)
Generate Coherence
Subset by band and extract coherence (This is the third MintPy input product)
Snaphu export interferogram
SNAPHU phase unwrapping (external program)
Snaphu import and save unwrapped product (This is the fourth MintPy input product)
Terrain correct all four Mintpy products
Subset all four MintPy products by region - this must be done after terrain correction to ensure identical extents.
The resulting directory should have a structure similar to the example here, which also includes an example template file. Each .dim file should only have one band. The rest (running smallbaselineApp.py) is the same as shown in the example dataset.
Hi,
I followed your workflow, I did only one modification, Instead of Interferogram generation I used Multi-Reference InSAR graph to produce SBAS interferogams combination based on coregistered stack. However I have got error when modifying the network:
plot_network.py D:\mintpy\test2\test_S1\mintpy\inputs/ifgramStack.h5 -t D:\mintpy\test2\test_S1\mintpy\smallbaselineApp.cfg --nodisplay -d coherence -v 0.2 1.0
read options from template file: smallbaselineApp.cfg
read temporal/spatial baseline info from file: D:\mintpy\test2\test_S1\mintpy\inputs/ifgramStack.h5
open ifgramStack file: ifgramStack.h5
calculating spatial mean of coherence in file D:\mintpy\test2\test_S1\mintpy\inputs/ifgramStack.h5 ...
[==================================================] 1/1
write average value in space into text file: coherenceSpatialAvg.txt
Traceback (most recent call last):
File "C:\Users\zbign\anaconda3\Scripts[smallbaselineApp.py-script.py](http://smallbaselineapp.py-script.py/)", line 9, in
sys.exit(main())
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\cli\smallbaselineApp.py", line 209, in main
run_smallbaselineApp(inps)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\smallbaselineApp.py", line 1155, in run_smallbaselineApp
app.run(steps=inps.runSteps)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\smallbaselineApp.py", line 911, in run
self.run_network_modification(sname)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\smallbaselineApp.py", line 258, in run_network_modification
mintpy.cli.plot_network.main(iargs)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\cli\plot_network.py", line 170, in main
plot_network(inps)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\plot_network.py", line 148, in plot_network
inps = read_network_info(inps)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\plot_network.py", line 36, in read_network_info
inps.cohList = ut.spatial_average(
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\utils\utils1.py", line 332, in spatial_average
meanList, dateList = read_text_file(txtFile)
File "C:\Users\zbign\anaconda3\lib\site-packages\mintpy\utils\utils1.py", line 199, in read_text_file
meanList = [float(i) for i in txtContent[:, 1]]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Originally posted by @andretheronsa in https://github.com/insarlab/MintPy/wiki/SNAP-input-data
SNAP is a popular application to process SAR data. It allows for the creation of all the required input data for Mintpy. Therefore if MintPy can read this data it becomes possible to apply Multi-temporal InSAR and atmospheric correction to SNAP outputs. SNAP processing can be done manually, in the command line, or using the SNAP python API allowing for automated scripts.
An effort has been made in MintPy to integrate the outputs of SNAP directly for ease of processing. Unlike the SNAP extensional export for PSI with StaMPS, MintPy reads the native SNAP .dim files directly. This makes it possible to generate input files in SNAP and ingest them directly into MintPy. The recipe below should work as long as the correct workflow is followed. The aim is to make the world of open-source multi-temporal InSAR more user-friendly.
Notes
prep_snap.py. It is possible that different SNAP workflows would not create a .dim file that is not expected by the script. This is because prep_snap.py tries to extract attribute files from the .dim XML file using simple parsing which might be sensitive to different workflows. The script was developed on data prepared by the workflow detailed earlier using Python / SNAP / snappy.SNAP Workflow
This workflow makes it possible to work with an area of interest covered by any combination of Sentinel-1 bursts / swaths / slices. It should be done for the entire redundant interferogram network of reference and secondary scenes.
The resulting directory should have a structure similar to the example here, which also includes an example template file. Each .dim file should only have one band. The rest (running
smallbaselineApp.py) is the same as shown in the example dataset.Beta Was this translation helpful? Give feedback.
All reactions