insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
555 stars 244 forks source link

Modification on readfile.py for stack generated by SNAP #1208

Open ssharifi1994 opened 1 month ago

ssharifi1994 commented 1 month ago

Hello @yunjunz and other fellows,

I'm opening this thread to have your input on the modification of a part of readfile.py. I'm using SNAP to generate the stack; however, it lacks a direct function to ensure that all interferograms are resampled to a common grid across the dataset. I changed my process so every single pair of scenes is first co-registered to a 3rd reference scene then split the stack and maintain the two scenes of interest to proceed with the rest of the process. This changed the structure of the "Abstracted Metadata" of dim files a little bit in the baseline section. See the snippet below and refer to the attached file here for the full file. The first, second and third dates always belong to the reference, master the slave scenes respectively. image This obviously triggered an error when prep_snap.py runs. I modified the code in readfile.py as shown below with the track change feature. It runs now and the baseline values as well as dates are identified correctly. I was wondering if anywhere else in this script or other script(s) should be modified accordingly too.

Let me know if I wasn't clear on anything. Many thanks, Sohrab

welcome[bot] commented 1 month ago

💖 Thanks for opening this pull request! Please check out our contributing guidelines. 💖 Keep in mind that all new features should be documented. It helps to write the comments next to the code or below your functions describing all arguments, and return types before writing the code. This will help you think about your code design and usually results in better code.