Skip to content

Commit

Permalink
s2c: add B10
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Mar 27, 2023
1 parent 05dab7d commit 1fd7a2b
Show file tree
Hide file tree
Showing 196 changed files with 25 additions and 21 deletions.
39 changes: 21 additions & 18 deletions tests/data/ssl4eo/s12/data.py
Expand Up @@ -20,7 +20,7 @@
FILENAME_HIERARCHY = Union[Dict[str, "FILENAME_HIERARCHY"], List[str]]

s1 = ["VH.tif", "VV.tif"]
s2 = [
s2c = [
"B1.tif",
"B2.tif",
"B3.tif",
Expand All @@ -31,9 +31,12 @@
"B8.tif",
"B8A.tif",
"B9.tif",
"B10.tif",
"B11.tif",
"B12.tif",
]
s2a = s2c.copy()
s2a.remove("B10.tif")
filenames: FILENAME_HIERARCHY = {
"s1": {
"0000000": {
Expand All @@ -51,30 +54,30 @@
},
"s2c": {
"0000000": {
"20200323T162931_20200323T163750_T15QXA": s2,
"20200621T162901_20200621T164746_T15QXA": s2,
"20200924T162929_20200924T164434_T15QXA": s2,
"20201228T163711_20201228T164519_T15QXA": s2,
"20200323T162931_20200323T163750_T15QXA": s2c,
"20200621T162901_20200621T164746_T15QXA": s2c,
"20200924T162929_20200924T164434_T15QXA": s2c,
"20201228T163711_20201228T164519_T15QXA": s2c,
},
"0000001": {
"20201104T135121_20201104T135117_T21KXT": s2,
"20210123T135111_20210123T135113_T21KXT": s2,
"20210508T135109_20210508T135519_T21KXT": s2,
"20210811T135121_20210811T135115_T21KXT": s2,
"20201104T135121_20201104T135117_T21KXT": s2c,
"20210123T135111_20210123T135113_T21KXT": s2c,
"20210508T135109_20210508T135519_T21KXT": s2c,
"20210811T135121_20210811T135115_T21KXT": s2c,
},
},
"s2a": {
"0000000": {
"20200323T162931_20200323T163750_T15QXA": s2,
"20200621T162901_20200621T164746_T15QXA": s2,
"20200924T162929_20200924T164434_T15QXA": s2,
"20201228T163711_20201228T164519_T15QXA": s2,
"20200323T162931_20200323T163750_T15QXA": s2a,
"20200621T162901_20200621T164746_T15QXA": s2a,
"20200924T162929_20200924T164434_T15QXA": s2a,
"20201228T163711_20201228T164519_T15QXA": s2a,
},
"0000001": {
"20201104T135121_20201104T135117_T21KXT": s2,
"20210123T135111_20210123T135113_T21KXT": s2,
"20210508T135109_20210508T135519_T21KXT": s2,
"20210811T135121_20210811T135115_T21KXT": s2,
"20201104T135121_20201104T135117_T21KXT": s2a,
"20210123T135111_20210123T135113_T21KXT": s2a,
"20210508T135109_20210508T135519_T21KXT": s2a,
"20210811T135121_20210811T135115_T21KXT": s2a,
},
},
}
Expand All @@ -101,7 +104,7 @@ def create_file(path: str) -> None:
if path.endswith("VH.tif") or path.endswith("VV.tif"):
profile["dtype"] = "float32"

if path.endswith("B1.tif") or path.endswith("B9.tif"):
if path.endswith("B1.tif") or path.endswith("B9.tif") or path.endswith("B10.tif"):
profile["width"] = profile["height"] = SIZE // 6
elif (
path.endswith("B5.tif")
Expand Down
Binary file modified tests/data/ssl4eo/s12/s1.tar.gz
Binary file not shown.
Binary file modified tests/data/ssl4eo/s12/s2_l1c.tar.gz
Binary file not shown.
Binary file modified tests/data/ssl4eo/s12/s2_l2a.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/datasets/test_ssl4eo.py
Expand Up @@ -21,13 +21,13 @@ class TestSSL4EOS12:
@pytest.fixture(params=zip(SSL4EOS12.metadata.keys(), [1, 1, 2]))
def dataset(self, monkeypatch: MonkeyPatch, request: SubRequest) -> SSL4EOS12:
monkeypatch.setitem(
SSL4EOS12.metadata["s1"], "md5", "1e161086eeeda0571643fcea887f4fa4"
SSL4EOS12.metadata["s1"], "md5", "1661fd407a49a0fbe8c6a5073734a731"
)
monkeypatch.setitem(
SSL4EOS12.metadata["s2c"], "md5", "fe06c6d1e51056686e9c664aa7f8aec4"
SSL4EOS12.metadata["s2c"], "md5", "4946a093ea88db0f75955be318901b82"
)
monkeypatch.setitem(
SSL4EOS12.metadata["s2a"], "md5", "0c7d7dfcb83917a4ec297187f66ea91b"
SSL4EOS12.metadata["s2a"], "md5", "36944718ff658b65ca4d8724918500ac"
)

root = os.path.join("tests", "data", "ssl4eo", "s12")
Expand Down
1 change: 1 addition & 0 deletions torchgeo/datasets/ssl4eo.py
Expand Up @@ -71,6 +71,7 @@ class SSL4EOS12(NonGeoDataset):
"B8",
"B8A",
"B9",
"B10",
"B11",
"B12",
],
Expand Down

0 comments on commit 1fd7a2b

Please sign in to comment.