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

Heading attribute of InSAR products expressed clockwise instead of counter-clockwise for descending scenes #306

Open
asjohnston-asf opened this issue Aug 14, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@asjohnston-asf
Copy link
Member

Originally reported by @yunjunz at insarlab/MintPy#540 (comment)

Sentinel-1 headings are expressed in degrees counter-clockwise from north in the annotation xml files provided with SLC products (around -12 degrees for ascending scenes and -168 for descending scenes).

For descending pairs, the heading attribute for InSAR products is expressed in degrees clockwise from north in the .txt metadata file (around 193 degrees).
descending.txt

GAMMA's SLC_copy_S1_TOPS program appears to be the culprit, an input .par file with a -168 heading generates an output .par file with a positive heading.
https://github.com/ASFHyP3/hyp3-gamma/blob/develop/hyp3_gamma/insar/ifm_sentinel.py#L335
https://github.com/ASFHyP3/hyp3-lib/blob/8594f68c4496c9c0ad1fcdc704c3c8a59f90cc70/hyp3lib/SLC_copy_S1_fullSW.py#L31

This does not appear to impact InSAR products generated from ascending pairs; the heading is still expressed as ~-12 degrees.
ascending.txt

@asjohnston-asf asjohnston-asf added the bug Something isn't working label Aug 14, 2021
@asjohnston-asf
Copy link
Member Author

This impacts MintPy metadata when importing InSAR products from HyP3 around https://github.com/insarlab/MintPy/blob/main/mintpy/prep_hyp3.py#L118

@yunjunz
Copy link

yunjunz commented Aug 14, 2021

Hi @asjohnston-asf, -168 and 192 are equivalent to each other with 360 deg difference. It was my mistake. The 193 value is correct and fine.

@asjohnston-asf
Copy link
Member Author

asjohnston-asf commented Aug 14, 2021

prep_hyp3.py may set the ORBIT_DIRECTION attribute incorrectly as a result, might need a heading = (heading % 360) - 360 at
https://github.com/insarlab/MintPy/blob/main/mintpy/prep_hyp3.py#L120 or
https://github.com/insarlab/MintPy/blob/main/mintpy/prep_hyp3.py#L129

@yunjunz
Copy link

yunjunz commented Aug 14, 2021

Yes, I will adjust this value in prep_hyp3.py to make it around -168.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants