-
Notifications
You must be signed in to change notification settings - Fork 266
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
Possible error with reading ASF hyp3 azimuth angle data #857
Comments
👋 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! |
The azimuth angle in mintpy is following the isce2 convention (band2 of the los.rdr/geo file), which is defined as the azimuth angle of the LOS vector (from the ground to the SAR platform) measured from the north, with anti-clockwise direction as positive (note). Thus, a typical value for Sentinel-1 would be 102 deg for ascending, and -102 deg for descending orbits. Since MintPy currently would read the |
@yunjunz we'll have a look |
In hyp3-gamma InSAR product, the LV_PHI is defined as the angle between the East direction and the projection of the look vector on the horizontal surface plane. Compare with the definition of azimuth angle in Mintpy, we can get the formula: LV_PHI_mintpy=3PI/2 +LV_PHI_hyp3 |
Here are two examples of azimuth angles I have, for your reference:
@cirrusasf This formula can not explain the value that @sar26 shown above. |
@cirrusasf @yunjunz , I can send you the geometryGeo.h5 files if that helps? They are too large to attach here though. |
Hi @sar26, yes it would be helpful if we could look at the data you're using. Can you either post a link here or send it to ffwilliams2@alaska.edu? |
If you apply this conversion to your files, do you get reasonable angles? import numpy as np
def convert_angle(hyp3_angle):
mintpy_angle = np.rad2deg(hyp3_angle) - 90
return mintpy_angle |
Thank you @forrestfwilliams, your formula works! I will issue a PR for this fix. |
Following the formula from @cirrusasf and @forrestfwilliams, I have updated the code in #865. But I don't have test data at hand, @sar26 could you try the PR and confirm if it works? Note that you need to remove your local *.rsc and geometryGeo.h5 files before re-running mintpy. |
@sar26 Can you tell us what pairs you are working on. The images (one ascending, one descending) you posted before look about right. |
@cirrusasf I'm using T009A F1092 and T118D F679, the pairs are in the attached files. @forrestfwilliams I'm in the process of copying the geometry data for you to look at. I'll send a google drive link to your email address. @yunjunz I'm sorting out my data to test the changes you've made. I have to copy the input files from an archive as I delete them once I've loaded them to mintpy to save space. T118D_F679_bw-15_ifg_pairs.txt |
@yunjunz I'm having some problems testing the code, it could be to do with my setup, but not sure. I've created a new conda environment and cloned your branch (to keep it separate from my running code). The HPC environment I use requires me to add the path to the mintpy directory into the scripts so it can find them when running PBS jobs. I used to use this setup with no problems, but recently changed to the conda version which removes this step and makes it easier to update versions. So when running in the new conda environment, it just runs briefly and the ends with no screen outputs, errors or files. I tried copying the changed scripts to my existing conda environment, it starts reading the config file as expected but then produced an error:
Perhaps I can copy a subset my input data files to Google Drive for you to test it on your setup? |
Hi @SarahBrennand, I guess you installed both the released version of mintpy from conda-forge and setup the path to the developed version from my branch, this caused the path conflict. The solution is to install the developed version, following the installation on GitHub, which will install the mintpy dependencies (without mintpy itself) via conda, then install the mintpy itself (my branch in this case) using pip (
Sure, that works too, I believe two pairs would be enough for testing. Thanks. |
@yunjunz Thanks, I was missing the It runs successfully and the results are plotted below. The values are now closer in range as LOS azimuth calculated in my original post above (~ +/- 102 degrees). T009A - data range: [-90.0, 105.2099] degree T009A - data range: [103.805664, 105.2099] degree (masked -90 values) T118D - data range: [-105.23892, -90.0] degree T118D - data range: [-105.23892, -103.83663] degree (masked -90 values) |
Thanks @SarahBrennand, these look all reasonable to me: the small variation from +/-102 deg is expected for different areas. It seems the no-data-value in |
@yunjunz, here are the incidence angle results: T009A - data range: [30.422287, 90.0] degree T009A - data range: [30.422287, 45.446682] degree (masked 90 values) T118D - data range: [30.397263, 90.0] degree I couldn't get the 90 degree values to mask properly for the descending data, so I haven't included a masked plot. |
Thank you @SarahBrennand for the testing, this is helpful to validate the detail. Close this issue as the PR (#865) is merged. |
Hi @yunjunz, @jhkennedy,
Raised from MintPy group conversation: https://groups.google.com/g/mintpy/c/ql2D1t8D-kw/m/yycRhtT3BQAJ
Using MintPy version 1.4.1, downloaded from conda.
Appears to be an issue with how the ASF hyp3 azimuth angle information is handled in MintPy.
I need to use
asc_desc2horz_vert.py
to resolve up-down, east-west motion for a large area, so I need to use the azimuth angle to get more accurate estimations. I followed the instructions in https://groups.google.com/g/mintpy/c/EcmuJU9jhX0/m/hmSoiv2XAQAJ and used the lv_phi and lv_theta files as the azAngleFile and incAngleFile in the configuration file.If I calculate the motion without the geometry file, the results are:
asc_desc2horz_vert.py asc_velocity.h5 desc_velocity.h5
These values make sense and produce reasonable output results:
When running the same command but including the geometry files:
asc_desc2horz_vert.py asc_velocity.h5 desc_velocity.h5 -g asc_geometryGeo.h5 desc_geometryGeo.h5
The results are wrong:
Can this please be checked to see if there is an issue with dealing with the ASF hyp3 azimuth angle file in MintPy.
Thanks
Attached are plots of the azimuth files after the 'load_data' step.
The text was updated successfully, but these errors were encountered: