Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nozadkhalil
Copy link
Contributor

@nozadkhalil nozadkhalil commented Jul 12, 2025

Description of proposed changes

  • prep_hyp3.add_hyp3_metadata(): add equation to calculate the relative orbit for Sentinel-1C.

Reminders

  • Fix Sentinel 1-C data is not accepted as input for hyp3 productsΒ #1391
  • 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

Bug Fixes:

  • Implement the equation for calculating the relative orbit of Sentinel-1C

Fix bug: Equation for calculating the relative orbit for Sentinel-1C has been added.
@welcome
Copy link

welcome bot commented Jul 12, 2025

πŸ’– 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.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 12, 2025

Reviewer's Guide

Added support for Sentinel-1C in the relative orbit calculation by introducing a new branch with its specific equation in prep_hyp3.py.

Class diagram for updated relative orbit calculation in prep_hyp3.py

classDiagram
    class prep_hyp3 {
        +add_hyp3_metadata(fname, meta, is_ifg=True)
    }
    prep_hyp3 : +relative_orbit (for S1A)
    prep_hyp3 : +relative_orbit (for S1B)
    prep_hyp3 : +relative_orbit (for S1C)  %% newly added
    prep_hyp3 : +ValueError for unknown Sentinel-1 satellite
Loading

File-Level Changes

Change Details Files
Add Sentinel-1C relative orbit calculation logic
  • Inserted an elif clause for granule strings starting with 'S1C'
  • Applied the equation ((abs_orbit - 172) % 175) + 1 for S1C
src/mintpy/prep_hyp3.py

Possibly linked issues

  • #0: PR adds Sentinel-1C support to prep_hyp3.py, fixing the unrecognized satellite error from the issue.

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!

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
Contributor

@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 @nozadkhalil - I've reviewed your changes and they look great!


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.

@yunjunz yunjunz changed the title Add S1C to prep_hyp3.py prep_hyp3: support Sentinel-1C Jul 12, 2025
Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @nozadkhalil.

@yunjunz yunjunz merged commit fa3d6bf into insarlab:main Jul 12, 2025
8 checks passed
@welcome
Copy link

welcome bot commented Jul 12, 2025

πŸŽ‰ πŸŽ‰ πŸŽ‰ Congrats on merging your first pull request! We here at behaviorbot are proud of you! πŸŽ‰ πŸŽ‰ πŸŽ‰

@nozadkhalil
Copy link
Contributor Author

I hope to be able to contribute more...

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.

Sentinel 1-C data is not accepted as input for hyp3 products

2 participants