Applied-GeoSolutions / gips

Geospatial Image Processing System
GNU General Public License v3.0
17 stars 5 forks source link

Sentinel2 processing bug #384

Closed ircwaves closed 7 years ago

ircwaves commented 7 years ago

Bug in processing original style assets here:

            'datastrip-md-re': '^.*/DATASTRIP/.*/.*.xml$', # only XML file under DATASTRIP/

but there are actually other xmls in there with that broad an RE. Reasonable mistake, given how irregular the SAFE format is.

(Pdb) ![fn for fn in self.datafiles() if re.match(file_pattern, fn)]
['S2A_OPER_PRD_MSIL1C_PDMC_20160414T050545_R079_V20160413T095908_20160413T095908.SAFE/DATASTRIP/S2A_OPER_MSI_L1C_DS_SGS__20160413T153626_S20160413T095908_N02.01/QI_DATA/S2A_OPER_MSI_L1C_DS_SGS__20160413T153626_S20160413T095908_GEOMETRIC_QUALITY_report.xml',
 'S2A_OPER_PRD_MSIL1C_PDMC_20160414T050545_R079_V20160413T095908_20160413T095908.SAFE/DATASTRIP/S2A_OPER_MSI_L1C_DS_SGS__20160413T153626_S20160413T095908_N02.01/S2A_OPER_MTD_L1C_DS_SGS__20160413T153626_S20160413T095908.xml']
ircwaves commented 7 years ago

original error message was a bit tough to decipher:

Error:
Traceback (most recent call last):
  File "/scratch/xhuang/code/gips-dev/gips/utils.py", line 470, in cli_error_handler
    yield
  File "/scratch/xhuang/code/gips-dev/gips/inventory/__init__.py", line 325, in process
    self.data[date].process(*args, **kwargs)
  File "/scratch/xhuang/code/gips-dev/gips/tiles.py", line 73, in process
    [t.process(*args, products=self.products.products, **kwargs) for t in self.tiles.values()]
  File "/scratch/xhuang/code/gips-dev/gips/data/core.py", line 1067, in wrapper
    return wrapped_method(self, *args, **kwargs)
  File "/scratch/xhuang/code/gips-dev/gips/data/sentinel2/sentinel2.py", line 1038, in process
    self.rad_toa_geoimage(asset_type, sensor)
  File "/scratch/xhuang/code/gips-dev/gips/data/sentinel2/sentinel2.py", line 847, in rad_toa_geoimage
    radiance_factors = asset_instance.radiance_factors()
  File "/scratch/xhuang/code/gips-dev/gips/data/sentinel2/sentinel2.py", line 559, in radiance_factors
    solar_irrads = self.solar_irradiances()
  File "/scratch/xhuang/code/gips-dev/gips/data/sentinel2/sentinel2.py", line 461, in solar_irradiances
    sil_elem = self.xml_subtree('datastrip', 'Solar_Irradiance_List')
  File "/scratch/xhuang/code/gips-dev/gips/data/sentinel2/sentinel2.py", line 449, in xml_subtree
    return next(tree.iter(subtree_tag))
StopIteration
Fatal: 1 error(s) occurred:
Error:
None