-
Notifications
You must be signed in to change notification settings - Fork 297
ts2vel: add --rm-timefun option for customized TS clean up
#1355
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
Conversation
+ add `timeseries2velocity.py --rm-timfun / --remove-time-functions` option to specify the time function components to be removed from the residual file, for customized TS clean up, like GNSS time series. + add timefun_names2ds_names() to translate the spcified time function names to the corresponding dataset names/index in the design matrix, to facilitate the customized TS clean up. + set default output vel/res filenames for --rm-timefun options + `.circleci/config.yml`: show total num of integration tests for more informative status
Reviewer's GuideThis PR introduces a new Sequence Diagram for Residual Calculation with --rm-timefunsequenceDiagram
participant CLI as timeseries2velocity.py CLI
participant RTS2TF as run_timeseries2time_func
participant TFN2DSN as timefun_names2ds_names
CLI->>RTS2TF: invoke with parsed inputs (inps)
RTS2TF->>RTS2TF: Check inps.rm_timefuns
alt 'all' in inps.rm_timefuns
RTS2TF->>RTS2TF: Calculate ts_res = ts_data - np.dot(G, m) (all functions removed)
else Specific time functions provided
RTS2TF->>TFN2DSN: call timefun_names2ds_names(inps.rm_timefuns, ds_dict.keys())
TFN2DSN-->>RTS2TF: return rm_ds_names, rm_ds_inds (indices for specified functions)
RTS2TF->>RTS2TF: Calculate ts_res = ts_data - np.dot(G[:, rm_ds_inds], m[rm_ds_inds, :]) (specific functions removed)
end
RTS2TF->>RTS2TF: Write ts_res to inps.res_file
RTS2TF-->>CLI: Return output filepath
Class Diagram for Updated timeseries2velocity ModulesclassDiagram
class mintpy_timeseries2velocity {
<<Python Module: src/mintpy/timeseries2velocity.py>>
+run_timeseries2time_func(inps) : string
+timefun_names2ds_names(timefun_names, all_ds_names) : tuple
}
class mintpy_cli_timeseries2velocity {
<<Python Module: src/mintpy/cli/timeseries2velocity.py>>
+create_parser(subparsers) : ArgumentParser
+cmd_line_parse(iargs) : Namespace
}
mintpy_cli_timeseries2velocity ..> mintpy_timeseries2velocity : uses
%% mintpy_timeseries2velocity.run_timeseries2time_func calls mintpy_timeseries2velocity.timefun_names2ds_names
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yunjunz - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
as suggested by sourcery-ai. Reference: https://docs.sourcery.ai/Coding-Assistant/Reference/Rules-and-In-Line-Suggestions/Python/Default-Rules/or-if-exp-identity/
Description of proposed changes
add
timeseries2velocity.py --rm-timfun / --remove-time-functionsoption to specify the time function components to be removed from the residual file, for customized TS clean up, like GNSS time series.add timefun_names2ds_names() to translate the spcified time function names to the corresponding dataset names/index in the design matrix, to facilitate the customized TS clean up.
set default output vel/res filenames for --rm-timefun options
.circleci/config.yml: show total num of integration tests for more informative statusReminders