MintPy icon indicating copy to clipboard operation
MintPy copied to clipboard

`hyp3`: more metadata for `HDF-EOS5` support

Open yunjunz opened this issue 1 year ago • 6 comments

Description of the desired feature

HDF-EOS5 file format is an easy way to save the final time-series product into a single file. There is now near-automatic support for that after https://github.com/insarlab/MintPy/pull/1161. However, the following metadata is missing. It will be great to provide them from the ASF HyP3 side:

  • relativeOrbit: required by HDF-EOS5
  • startUTC: used to calculate the first frame number
  • stopUTC: used to calculate the last frame number
  • ascendingNoteTime: use to calculate the first/last frame number [updated]

Then, all hyp3 products can be saved in HDF-EOS5 format, if the user just turn on the mintpy.save.hdfEos5 option, without any manual adding of metadata (as I did in here).

Let me know what you think please. @forrestfwilliams @talogan @jhkennedy

Next, we would need to update the example ASF HyP3 dataset (to include the above metadata); and cut for a new release of mintpy.

yunjunz avatar Mar 18 '24 07:03 yunjunz

👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.

welcome[bot] avatar Mar 18 '24 07:03 welcome[bot]

@yunjunz I agree that supporting HDF-EOS5 files is a great idea -- we're working on a few things on the HyP3 side to provide better metadata overall and effectively eliminate the need of the prep_hyp3 code here and any hyp3-specific tutorials. There's no timeline, but I'll keep you posted as things mature on our end.

jhkennedy avatar Apr 03 '24 22:04 jhkennedy

@yunjunz sorry for the slow reply. As @jhkennedy mentioned, we're working on some things to ease the transition from hyp3 -> mintpy. In the meantime however, yep we can add those three attributes to prep_hyp3. start/stop UTC will be simple, but relativeOrbit will take tiny a bit of work. We only provide absolute orbits in the hyp3 metadata so we'll need to convert between the two, but that's a simple calculation. I'll open a PR next week!

forrestfwilliams avatar Apr 10 '24 20:04 forrestfwilliams

Reopen the issue as the ascendingNodeTime is still missing, thus, could not calculate the first/last_frame number yet.

yunjunz avatar Apr 25 '24 10:04 yunjunz

Hey @yunjunz, the ascendingNodeTime will be more work to add to our HyP3 products. We currently don't include this field in our parameter files and will need to update both of our insar processing workflows to accommodate this. Do you have documentation on how the ascendingNodeTime should be specified for HDF-EOS?

I'll let you know when our team starts in on this work, but right now I'm not sure when that will be.

forrestfwilliams avatar Apr 25 '24 13:04 forrestfwilliams

What HDF-EOS5 need is the first_frame and last_frame, as defined by ASF, which can be calculated as below using startUTC, stopUTC and ascendingNodeTime : https://github.com/insarlab/MintPy/blob/4d34412b811016e02b9dfc45dc6af519bca85f6a/src/mintpy/utils/isce_utils.py#L203-L205

The three metadata (startUTC, stopUTC and ascendingNodeTime) won't be included within the HDF-EOS5 file.

Here is the related documentation on HDF-EOS5 metadata: https://mintpy.readthedocs.io/en/latest/hdfeos5/#2_metadata

yunjunz avatar Apr 25 '24 13:04 yunjunz