Skip to content

ingest hyp3#542

Merged
yunjunz merged 16 commits intoinsarlab:mainfrom
forrestfwilliams:ingest_hyp3
Mar 27, 2021
Merged

ingest hyp3#542
yunjunz merged 16 commits intoinsarlab:mainfrom
forrestfwilliams:ingest_hyp3

Conversation

@forrestfwilliams
Copy link
Collaborator

Description of proposed changes

The ASF HyP3 on-demand InSAR service is a great option for creating interferograms, but MintPy is not currently set up to ingest these products. This pull request creates a prep_hyp3.py workflow that would allow for the ingestion of these products.

Changes

  • Creates prep_hyp3.py for the creation of rsc metadata files for HyP3 products
  • Adds hyp3 to load_data.py processor list, and sets up reference to prep_hyp3 when hyp3 is the processor.
  • Has readfile.read process HyP3 products as GDAL tifs

Resolves Issue: #540

HyP3 is an on-demand service for producing Sentinel-1 interferograms.
prep_hyp3.py provides a utility to produce MintPy-readable rsc files
so that HyP3 data can be loaded in MintPy.

See Issue: insarlab#540
Adds hyp3 to load_data.py processor list, and sets up reference
to prep_hyp3 when hyp3 is the processor.

See Issue: insarlab#540
Also removed commented import statements
@yunjunz yunjunz self-requested a review March 25, 2021 03:28
@yunjunz
Copy link
Member

yunjunz commented Mar 25, 2021

This is awesome @forrestfwilliams! I only have a few minor suggestions to complete this support:

  1. add HyP3 with link to the docs/README
  2. add hyp3 to the comment of mintpy.load.processor in mintpy/defaults/smallbaselineApp.cfg
  3. could you add an example directory structure and its template options to docs/dir_structure.md? That will be a good place to add some descriptions and/or links on the tutorials as well if available.
  4. if it's not big trouble, could you please send me a test dataset for me to try it as well?

@forrestfwilliams
Copy link
Collaborator Author

Hi @yunjunz I'll get started on these changes! What is the best way to get the test dataset to you?

@yunjunz
Copy link
Member

yunjunz commented Mar 25, 2021

Hi @forrestfwilliams, I just sent you a link to my Box; you could also upload it to Google Drive if you have enough space there.

@forrestfwilliams
Copy link
Collaborator Author

Hi @yunjunz, I've uploaded test data to the box drive, it should match the directory structure I've described in docs/dir_structure.md. I've only included two interferograms to decrease the file size, but let me know if you would like more.

@yunjunz
Copy link
Member

yunjunz commented Mar 25, 2021

Thank you @forrestfwilliams, the doc looks great.

For the test data, could you send me a few more to have some redundacy? You have sent me date1_date3, date2_date3, maybe add date1_date2?

The LAT/LON_REF1/2/3/4 attributes are in a different order for
ascending and descending geometries. This commit reworks the scirpt so
that this difference can be accounted for. The dem file origionally did not
have an external metadata file, so adding in this functionally created
a large changes in the script. Also updated docs/dir_structure.md to
reflect these changes.

See Pull Request: insarlab#542
@forrestfwilliams
Copy link
Collaborator Author

@yunjunz I've made all the changes we've discussed and the updated example data is in the box folder!

@yunjunz
Copy link
Member

yunjunz commented Mar 26, 2021

@forrestfwilliams In the newly added 1st interferogram, I did not find the *_clip.tif, could you make sure?

We need incidence angle and slant range distance for tropospheric delay correction and DEM error correction. The ideal case would be the pixel-wised 2D matrix. If they are not available, a mean value also works, in this case, could you add the following two attributes for it? They will be used by geometryDict during load_data.py to write the mean 2D matrix. This is optional. Let me know if you prefer to deal with it in another PR please.

SLANT_RANGE_DISTANCE =   # mean slant range distance between the satellite and the ground
INCIDENCE_ANGLE =   # mean incidence angle in degree

Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR itself works fine without errors, so I think it's ready to be merged. Thank you @forrestfwilliams!!!

There are a few more things to consider, to better support the full functionalities of MintPy. Maybe for future PRs, unless you want to do it in this PR? @forrestfwilliams Let me know please.

  • 1. In the newly added 1st interferogram, I did not find the *_clip.tif, could you make sure @forrestfwilliams?

  • 2. We need incidence angle and slant range distance for tropospheric delay correction and DEM error correction. The ideal case would be the pixel-wised 2D matrix. If they are not available, a mean value also works, in this case, could you add the following two attributes for it? They will be used by geometryDict during load_data.py to write the mean 2D matrix.

SLANT_RANGE_DISTANCE =   # mean slant range distance between the satellite and the ground
INCIDENCE_ANGLE =   # mean incidence angle in degree
  • 3. The "meter" unit is not properly displayed in view.py currently, which requires some changes (I will probably try it sometime this weekend or next week). For now, one could run view.py --coord radar to force the display in radar coordinate. (#548)

@forrestfwilliams
Copy link
Collaborator Author

@yunjunz 1. was my mistake, sorry. I've uploaded the correct version of the example data to the box folder. As for 2. and 3. let's fix them in a future PR. incidence angle and slant range distance are not available in the current version of HyP3, but the project is still in Beta, so they'll likely be open to adding this data as an optional output. Let's go ahead and merge!

@yunjunz yunjunz merged commit 4d08d5a into insarlab:main Mar 27, 2021
yunjunz pushed a commit to yunjunz/MintPy that referenced this pull request Apr 17, 2021
+ create `prep_hyp3.py` to prepare rsc metadata files for ASF HyP3 data, which is an on-demand service for producing Sentinel-1 interferograms.

+ load_data.py: add hyp3 to the processor list, and sets up a reference to prep_hyp3 when hyp3 is the processor.

+ utils.readfile: read HyP3 products as GDAL TIFF files

+ docs/dir_structure: add example directory structure and template options for HyP3

+ prep_hyp3/aria: fix bug of LAT/LON_REF1/2/3/4, considering their differences between asc /desc geometries.
yunjunz pushed a commit to yunjunz/MintPy that referenced this pull request Apr 17, 2021
+ create `prep_hyp3.py` to prepare rsc metadata files for ASF HyP3 data, which is an on-demand service for producing Sentinel-1 interferograms.

+ load_data.py: add hyp3 to the processor list, and sets up a reference to prep_hyp3 when hyp3 is the processor.

+ utils.readfile: read HyP3 products as GDAL TIFF files

+ docs/dir_structure: add example directory structure and template options for HyP3

+ prep_hyp3/aria: fix bug of LAT/LON_REF1/2/3/4, considering their differences between asc /desc geometries.
@yunjunz yunjunz mentioned this pull request Apr 17, 2021
4 tasks
@forrestfwilliams forrestfwilliams deleted the ingest_hyp3 branch June 14, 2021 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants