Skip to content

Commit

Permalink
plate_motion refactoring: remove pkg dependency (#868)
Browse files Browse the repository at this point in the history
+ add `objects.euler_pole.py`:
   - create the `EulerPole` class/object based on `numpy` and `pyproj` (similar to https://github.com/joferkington/euler_pole/blob/master/euler_pole/euler_pole.py)
   - use matrix rotation to convert the cartesian frame to local ENU frame, to compute the plate motion
   - the above two remove the dependency on `astropy` and `platemotion` (https://github.com/lcx366/PlateTectonic)
   - add references to Pichon et al., 1973, Cox et al., 1986, ESA webpage
   - turn ON "ellipsoid" Earth calculation by default
   - `get_velocity_enu()`: set vu to 0 if assuming spherical Earth (ellps=False)

+ add `tests/objects/euler_pole.py` for the unit tests:
   - test the EulerPole object initiation/conversion
   - test the plate motion calculation against the UNAVCO web calculator
   - add to the circle CI testing

+ `plate_motion.py` and `cli/plate_motion.py`: add published DOI to Stephenson, Liu, et al. (2022).

+ simplify the setup/install section for plate_motion in `setup.py` and `__main__.py`

+ other minor features and bugfixes:
   - utils.utils0.py: add get_azimuth_angle_from_east_north_obs()
   - utils.readfile.sort_dataset_list4velocity(): support velocity file without velocity dataset, e.g. ITRF14enu.h5 file.

Co-authored-by: Zhang Yunjun <yunjunzgeo@gmail.com>
  • Loading branch information
yuankailiu and yunjunz committed Oct 30, 2022
1 parent c15ad0f commit 930cbf4
Show file tree
Hide file tree
Showing 10 changed files with 537 additions and 162 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
export PATH=${CONDA_PREFIX}/bin:${PATH}
${MINTPY_HOME}/tests/asc_desc2horz_vert.py
${MINTPY_HOME}/tests/objects/ionex.py
${MINTPY_HOME}/tests/objects/euler_pole.py
- run:
name: Testing MintPy on Example Dataset 1/4 - FernandinaSenDT128 (ISCE/topsStack)
Expand Down
5 changes: 1 addition & 4 deletions mintpy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,7 @@ def get_parser():
get_dem_error_parser(sp)
get_iono_tec_parser(sp)
get_local_oscilator_drift_parser(sp)
try:
get_plate_motion_parser(sp)
except ImportError:
pass
get_plate_motion_parser(sp)
get_remove_ramp_parser(sp)
get_s1ab_range_bias_parser(sp)
get_solid_earth_tides_parser(sp)
Expand Down
10 changes: 5 additions & 5 deletions mintpy/cli/plate_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

######################################### Usage ##############################################
REFERENCE = """reference:
Stephenson, O. L., Liu, Y. K., Yunjun, Z., Simons, M., Rosen, P. and Xu, X., (2022), The Impact of
Plate Motions on Long-Wavelength InSAR-Derived Velocity Fields, Geophys. Res. Lett. (under review)
doi:10.1002/essoar.10511538.2
Stephenson, O. L., Liu, Y. K., Yunjun, Z., Simons, M., Rosen, P. and Xu, X., (2022),
The Impact of Plate Motions on Long-Wavelength InSAR-Derived Velocity Fields,
Geophys. Res. Lett. 49, e2022GL099835, doi:10.1029/2022GL099835.
# list of no-net-rotation (NNR) plate motion models (PMMs):
# ONLY ITRF14 should be used, as Sentinel-1's orbit is in ITRF2014 reference frame.
Expand All @@ -26,8 +26,8 @@
doi:10.1093/gji/ggx136
MORVEL - Table 1 of Argus et al. (2011) - 56 plates
Argus, D. F., Gordon, R. G., & DeMets, C. (2011). Geologically current motion of 56
plates relative to the no-net-rotation reference frame. Geochemistry, Geophysics, Geosystems, 12(11).
doi:10.1029/2011GC003751
plates relative to the no-net-rotation reference frame. Geochemistry, Geophysics,
Geosystems, 12(11). doi:10.1029/2011GC003751
"""

EXAMPLE = """example:
Expand Down
Loading

0 comments on commit 930cbf4

Please sign in to comment.