Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Feb 9, 2025
1 parent c87eea6 commit 39290ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion torchgeo/datasets/ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,12 @@ def __getitem__(self, index: int) -> dict[str, Tensor]:
directory = os.path.join(root, subdir)
if match := re.match(filename_regex, subdir):
date_str = match.group('date')
mint, maxt = disambiguate_timestamp(date_str, Sentinel.date_format)
match self.split:
case 's1':
date_format = Sentinel1.date_format
case 's2c' | 's2a':
date_format = Sentinel2.date_format
mint, maxt = disambiguate_timestamp(date_str, date_format)
for band in self.bands:
match self.split:
case 's1':
Expand Down

0 comments on commit 39290ab

Please sign in to comment.