Load ARIA-tools generated ionosphere stack from the template file
- Add the
--ionooption toload_data.pyarguments so when ionosphere file is given in the template, theload_datastep will read theionoStack.vrt. - Fix a bug in
prep_aria.pywhich was causing the script to skip loading toionStack.h5
Summary by Sourcery
Adds the ability to load ARIA-tools generated ionosphere stack from the template file using the --iono option in load_data.py. Fixes a bug in prep_aria.py that prevented loading to ionStack.h5.
New Features:
- Adds the
--ionooption toload_data.pyarguments so when ionosphere file is given in the template, theload_datastep will read theionoStack.vrt.
Bug Fixes:
- Fixes a bug in
prep_aria.pywhich was causing the script to skip loading toionStack.h5
Reviewer's Guide by Sourcery
This pull request introduces the ability to load ionosphere data from a template file using the --iono option in load_data.py. It also fixes a bug in prep_aria.py that was preventing the ionosphere stack from being loaded correctly.
Sequence diagram for loading ionosphere data with load_data.py
sequenceDiagram
participant User
participant load_data.py
participant mintpy.load.ionUnwFile
User->>load_data.py: Executes load_data.py with --iono option
load_data.py->>mintpy.load.ionUnwFile: Reads ionosphere data from file specified by --iono
mintpy.load.ionUnwFile-->>load_data.py: Returns ionosphere data
load_data.py-->>User: Completes data loading
Sequence diagram for loading ionosphere stack with prep_aria.py
sequenceDiagram
participant prep_aria.py
participant writefile.layout_hdf5
prep_aria.py->>writefile.layout_hdf5: Writes ionosphere stack to ionStack.h5
writefile.layout_hdf5-->>prep_aria.py: Completes writing
File-Level Changes
| Change | Details | Files |
|---|---|---|
Added the --iono option to load_data.py to enable reading the ionoStack.vrt file when specified in the template. |
|
src/mintpy/load_data.py |
Fixed a bug in prep_aria.py that prevented loading to ionStack.h5. |
|
src/mintpy/prep_aria.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. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. -
Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the 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 exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. -
Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. -
Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. -
Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review! -
Generate a plan of action for an issue: Comment
@sourcery-ai planon an issue to generate a plan of action for it.
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.
Here is additional context for the bug fix in prep_aria.py:
The issue arises when smallbaselineApp.py is run directly with a template that includes ionoStack.vrt from an ARIA GUNW stack. By default, smallbaselineApp.py calls prep_aria.py with the --update flag, which causes it to skip loading certain files if their output already exists. Since ionStack.h5 is formatted the same as ifgramStack.h5, the prep_aria.py call assumes the output file name as ifgramStack.h5 and skips loading.
However, since ionStack.h5 is never created, the workflow fails at the correct_ionosphere step due to the missing file with TypeError: sequence item 7: expected str instance, NoneType found. This fix reorders the logic to define out_name before the run_or_skip() call, ensuring the conditional correctly considers ionStack.h5 and triggers its loading if needed.
@yunjunz I don't see a specific ARIA test under the tests folder. Please let me know if I should add a tests/test_load_data.py