Skip to content
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

add stdproc.multilook sub-module - WIP for version 2 #1316

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

yunjunz
Copy link
Member

@yunjunz yunjunz commented Feb 6, 2025

Description of proposed changes

  • add stdproc.multilook sub-module (work toward version 2): start moving the low-level standardized processing functions into a new sub-module stdproc.

Other minor changes are:

  • sensor: add HJ-1C from Liu et al. (2014, J Radar), and update LT1's chirp bandwidth based on Wang et al. (2024)

  • utils.utils0: add orbit2los_azimuth_angle

  • reference_point: add run_reference_point() to simplify the logic flow so that cli/reference_point.py is just for the command line interface.

Reminders

  • 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.

Summary by Sourcery

Refactor multilooking functions and update sensor parameters.

New Features:

  • Introduce a new stdproc.multilook sub-module to house low-level standardized processing functions.

Tests:

  • Update sensor parameters for HJ-1C and LT1.

+ add HJ-1C from Liu et al. (2014, J Radar)

+ LT1: update chirp bandwidth based on Wang et al. (2024)
Copy link

sourcery-ai bot commented Feb 6, 2025

Reviewer's Guide by Sourcery

This pull request introduces a new submodule stdproc.multilook for standardized processing functions and updates sensor metadata. It moves the multilook_data and multilook_gdal functions from mintpy to the new submodule, and adds the HJ-1C sensor and updates the LT1 sensor's chirp bandwidth in mintpy.objects.sensor.

Class diagram showing sensor metadata structure

classDiagram
    class HJ1C {
        +altitude: 502e3 m
        +orbit_inclination: 97.3 deg
        +repeat_cycle: 31 day
        +carrier_frequency: 3.13e9 Hz
        +pulse_repetition_frequency: 2600 Hz
        +chirp_bandwidth: 60.0e6 Hz
    }

    class LT1 {
        +altitude: 607e3 m
        +orbit_inclination: 97.6 deg
        +antenna_length: 10.0 m
        +antenna_width: 3.4 m
        +doppler_bandwidth: 2544 Hz
        +pulse_repetition_frequency: 2934 Hz
        +chirp_bandwidth: 80.0e6 Hz
        +azimuth_pixel_size: 2.35 m
        +range_pixel_size: 1.67 m
        +azimuth_resolution: 7.15 m
    }

    note for LT1 "Updated chirp_bandwidth
from 60.0e6 to 80.0e6 Hz"
Loading

File-Level Changes

Change Details Files
Move multilooking functions to a new submodule.
  • Move multilook_data function to stdproc.multilook.
  • Move multilook_gdal function to stdproc.multilook.
  • Remove the original functions from mintpy/multilook.py.
src/mintpy/multilook.py
src/mintpy/stdproc/multilook.py
Add HJ-1C sensor metadata and update LT1 sensor metadata.
  • Add HJ-1C sensor parameters.
  • Update LT1 sensor's chirp bandwidth.
src/mintpy/objects/sensor.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on 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 issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on 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 dismiss on 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 review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    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

Copy link

codeautopilot bot commented Feb 6, 2025

PR Summary

This Pull Request introduces significant changes aimed at enhancing the MintPy software by adding a new sub-module and updating existing functionalities. The key changes include:

  1. Introduction of stdproc.multilook Sub-module: A new sub-module, stdproc.multilook, has been added to house low-level standardized processing functions. This is part of a work-in-progress effort towards version 2 of the software. The functions multilook_data and multilook_gdal have been moved to this new sub-module, promoting better organization and modularity.

  2. Sensor Updates:

    • Added support for the HJ-1C satellite, with parameters sourced from Liu et al. (2014, J Radar).
    • Updated the chirp bandwidth for the LT1 satellite based on Wang et al. (2024).
  3. Refactoring of reference_point.py: The logic flow in reference_point.py has been simplified by introducing the run_reference_point() function. This refactoring aims to streamline the command-line interface logic.

  4. Documentation Update: The module hierarchy documentation has been updated to reflect the addition of the new stdproc sub-module.

  5. Utility Function Addition: A new utility function, orbit2los_azimuth_angle, has been added to convert orbit azimuth angles to line-of-sight azimuth angles.

Review Checklist

  • Pass Pre-commit check (green)
  • Pass Codacy code review (green)
  • Pass Circle CI test (green)
  • Ensure code follows the project's style guidelines
  • Describe changes to function behavior and arguments in comments

Suggestion

To further enhance the clarity and maintainability of the codebase, consider adding more detailed docstrings and comments within the newly added stdproc.multilook sub-module. This will help future developers understand the purpose and usage of each function more easily. Additionally, ensure that any dependencies introduced by the new sub-module are clearly documented and managed within the project's dependency management system.

This comment was generated by AI. Information provided may be incorrect.

Current plan usage: 0%

Have feedback or need help?
Documentation
[email protected]

Copy link

@sourcery-ai sourcery-ai bot left a 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 - here's some feedback:

Overall Comments:

  • Consider removing or archiving the legacy commented-out code in multilook.py to reduce clutter.
  • Replace print statements in multilook_gdal with proper logging to maintain consistency with the rest of the codebase.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

so that `cli/reference_point.py` is just for the command line interface.
+ add `stdproc.multilook` as WIP for version 2: start moving the low-level standardized processing functions into a new sub-module `stdproc`.

+ update `docs/api/module_hierarchy` for the new sub-module
@yunjunz yunjunz merged commit a0079f9 into insarlab:main Feb 6, 2025
7 checks passed
@yunjunz yunjunz deleted the multilook branch February 6, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant