Skip to content

Commit

Permalink
Fix Sentinel-3 OLCI band management #111
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Oct 31, 2023
1 parent 3c2899b commit f815254
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions eoreader/products/optical/s3_olci_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,8 @@ def get_raw_band_paths(self, **kwargs) -> dict:
"""
raw_band_paths = {}
for band in self.get_existing_bands():
band_id = self.bands[band].id

# Get band filename and subdataset
filename = self._replace(self._radiance_file, band=band_id)
filename = self._replace(self._radiance_file, band=self.bands[band].name)

if self.is_archived:
raw_path = path.get_archived_path(self.path, f".*{filename}")
Expand Down Expand Up @@ -508,10 +506,10 @@ def _preprocess(

# Get band regex
if isinstance(band, BandNames):
band_id = self.bands[band].id
band_name = self.bands[band].name
if not subdataset:
subdataset = self._replace(self._radiance_subds, band=band_id)
filename = self._replace(self._radiance_file, band=band_id)
subdataset = self._replace(self._radiance_subds, band=band_name)
filename = self._replace(self._radiance_file, band=band_name)
else:
filename = band

Expand Down

0 comments on commit f815254

Please sign in to comment.