utils: refactor time_func.py and add s1_utils.py #661
Merged
yunjunz merged 3 commits intoinsarlab:mainfrom Sep 14, 2021
Merged
Conversation
+ add utils.time_func.py:
- move get_design_matrix4time_func() from objects.stack.py.
- switch module import/usage in all related scripts: dem_error, gps, simulation, tsview
- replace the old func definition with a pointer to the utils.time_func.py for backward compatibility.
- move estimate_time_func() from timeseries2velocity.py
- switch module import/usage in all related scripts: timeseries2velocity, tsview
- set all get_design_matrix4*_func() as independent functions for more flexibility
+ utils.s1_utils:
- add estimate_S1AB_bias()
- add get_subswath_masks()
+ objects/gps.py: check site name during initialization for more informative error msg against typo in "view.py --ref-gps"
+ docs/api/module_hierarchy.md: add time_func and s1_utils.
This commit adds the capability to feed accurate hour/minute/second info of step/exp/log functions to the design matrix, to support scenarios when the event and SAR acquisition are in the same day, such as The M6.4 Ridgecrest EQ in 4 July 2019. + ptime.yyyymmdd2years(): add seconds arg to add the time of the day info to the output list of years in float + time_func: add seconds arg to pass to ptime.yyyymmdd2years() to support time of the day info to all functions inside + read/prep seconds info to feed to time_func.py in the following scripts: - dem_error.py - timeseries2velocity.py - tsview.py + update example usages in smallbaselineApp.cfg file and arg_group.py
+ add RidgecrestSenDT71 as example dataset for HyP3 - docs/demo*.md: add RidgecrestSenDT71 dataset produced by ASF HyP3 service by Jiang Zhu. - mintpy/data/input_files: add RidgecrestSenDT71.txt + add RidgecrestSenDT71 as test dataset for hyp3 - tests/test_smallbaselineApp: add url for RidgecrestSenDT71 prepared using ASF HyP3 by Jiang Zhu. - tests/configs/RidgecrestSenDT71.cfg: update setups for faster testing + readfile.read_gdal(): use numpy indexing instead of gdal python binding for more robust performance + plot.auto_figure_title(): use custom ds name for generic h5 file
Member
Author
|
@yuankailiu could you please take a look at the Note that I added a pointer in the stack.py to the new time_func.py for backward compatibility, so I don't expect impacts on downstream code from users [would recommend switching to the new script though as it's simpler]. |
Member
Author
4 tasks
Contributor
|
Thank you @yunjunz for making this much cleaner, even with the resolution down to seconds! |
yuankailiu
approved these changes
Sep 14, 2021
Contributor
There was a problem hiding this comment.
They look good to me. I did not modify anything.
[Update]
Below is tested with the postseismic exponential function (at a pixel) from the Ridgecrest EQ.
(Time-series files are provided by @nabolfat)
4 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description of proposed changes
This PR adds the following new features:
utils/time_func.pyforestimate_time_func()(from timeseries2velocity.py) andget_design_matrix4time_func()(from objects/stack.py and all its sub-functions).THH(:)MMstyle for relevant time functions (step/exp/log) for hyp3: fix incAngle/slantRangeDist + add more attributes (pass full test) #640.utils/s1_utils.pydedicated for Sentinel-1 specific functionalities, with initial content from Yunjun et al. [in prep]RidgecrestSenDT71forhyp3from @cirrusasf (sbApp_hyp3: update url of the example dataset MintPy-tutorial#26).Reminders