Skip to content

Commit

Permalink
lc values must be < num_classes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Jan 1, 2022
1 parent 4d9a729 commit 775824d
Show file tree
Hide file tree
Showing 38 changed files with 16 additions and 15 deletions.
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 modified tests/data/sen12ms/ROIs1158_spring_lc.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1158_spring_s1.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1158_spring_s2.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 modified tests/data/sen12ms/ROIs1868_summer_lc.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1868_summer_s1.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1868_summer_s2.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall/lc_1/ROIs1970_fall_lc_1_p1.tif
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall/lc_1/ROIs1970_fall_lc_1_p2.tif
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall/s1_1/ROIs1970_fall_s1_1_p1.tif
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall/s1_1/ROIs1970_fall_s1_1_p2.tif
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall/s2_1/ROIs1970_fall_s2_1_p1.tif
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall/s2_1/ROIs1970_fall_s2_1_p2.tif
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall_lc.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall_s1.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs1970_fall_s2.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 modified tests/data/sen12ms/ROIs2017_winter_lc.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs2017_winter_s1.tar.gz
Binary file not shown.
Binary file modified tests/data/sen12ms/ROIs2017_winter_s2.tar.gz
Binary file not shown.
7 changes: 4 additions & 3 deletions tests/data/sen12ms/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
}
count = {"lc": 4, "s1": 2, "s2": 13}
dtype = {"lc": np.uint16, "s1": np.float32, "s2": np.uint16}
stop = {"lc": 11, "s1": np.iinfo(np.uint16).max, "s2": np.iinfo(np.uint16).max}

file_list = []
seasons = ["ROIs1158_spring", "ROIs1868_summer", "ROIs1970_fall", "ROIs2017_winter"]
Expand All @@ -51,9 +52,9 @@
meta["dtype"] = dtype[source]
with rasterio.open(os.path.join(directory, filename), "w", **meta) as f:
for j in range(1, count[source] + 1):
data = np.random.randint(
np.iinfo(np.uint16).max, size=(SIZE, SIZE)
).astype(dtype[source])
data = np.random.randint(stop[source], size=(SIZE, SIZE)).astype(
dtype[source]
)
f.write(data, j)

if source == "s2":
Expand Down
24 changes: 12 additions & 12 deletions tests/datasets/test_sen12ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ def dataset(
self, monkeypatch: Generator[MonkeyPatch, None, None], request: SubRequest
) -> SEN12MS:
md5s = [
"85650b52b6c5de282547f837275c0739",
"c6b181319295bc088883591dd549c065",
"7906ec529abad3f7d6f7dbb4517c6e2e",
"257b33b835223a9d033aae0dcd309e1a",
"26117a8c6f27838f98c8961ab35294e8",
"87933d453a15431437697f4701b4d8ed",
"9be07f30e582d11d5529afbd0c623c5a",
"73323197968407645ec155d91fcb4ce9",
"035c9f2edae2e9a0e37c8d63ed4baef3",
"164f940c205965c2b8e41794ccdeeaf5",
"b104631c369e98b96c11a5af5456e9ea",
"c00fc28dc0f36a2ee4a448e01701b58b",
"b7d9e183a460979e997b443517a78ded",
"7131dbb098c832fff84c2b8a0c8f1126",
"b1057fea6ced6d648e5b16efeac352ad",
"2da32111fcfb80939aea7b18c2250fa8",
"c688ad6475660dbdbc36f66a1dd07da7",
"2ecd0dce2a21372513955c604b07e24f",
"dbc84c03edf77a68f789a6f7d2ea66a9",
"3e42a7dc4bb1ecd8c588930bf49b5c2b",
"c29053cb8cf5d75e333b1b51d37f62fe",
"5b6880526bc6da488154092741392042",
"d1b51c39b1013f2779fecf1f362f6c28",
"078def1e13ce4e88632d65f5c73a6259",
"02d5128ac1fc2bf8762091b4f319762d",
"02d5128ac1fc2bf8762091b4f319762d",
]
Expand Down

0 comments on commit 775824d

Please sign in to comment.