Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyp3: more metadata for HDF-EOS5 support #1162

Open
yunjunz opened this issue Mar 18, 2024 · 6 comments · Fixed by #1180
Open

hyp3: more metadata for HDF-EOS5 support #1162

yunjunz opened this issue Mar 18, 2024 · 6 comments · Fixed by #1180

Comments

@yunjunz
Copy link
Member

yunjunz commented Mar 18, 2024

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 #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.

Copy link

welcome bot commented Mar 18, 2024

👋 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.

@jhkennedy
Copy link
Collaborator

@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.

@forrestfwilliams
Copy link
Collaborator

@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!

@yunjunz
Copy link
Member Author

yunjunz commented Apr 25, 2024

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

@forrestfwilliams
Copy link
Collaborator

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.

@yunjunz
Copy link
Member Author

yunjunz commented Apr 25, 2024

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 :

# 2. calculate ASF frame number for Sentinel-1
meta['firstFrameNumber'] = int(0.2 * (burst.burstStartUTC - obj.ascendingNodeTime).total_seconds())
meta['lastFrameNumber'] = int(0.2 * (burstEnd.burstStopUTC - obj.ascendingNodeTime).total_seconds())

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

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 a pull request may close this issue.

3 participants