Skip to content

Conversation

@Alex-Lewandowski
Copy link
Contributor

@Alex-Lewandowski Alex-Lewandowski commented Jan 20, 2026

Merge Requirements:

The following requirements must be met for your pull request to be considered for review & merging. Until these requirements are met please mark the pull request as a draft.

Purpose

This PR adds the Stack class, which is used to create stacks of Pair objects. This is a foundational class, which will be used by a near-future SBASNetwork class to automate the creation of connected, multi-annual seasonal SBAS stacks of interferograms. Stack is generalized and includes nothing related to SBAS baselines or assumptions tying scenes to specific dates. Pairs created for any purpose can be applied to a Stack.

Description

A Stack object contains 4+ lists of Pair objects. Each Pair contains a pair of asf_search.ASFProduct objects.

Stack member variables holding lists of Pairs:

  • Stack.full_stack: Every possible pair based on the provided geo_reference scene
    and ASFSearchOptions. This forms a complete network of all represented asf_search.ASFProducts.
  • Stack.remove_list: The list of Pairs to remove from Stack.full_stack, used to create Stack.subset_stack.
  • Stack.subset_stack: The resulting list after removing Stack.Remove_list from Stack.full_stack. This creates a possibly disconnected network of asf_search.ASFProducts.
  • Stack.connected_substacks: A list of lists of Pairs containing each disconnected component of a Stack.subset_stack's asf_search.ASFProduct network. A length of 1 indicates that Stack.subset_stack is a connected network of asf_search.ASFProducts.

Public Stack methods:

  • Stack.remove_pairs(): Adds Pairs to Stack.remove_list and removes them from Stack.subset_stack.
  • Stack.add_pairs(): Adds Pairs to Stack.subset_stack. This either removes them from Stack.remove_list, or if not yet present in the Stack, adds them to Stack.full_stack.
  • Stack.get_scene_ids(): A convenience method that returns a given list of Pairs as a list of tuples of asf_search.ASFProduct product IDs, which is useful when ordering on-demand processing via ASF's HyP3 or HyP3+ services.

Snippet

See examples/Stack.ipynb

Error/Warning/Regression Free

This code runs without any unhandled errors, warnings, or regressions.

Unit Tests

See tests/Stack/test_Stack.py

Target Merge Branch

Your pull request targets the master branch


Checklist

  • Purpose
  • Description
  • Snippet
  • Error/Warning/Regression Free
  • Unit Tests
  • Target Merge Branch

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 96.42857% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.02%. Comparing base (01dd250) to head (d44dde5).

Files with missing lines Patch % Lines
asf_search/Stack.py 96.29% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #410      +/-   ##
==========================================
+ Coverage   80.48%   81.02%   +0.53%     
==========================================
  Files          76       78       +2     
  Lines        3141     3225      +84     
==========================================
+ Hits         2528     2613      +85     
+ Misses        613      612       -1     
Flag Coverage Δ
unittests 81.02% <96.42%> (+0.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants