Skip to content

Commit 10cb682

Browse files
authored
Merge pull request #67 from opera-adt/dev
v1.0.9
2 parents 117c055 + 6aec186 commit 10cb682

5 files changed

Lines changed: 15 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [1.0.9] - 2026-01-07
10+
11+
### Changed
12+
* Update the delta_window_days from 365 to 60 (i.e. from a year to 2 months). This enforces a baseline to account for some seasonality via its construction.
13+
914
## [1.0.8] - 2025-11-10
1015

1116
### Changed

src/dist_s1_enumerator/dist_enum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def enumerate_one_dist_s1_product(
1717
lookback_strategy: str = 'multi_window',
1818
post_date_buffer_days: int = 1,
1919
max_pre_imgs_per_burst: int | list[int] | tuple[int, ...] = (5, 5, 5),
20-
delta_window_days: int = 365,
20+
delta_window_days: int = 60,
2121
delta_lookback_days: int | list[int] | tuple[int, ...] = 365,
2222
min_pre_imgs_per_burst: int = 1,
2323
tqdm_enabled: bool = True,
@@ -61,7 +61,7 @@ def enumerate_one_dist_s1_product(
6161
- Expects a single integer, tuples/lists will throw an error.
6262
- This means the maximum pre-images on prior to the post-date.
6363
delta_window_days : int, optional
64-
The acceptable window of time to search for pre-image RTC-S1 data. Default is 365 days.
64+
The acceptable window of time to search for pre-image RTC-S1 data. Default is 60 days (or 2 months).
6565
This amounts to roughly `post_date - lookback_days - delta_window_days` to `post_date - lookback_days`.
6666
If lookback strategy is 'multi_window', this means the maximum window of time to search for pre-images on each
6767
anniversary date where `post_date - n * lookback_days` are the anniversary dates for n = 1,....
@@ -235,7 +235,7 @@ def enumerate_dist_s1_products(
235235
min_pre_imgs_per_burst: int = 1,
236236
tqdm_enabled: bool = True,
237237
delta_lookback_days: int = 365,
238-
delta_window_days: int = 365,
238+
delta_window_days: int = 60,
239239
) -> gpd.GeoDataFrame:
240240
"""
241241
Enumerate DIST-S1 products from a stack of RTC-S1 metadata and a list of MGRS tiles.
@@ -275,7 +275,7 @@ def enumerate_dist_s1_products(
275275
anniversary date where `post_date - n * lookback_days` are the anniversary dates for n = 1,....
276276
If lookback strategy is 'immediate_lookback', this must be set to 0.
277277
delta_window_days : int, optional
278-
The acceptable window of time to search for pre-image RTC-S1 data. Default is 365 days.
278+
The acceptable window of time to search for pre-image RTC-S1 data. Default is 60 days (or 2 months).
279279
This amounts to roughly `post_date - lookback_days - delta_window_days` to `post_date - lookback_days`.
280280
If lookback strategy is 'multi_window', this means the maximum window of time to search for pre-images on each
281281
anniversary date where `post_date - n * lookback_days` are the anniversary dates for n = 1,....

src/dist_s1_enumerator/dist_enum_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def enumerate_dist_s1_workflow_inputs(
3434
max_pre_imgs_per_burst: int | list[int] | tuple[int, ...] = (5, 5, 5),
3535
min_pre_imgs_per_burst: int = 1,
3636
delta_lookback_days: int | list[int] | tuple[int, ...] = 365,
37-
delta_window_days: int = 365,
37+
delta_window_days: int = 60,
3838
df_ts: gpd.GeoDataFrame | None = None,
3939
) -> list[dict]:
4040
"""Enumerate the inputs for a DIST-S1 workflow.

tests/test_dist_enum.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def mock_response_from_asf_daac(
6868
2,
6969
), # multiple MGRS tiles over Los Angeles
7070
(['01UBT'], None, 'immediate_lookback', 0, 365, 10, 2), # Aleutian Chain at the antimeridian
71-
(['15RXN'], [63], 'multi_window', 365, 365, (5, 5, 5), 1), # Waxlake delta, VV+VH
71+
(['15RXN'], [63], 'multi_window', 365, 60, (5, 5, 5), 1), # Waxlake delta, VV+VH
7272
],
7373
)
7474
def test_dist_enum_default_strategies(
@@ -273,6 +273,7 @@ def test_dist_enum_one_with_multi_window_with_multiple_polarizations_and_asf_daa
273273
# Need to look back further for valid VV+VH data
274274
delta_lookback_days=(1460, 1095, 730, 365),
275275
max_pre_imgs_per_burst=(3, 3, 3, 4),
276+
delta_window_days=365,
276277
)
277278

278279
assert sorted(df_product.polarizations.unique().tolist()) == ['HH+HV', 'VV+VH']
@@ -305,6 +306,7 @@ def test_dist_enum_one_with_multi_window_with_asf_daac() -> None:
305306
lookback_strategy='multi_window',
306307
delta_lookback_days=(1095, 730, 365),
307308
max_pre_imgs_per_burst=(3, 3, 4),
309+
delta_window_days=365,
308310
)
309311
burst_ids_expected = [
310312
'T144-308024-IW1',
@@ -363,4 +365,5 @@ def test_dist_enum_one_with_multi_window_with_asf_daac_single_polarization() ->
363365
lookback_strategy='multi_window',
364366
delta_lookback_days=(730, 365),
365367
max_pre_imgs_per_burst=(3, 4),
368+
delta_window_days=365,
366369
)

tests/test_dist_enum_inputs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def test_enumerate_dist_s1_workflow_inputs_for_time_series(test_dir: Path) -> No
5555
stop_acq_dt='2024-04-01',
5656
lookback_strategy='multi_window',
5757
delta_lookback_days=365,
58+
delta_window_days=60,
5859
max_pre_imgs_per_burst=5,
5960
df_ts=df_ts,
6061
)

0 commit comments

Comments
 (0)