`prep_aria`: support for ARIA product v3 correction layers
Description of proposed changes
Reminders
- [ ] Fix #xxxx
- [ ] Pass Pre-commit check (green)
- [ ] 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.
@sssangha @yunjunz Can we move this PR along? Any updated needed @yunjunz?
@sssangha @dbekaert I have made some suggestions for this PR. It would be great if it can be updated and moved forward.
PR Summary
This Pull Request introduces significant enhancements to the prep_aria.py script within the MintPy project, focusing on supporting ARIA product version 3 correction layers. The modifications include:
-
Addition of Correction Layers: The script now supports loading and processing correction layers such as troposphere, ionosphere, and solid earth tides. This is achieved by adding new command-line arguments and functions to handle these layers.
-
Refactoring and Code Cleanup: The
write_ifgram_stackfunction has been refactored to handle multiple stack files more efficiently, reducing redundancy and improving maintainability. The function now accepts a dictionary of stack files, allowing for more flexible input handling. -
Enhanced CLI Examples: The command-line interface examples have been updated to reflect the new capabilities, providing users with clear guidance on how to utilize the new features.
-
Improved Error Handling: The script now includes checks to ensure that all specified files exist before processing, which helps prevent runtime errors.
-
Support for Multiple Troposphere Files: The script can now handle multiple troposphere correction files, enhancing its flexibility in processing different datasets.
Overall, these changes aim to improve the functionality and usability of the prep_aria.py script, enabling more comprehensive processing of ARIA data products.
Review Checklist
- [ ] Fix #xxxx (Not applicable as no issue number is provided)
- [ ] Pass Pre-commit check (green)
- [ ] 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.
Suggestion
To further enhance the maintainability and readability of the code, consider adding more detailed inline comments explaining the purpose of key code blocks, especially in the newly added functions. Additionally, updating the documentation to include examples of how to use the new correction layer features would be beneficial for users.
I hope this addition can be completed soon. We can really use this ionospheric layer support to advance our NISAR Calibration and Validation activities that use ARIA S1-GUNW files.
All @yunjunz suggestions have been addressed, please remove unused args from
cli/prep_aria.pybefore the merge.
Great. I tried to test it last week, but the environment needs to be updated for the new ARIA-tools. I will try it again this weekend.
We found recently that the conda-forge ARIA-tools requires Python 3.12 but ISCE2 only allows versions up to 3.11, so it is not presently possible to make a conda environment with ISCE2, ARIA-tools, and MintPy.
Thanks for the heads-up @EJFielding, I will create a new env for this test then.
Hi @yunjunz and @EJFielding, what's the current status of this PR on your end?
Hi @yunjunz and @EJFielding, what's the current status of this PR on your end?
I won't have time to test the change in the coming few days. Since the PR only changes code in prep_aria, it's fine with me to merge as long as others confirm it works. @EJFielding ?
@EJFielding reported issues with loading the troposphere is ionosphere stacks. I wasn't able to duplicate the issue and successfully loaded both stacks to MintPy. We can tackle the problem via issue tickets if the problem persists.