MintPy
MintPy copied to clipboard
Add `tropo_local_texture.py` for tropo correction (Yang et al., 2024)
Description of proposed changes
This code is based on this work:
- Yang, Q., Yunjun, Z., Wang, R. Y. (2024). Heterogeneous InSAR Tropospheric Correction Based on Local Texture Correlation, IEEE Transactions on Geoscience and Remote Sensing, 62, doi:10.1109/TGRS.2024.3356749.
This code only completes the low resolution part of this work. With the help of Yang Qingyue, it successfully gets almost the same result as in the work above. Some figures during the correction process are shown below:
- Slope Esitimation
- Slope Interpolation
- Intercept Filtering
- Estimated Low-resolution Tropo Delay
Low-resolution correction in Yang' work:
Before corrections
Date: February 3, 2015 and August 21, 2017
After corrections
Date: February 3, 2015 and August 21, 2017
Reminders
- [ ] Fix #xxxx
- [x] Pass Pre-commit check (green)
- [x] Pass Codacy code review (green)
- [ ] Pass Circle CI test (green)
- [ ] Make sure that your code follows our style. Use the other functions/files as a basis.
- [ ] If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.
- [ ] If adding new functionality, add a detailed description to the documentation and/or an example.
Summary by Sourcery
Add a new tropospheric correction method using local texture correlation, based on Yang et al.'s 2024 research. Update the configuration and workflow to support this method, and provide documentation for its usage.
New Features:
- Introduce a new tropospheric correction method based on local texture correlation, as described in Yang et al., 2024.
Enhancements:
- Add support for the 'local_texture' method in the tropospheric delay correction workflow.
Documentation:
- Include documentation for the new 'local_texture' method, detailing its parameters and usage.
Summary by Sourcery
Add a new tropospheric correction method using local texture correlation, based on Yang et al.'s 2024 research. Update the configuration and workflow to support this method, and provide documentation for its usage.
New Features:
- Introduce a new tropospheric correction method based on local texture correlation, as described in Yang et al., 2024.
Enhancements:
- Add support for the 'local_texture' method in the tropospheric delay correction workflow.
Documentation:
- Include documentation for the new 'local_texture' method, detailing its parameters and usage.
💖 Thanks for opening this pull request! Please check out our contributing guidelines. 💖 Keep in mind that all new features should be documented. It helps to write the comments next to the code or below your functions describing all arguments, and return types before writing the code. This will help you think about your code design and usually results in better code.
Reviewer's Guide by Sourcery
This PR introduces a new tropospheric delay correction method based on local texture correlation, implementing the low-resolution component of Yang et al.'s 2024 work. The implementation includes slope estimation, interpolation, and intercept filtering steps to correct tropospheric delays in InSAR time series data.
Sequence diagram for tropospheric delay correction process
sequenceDiagram
participant User
participant CLI
participant TropoLocalTexture
User->>CLI: Run tropo_local_texture.py
CLI->>TropoLocalTexture: run_tropo_local_texture(inps)
TropoLocalTexture->>TropoLocalTexture: read_topographic_data(geom_file)
TropoLocalTexture->>TropoLocalTexture: estimate_local_slope(dem, ts_data, inps, n_ref, meta)
TropoLocalTexture->>TropoLocalTexture: slope_interpolation(ts_data, inps, k_htc)
TropoLocalTexture->>TropoLocalTexture: intercept_filtering(dem, ts_data, inps, k_htc_interp, meta)
TropoLocalTexture-->>CLI: Return corrected data
CLI-->>User: Output corrected timeseries file
Class diagram for the new tropospheric correction method
classDiagram
class TropoLocalTexture {
+read_topographic_data(geom_file)
+estimate_local_slope(dem, ts_data, inps, n_ref, meta)
+slope_interpolation(ts_data, inps, k_htc)
+intercept_filtering(dem, ts_data, inps, k_htc_interp, meta)
+run_tropo_local_texture(inps)
}
class CLI {
+create_parser(subparsers)
+cmd_line_parse(iargs)
+main(iargs)
}
TropoLocalTexture <|-- CLI
note for TropoLocalTexture "This class implements the new tropospheric correction method based on local texture correlation."
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Added new tropospheric correction method using local texture correlation |
|
src/mintpy/tropo_local_texture.pysrc/mintpy/cli/tropo_local_texture.py |
| Updated configuration system to support the new correction method |
|
src/mintpy/defaults/smallbaselineApp.cfgsrc/mintpy/defaults/smallbaselineApp_auto.cfg |
| Integrated new correction method into existing workflow |
|
src/mintpy/smallbaselineApp.py |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it.
- Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted.
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
PR summary
This Pull Request introduces a new method for tropospheric correction in InSAR data processing, based on local texture correlation as described in Yang et al.'s 2024 research. The new method, implemented in tropo_local_texture.py, aims to improve the accuracy of tropospheric delay corrections by leveraging high-frequency texture to estimate local slopes. The PR updates the configuration files and workflow to support this new method and includes documentation for its usage. The changes are expected to enhance the precision of InSAR data analysis by providing an alternative correction method that can be particularly useful in heterogeneous environments.
Suggestion
- Ensure comprehensive testing of the new method across various datasets to validate its effectiveness and robustness.
- Consider adding more detailed comments and documentation within the code to facilitate understanding and future maintenance.
- Evaluate the performance impact of the new method, as the additional computations for local texture correlation might increase processing time.
- Provide a comparison of results with existing methods to highlight the improvements or differences achieved by the new approach.
There is still bug in interpolation step. I can share it with you @Yohcy
There is still bug in interpolation step. I can share it with you @Yohcy
@mohseniaref Could you post your bug here here in the comments?