Skip to content

Update support of Fucheng-1 data#1451

Open
Arctic-Ambrun wants to merge 4 commits intoinsarlab:mainfrom
Arctic-Ambrun:main
Open

Update support of Fucheng-1 data#1451
Arctic-Ambrun wants to merge 4 commits intoinsarlab:mainfrom
Arctic-Ambrun:main

Conversation

@Arctic-Ambrun
Copy link

@Arctic-Ambrun Arctic-Ambrun commented Dec 28, 2025

Description of proposed changes

Update support of Fucheng-1 data. Tested in GAMMA+Mintpy.
Despite the difficulty in obtaining data from this satellite, I believe it will be widely used in the future.

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.

Summary by Sourcery

Add initial support for the Fucheng-1 (FC1) SAR satellite in MintPy’s sensor definitions.

New Features:

  • Recognize Fucheng-1/FC1 data via new sensor name aliases.
  • Provide mission and instrument parameters for the Fucheng-1 satellite and register it in the mission configuration mapping.

@welcome
Copy link

welcome bot commented Dec 28, 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 Dec 28, 2025

Reviewer's Guide

Adds initial support for the Fucheng-1 (FC1) SAR sensor by registering its aliases, defining its mission parameters, and wiring it into the mission lookup table used by MintPy/GAMMA workflows.

Sequence diagram for FC1 sensor mission parameter lookup

sequenceDiagram
    actor Analyst
    participant IngestScript
    participant SensorModule
    participant MissionTable

    Analyst->>IngestScript: run_prep_gamma_with_metadata(meta_dict)
    IngestScript->>SensorModule: get_unavco_mission_name(meta_dict)

    SensorModule->>SensorModule: read platform_id from meta_dict
    SensorModule->>SensorModule: normalize_platform_id(platform_id)
    SensorModule->>SensorModule: map alias to key using sensor_name_dict
    Note over SensorModule: fc1 and Fucheng aliases now map to key fc1

    SensorModule->>MissionTable: lookup_mission_params(fc1)
    MissionTable-->>SensorModule: FC1 mission_parameters

    SensorModule-->>IngestScript: mission_name fc1 and parameters
    IngestScript->>IngestScript: configure_gamma_processing(FC1 parameters)
    IngestScript-->>Analyst: FC1 ready in MintPy GAMMA workflow
Loading

Flow diagram for FC1 alias resolution and mission parameter selection

flowchart TD
    A[Start with metadata] --> B[Read platform_id]
    B --> C[Normalize platform_id string]

    C --> D{platform_id in sensor_name_dict aliases}
    D -->|Matches FC1 alias fc1 Fucheng FuCheng1 FuCheng| E[Resolve sensor_key fc1]
    D -->|Matches other sensor alias| F[Resolve sensor_key for other mission]
    D -->|No match| G[Raise unsupported sensor error]

    E --> H[Fetch FC1 params from mission_table]
    H --> I[Use FC1 params in MintPy and GAMMA workflows]

    F --> J[Fetch corresponding mission params]
    J --> I

    G --> K[Stop with error]

    I --> L[End]
    K --> L
Loading

File-Level Changes

Change Details Files
Register Fucheng-1 (FC1) as a recognized sensor alias.
  • Extend the sensor alias mapping to include a new key for Fucheng-1 ('fc1') with several name variants such as 'fucheng' and 'FuCheng-1'
  • (Reviewer note) There is an extra trailing comma after the 'uav' alias entry that will cause a syntax error and should be removed
src/mintpy/objects/sensor.py
Introduce Fucheng-1 (FC1) mission parameter set.
  • Add a new FC1 constant dictionary containing orbit, SAR, and imaging parameters such as altitude, inclination, repeat cycle, carrier frequency, antenna dimensions, bandwidth, sampling frequency, and pixel sizes
  • Document parameter sources in comments, including literature reference, manual corrections from GAMMA par files, and an online table
src/mintpy/objects/sensor.py
Wire FC1 into the mission metadata lookup.
  • Register the FC1 mission parameter dictionary in the global mission mapping so that 'fc1' mission metadata can be retrieved like other supported sensors
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!

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 - I've found 1 issue, and left some high level feedback:

  • There is a syntax error in the sensor alias map: the 'uav' entry ends with ],, instead of a single comma, which will break module import and should be corrected.
  • For the new 'fc1' sensor aliases, consider normalizing the strings (e.g., all lowercase, consistent hyphenation) to match the existing pattern and avoid subtle mismatches when users specify the mission name.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- There is a syntax error in the sensor alias map: the `'uav'` entry ends with `],,` instead of a single comma, which will break module import and should be corrected.
- For the new `'fc1'` sensor aliases, consider normalizing the strings (e.g., all lowercase, consistent hyphenation) to match the existing pattern and avoid subtle mismatches when users specify the mission name.

## Individual Comments

### Comment 1
<location> `src/mintpy/objects/sensor.py:33` </location>
<code_context>
     'sen'   : ['sen', 's1', 's1a', 's1b', 'sent1', 'sentinel1', 'sentinel1a', 'sentinel1b'],
     'tsx'   : ['tsx', 'terra', 'terrasar', 'terrasarx', 'tdx', 'tandemx'],
-    'uav'   : ['uav', 'uavsar'],
+    'uav'   : ['uav', 'uavsar'],,
+    'fc1'   : ['fc1','fucheng', 'FuCheng-1', 'FuCheng'],
 }
</code_context>

<issue_to_address>
**issue (bug_risk):** Remove the extra trailing comma in the UAV alias list to avoid a syntax error.

The double comma makes this line invalid Python. Remove the extra comma so it’s just:

```python
    'uav'   : ['uav', 'uavsar'],
```
</issue_to_address>

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.

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