Commit 4bf0685f authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

caught an exception during cloud mask calculation

- calc_cloud_mask(): processing now does not fail completely anymore in case of error during cloud mask calculation
updated __version__
Former-commit-id: 9b284fe8
Former-commit-id: 335148e5
parent 0c90da85
......@@ -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',
......@@ -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
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)
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
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