Skip to content

Commit

Permalink
Merge pull request #46 from scottstanie/fix-resorb-margin
Browse files Browse the repository at this point in the history
make a smaller `margin0` for RESORB search
  • Loading branch information
scottstanie authored Oct 26, 2023
2 parents 08fbc0f + a8f7694 commit cbe6df9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion eof/scihubclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def query_orbit_by_dt(
products,
dt,
dt + timedelta(minutes=1),
margin0=timedelta(seconds=T_ORBIT - 1),
# For restituted orbits, we need to be more lenient
# and can't use a full orbit margin for the search
margin0=timedelta(seconds=60),
)
if products
else None
Expand Down
7 changes: 7 additions & 0 deletions eof/tests/test_eof.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ def test_download_mission_date(tmpdir):
product = products.SentinelOrbit(filenames[0])
assert product.start_time < datetime.datetime(2020, 1, 1)
assert product.stop_time > datetime.datetime(2020, 1, 1, 23, 59)


def test_edge_issue45(tmpdir):
date = "2023-10-13 11:15:11"
with tmpdir.as_cwd():
filenames = download.main(mission="S1A", date=date)
assert len(filenames) == 1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="sentineleof",
version="0.8.2",
version="0.8.3",
author="Scott Staniewicz",
author_email="[email protected]",
description="Download precise orbit files for Sentinel 1 products",
Expand Down

0 comments on commit cbe6df9

Please sign in to comment.