Preparing input datasets with SNAP

615 views
Skip to first unread message

Andre Theron

unread,
May 14, 2019, 3:47:32 AM5/14/19
to MintPy
I have automated python scripts for generating S1 interferometric products in SNAP and I am working on preparing it for MintPy.
Thank you for earlier help (https://groups.google.com/forum/#!searchin/mintpy/snap%7Csort:date/mintpy/gezIHsr3amo/4b4IMl6LCQAJ).
Based on that I have created interferograms that are filtered and unrwapped in snaphu and converted to Gamma format (.rslc, .rslc.par).
That stack has a depth of 3 (A+B, A+C, A+D, B+C, B+D, B+E etc.) so it is redundant.

Now I need to integrate this into MintPy. I am reading as much of the code/docs as I can but I am stuck and I am hoping some answer might get me on track again and save trail and error time.

In my outputs I have filtered and geocoded wrapped interferograms, unwrapped interferograms and coherence.
1) I am terrain correcting the interferograms, is geocoded inputs O.K for MintPY or should I export before terrain correction?
2) All the scenes are coregestered to each other, and not a single master, but they are geocoded. That should be fine in terms of stack co-registration?
2) I understand coherence is a required input (.corr), I calculate coherence using SNAP, is this fine?
3) It looks like "snaphu connecting components" are useful. How do I generate these?
4) The input file asks for geometry files (dem.rdc lat/long etc.) - I am not exactly sure which files are needed and how to create them. Are they required if inputs are geocoded? I think they are since incidence angle is needed for the displacement vector usually...

I am hoping if these questions are answered I can put my files in the correct dir structure, create the input file and run MintPy.

Congrats and the new official naming, interesting to see the project evolve into the Insarlab and then to MintPy.

Yunjun Zhang

unread,
May 14, 2019, 12:48:01 PM5/14/19
to MintPy, Heresh Fattahi
Hi Andre,

I am happy to hear about your progress.

1) I am terrain correcting the interferograms, is geocoded inputs O.K for MintPY or should I export before terrain correction?
2) All the scenes are coregestered to each other, and not a single master, but they are geocoded. That should be fine in terms of stack co-registration?

Yes, geocoded inputs are okay.

2) I understand coherence is a required input (.corr), I calculate coherence using SNAP, is this fine?

Yes.

3) It looks like "snaphu connecting components" are useful. How do I generate these?

Heresh, may you could comment more on this?

4) The input file asks for geometry files (dem.rdc lat/long etc.) - I am not exactly sure which files are needed and how to create them. Are they required if inputs are geocoded? I think they are since incidence angle is needed for the displacement vector usually...

Since your inputs are geocoded, lookup table files (*.UTM_TO_RDC in GAMMA) are not required. 

Incidence angle file can be calculated if not inputed, using DEM (turn ON by default in “load_data” step). 

You would only need to create an DEM file, in the same coordinates as the interferograms: same row/column number, spatial resolution and coverage in lat/lon direction. If the input DEM does not meet this requirements, I recommend two procedures:
1) crop the input DEM in the same lat/lon as the interferograms
2) resample/resize the cropped DEM to the same resolution as the interferograms.

The get_geo_delay() in the Notebook below is an example for these procedures.

Please don’t hesitate to let me know if you have more questions,

Yunjun

Andre Theron

unread,
Jun 10, 2019, 4:25:43 AM6/10/19
to MintPy
A note to whomever reads this.

I have realised SNAP has been a mistake.
I do have a very nice SNAP workflow and it can generate the outputs in Gamma format, but I cannot simply generate the required *.off, *.par, *.base_perp and *.corner files. (Unless I am missing something?)
Furthermore, mintpy.prep_gamma.py actually does os calls to run Gamma commands therefore requiring a Gamma installation.

I will now move over completely to use ISCE2. I investigated ISCE earlier but found I could not access the software due to some North American licencing agreement so I used SNAP but only now found ISCE2 on git.
I feel silly. ISCE2 looks amazing and optimized compared to SNAPs Java processing.

Yunjun Zhang

unread,
Jun 10, 2019, 3:55:15 PM6/10/19
to MintPy
Hi Andre,

I am really glad to hear that you have a SNAP workflow now. 

You don’t need the *.off, *.par, etc files literally, all of them are metadata essentially (a list of keys and values). Metadata can be in several files, like Gamma, or in one file (IW3.xml) like ISCE, as long as they include the required ones by mintpy, which are described here: https://mintpy.readthedocs.io/en/latest/api/attributes/#required_attributes.

Therefore, it requires 1) having a SNAP workflow to generate the data file in binary, which you already did; 2) grabbing metadata using SNAP functions or a Python script (prep_snap.py for example, I can help with this) or combing both. Neither prep_gamma.py nor Gamma will be used.

ISCE2 is great. I still think SNAP+MintPy workflow would be very useful. If you have an example dataset processed with SNAP, I am more than happy to communicate closely with you to prepare the metadata part.

Regards,

Yunjun

-- 
You received this message because you are subscribed to the Google Groups "MintPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mintpy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mintpy/17a4263a-0ad3-4516-a053-90a0c5b37a38%40googlegroups.com.

Message has been deleted
Message has been deleted

Joyce Huang

unread,
Oct 14, 2020, 6:05:46 AM10/14/20
to MintPy
Hi, 
   I went through the old posts about the preparation of input datasets with SNAP in this group and I'm new to MintPy.
I've a question here:
The inteferometric images are coregistrated to each other, and  the interferograms are formed for the selected baselines.
But before put into MintPy, do we need to coregister them to one reference image (a single master) ?Or Mintpy can take care of this coregistration?
   Thank you for your answer

Zhang Yunjun

unread,
Oct 14, 2020, 1:34:58 PM10/14/20
to MintPy
Hi Joyce,

mintpy requires interferograms coregistered to one common single reference.


Yunjun

Joyce Huang

unread,
Oct 14, 2020, 4:06:24 PM10/14/20
to MintPy
Thank you Yunjun. I did read Andre's summary about SNAP workflow.   I think it works for interferogram preparation, like master and slave1, master and slave2, or slave1 and slave2, etc.
But how to use SNAP to co-register all these interferograms to one common master image? I cannot learn from this summary.
Hope you guys can provide more details if possible.
Thank you for your help

Zhang Yunjun

unread,
Oct 21, 2020, 10:56:55 PM10/21/20
to MintPy
Hi Joyce,

The example dataset Andre showed is geocoded, in the same spatial extent and resolution. But I don't know exactly how he did it in SNAP. Maybe the SNAP forum would be a better place to get a meaningful answer to this question.

Yunjun

Joyce Huang

unread,
Oct 22, 2020, 4:11:35 AM10/22/20
to MintPy
Thanks Yunjun. It would be helpful if Andre can put the prepared sample data sets in github, just like other MintPy examples, so that SNAP users can have a look.
Reply all
Reply to author
Forward
0 new messages