Commit 335148e5 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

caught an exception during cloud mask calculation

algorithms.L1A_P.L1A_object:
- calc_cloud_mask(): processing now does not fail completely anymore in case of error during cloud mask calculation

updated __version__


Former-commit-id: 9b284fe8
parent bad58d8f
......@@ -15,7 +15,7 @@ from . import config
from .processing.process_controller import process_controller
__version__ = '20170424.01'
__version__ = '20170428.01'
__author__ = 'Daniel Scheffler'
__all__ = ['algorithms',
'io',
......
......@@ -732,8 +732,14 @@ class L1A_object(GMS_object):
self.path_cloud_class_obj = PG.get_path_cloud_class_obj(self.GMS_identifier)
CLD_obj = CLD_P.GmsCloudClassifier(classifier=self.path_cloud_class_obj)
assert CLD_obj, 'Error loading cloud classifier.'
if self.arr.bands == CLD_obj.classifier.n_channels: #FIXME
mask_clouds = CLD_obj(self) # CLD_obj uses self.arr for cloud mask generation
try:
mask_clouds = CLD_obj(self) # CLD_obj uses self.arr for cloud mask generation
except Exception:
mask_clouds = None
self.logger.error('Error during calculation of cloud mask:\n', exc_info=True)
else:
sensorcode = ('%s %s %s' %(self.satellite,self.sensor, self.subsystem)) \
if self.subsystem else '%s %s' %(self.satellite,self.sensor)
......@@ -742,6 +748,7 @@ class L1A_object(GMS_object):
" for the given %s bands. %s bands expected. Cloud masking failed."
%(sensorcode,nbands,CLD_obj.classifier.n_channels), subset)
mask_clouds = None
else:
pathlist_cloud_class_obj = PG.get_path_cloud_class_obj(self.GMS_identifier, get_all=True)
# load_time,proc_time,classifier_name = [],[],[]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment