Conversation
8d3cc2e to
d8b72e8
Compare
d8b72e8 to
b360bc8
Compare
|
Thank you @yuankailiu for this very cool PR! For the output plate motion file, how about saving them into 2 files:
Both of them are spatially absolute. This will give us two benefits:
I think I suggested you merge the 4 datasets into one file in our offline discussion, sorry for the back and forth! For the corrected velocity file, how about adding a suffix of I will go through the rest of the PR at another time. |
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
4dc8a8e to
c0395ae
Compare
UpdatesAddressed PR commentsFor the output plate motion file, save them into 2 files:
The diff.py operation will easily leverage the "spatial referencing on the fly" when apply to an input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5 diff.py: reference point (mintpy/diff.py)Check and apply the reference point for the velocity files |
|
It seems that part of the changes in |
Yes, I will do it now. |
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
+ add a code for bulk plate motion estimation/correction + reference_point.py: use FILE_TYPE for velocity datasetName
+ setup.py: add entry_points for bulk_plate_motion.py + bulk_plate_motion.py: - add REFERENCE to part of the argparse msg - try/except checking for platemotion import
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
Check and apply the reference point for the velocitty files
2298455 to
7d8bc0f
Compare
Address the PR comments in insarlab#769 (comment)
Address the PR comments in insarlab#769 (comment) typo fixed
1373d53 to
9388974
Compare
Address the PR comments in insarlab#769 (comment) typo fixed
9388974 to
01a8ac9
Compare
(insarlab#769 (comment)) For the output plate motion file, saving them into 2 files: + inputs/BulkPlateMotion3D.h5: for the calculated plate motion in east/north/up direction. + inputs/BulkPlateMotion.h5: for the LOS bulk motion file. Both of them are spatially absolute. The diff.py operation will easily leverage the "spatial referencing on the fly" when apply on a input velocity file. For the corrected velocity file, use a universal suffix of _BPM, e.g. velocity_BPM.h5
Address the PR comments in insarlab#769 (comment) typo fixed
+ update usage comments + add mutually exclusive argument group for the 3 PMM input methods + use snake_case style for variable and function names
+ remove --mask option, as it's not really needed for the BPM calculation and projection, which only needs the native mask from the input geometry file. + add -o option to specify the output corrected velocity file. + update comments under functions() for style consistency + estimate_bulk_motion(): - remove the masking part - simplify the atr reading part - update the HDF5 file writing
yunjunz
left a comment
There was a problem hiding this comment.
I have finished my part of the refactoring. The PR looks good to me, pending the minor comment above.
Thank you @yuankailiu for this very cool and useful PR!
+ Added complete references for the plate motion models papers (NNR-NUVEL1A, NNR-MORVEL56, NNR-ITRF14). + Added a brief description about each of the PMMs, including the number of plates, and the technique that used to constrained the plate motions.
Commits
add a code for bulk plate motion estimation/correction
reference_point.py: use FILE_TYPE for velocity datasetName
Major change
Collaborators: @olliestephenson, @yunjunz
Short intro:
This update adds functionality to account for the bulk motion of tectonic plates in the reference frame of the satellite. Plate motion at centimeters per year. combined with the variable satellite line of sight, can introduce velocity ramps in InSAR-derived velocity fields (Stephenson et al, 2022, submitted to GRL). This module combines a user-input plate velocity field with the LOS geometry file (e.g.
geometryGeo.h5) to remove the impact of plate motion from secular velocities derived from Mintpy time series.User inputs:
Users can estimate predicted bulk motion by either:
manually input
ve, vn, vubased on your prior knowledge e.g., GNSS ENU velocities.manually input Euler Pole rotation
lat, lon, omegaoromega_x, omega_y, omega_zbased on e.g., ITRF2014 plate motion model.For more details, please see the usage:
bulk_plate_motion.py -h:Expected outputs:
Input scenario 1: Assume you run the code with specified
-v velocity.h5, then the output files are:FILE_1: velocity_bmModelRaw.h5(the absolute bulk motion model velocity, and its' east, north, and up components, without any reference pixel)
FILE_2: velocity_bmModel.h5(the bulk motion model LOS velocity referenced to the same reference pixel as your input
velocity.h5)FILE_3: velocity_bmCorr.h5(the corrected velocity file; Convention:
FILE_3 = velocity.h5 - FILE_2)Input scenario 2: If you run the code without specifying
-v, there is not uncorrected velocity as input. The output file is only the predicted bulk motion velocity:FILE_1: velocity_bmModelRaw.h5(the absolute bulk motion model velocity, and its' east, north, and up components, without any reference pixel)
Dependencies:
This new script relyies on
platemotionpackage (https://github.com/lcx366/PlateTectonic) to calculate the ENU velocity from a given Euler Pole at lat/lon. One could runpip install platemotionto install this package.Some expected improvements are commented on in the code.
Minor change
Reason for this proposal:
Currently, if you run
reference_point.pyon the velocity file, it will only reference the first dataset in the velocity file. In MintPy, we used to have only “velocity” and “velocityStd” in thevelocity.h5. But when you have fitted seasonal functions, for example, you may have the first dataset as e.g., “annualAmplitude”. Or in the case of plate motion correction file (proposed above in this PR), the first dataset withinvelocity_bmModelRaw.h5is “east” component. So now I suggest to add a datasetName inreference_point.pyfor reading the velocity file. Without having to specify datasetName, if you are dealing withatr[' FILE_TYPE']=velocity, then the default dataset is “velocity”.Reminders