Commit ff76bb2c authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix

misc.definition_dicts:
- get_mask_colormap(): updated colormap for cloud mask

- updated __version__
parent 7eadb76c
...@@ -15,7 +15,7 @@ from . import config ...@@ -15,7 +15,7 @@ from . import config
from .processing.process_controller import process_controller from .processing.process_controller import process_controller
__version__ = '20170124.02' __version__ = '20170124.03'
__author__ = 'Daniel Scheffler' __author__ = 'Daniel Scheffler'
__all__ = ['algorithms', __all__ = ['algorithms',
'io', 'io',
......
...@@ -75,6 +75,8 @@ class Job: ...@@ -75,6 +75,8 @@ class Job:
self.CPUs = multiprocessing.cpu_count() self.CPUs = multiprocessing.cpu_count()
#self.CPUs = 1 #self.CPUs = 1
self.allow_subMultiprocessing = True # allows multiprocessing within workers self.allow_subMultiprocessing = True # allows multiprocessing within workers
self.disable_exception_handler = True # disables automatic handling of unexpected exceptions
self.profiling = False
self.benchmark_global = False self.benchmark_global = False
# bench_CLD_class = True # bench_CLD_class = True
...@@ -83,8 +85,7 @@ class Job: ...@@ -83,8 +85,7 @@ class Job:
self.SZA_SAA_calculation_accurracy = 'coarse' self.SZA_SAA_calculation_accurracy = 'coarse'
self.export_VZA_SZA_SAA_RAA_stats = True self.export_VZA_SZA_SAA_RAA_stats = True
self.export_L1C_obj_dumps = False self.export_L1C_obj_dumps = False
self.profiling = False
self.disable_exception_handler = False # disables automatic handling of unexpected exceptions
self.path_earthSunDist = absP('./database/earth_sun_distance/Earth_Sun_distances_per_day_edited.csv') self.path_earthSunDist = absP('./database/earth_sun_distance/Earth_Sun_distances_per_day_edited.csv')
self.path_SRFs = absP('./database/srf/') self.path_SRFs = absP('./database/srf/')
self.path_cloud_classif = absP('./database/cloud_classifier/') self.path_cloud_classif = absP('./database/cloud_classifier/')
......
...@@ -91,6 +91,22 @@ def get_mask_classdefinition(maskname): ...@@ -91,6 +91,22 @@ def get_mask_classdefinition(maskname):
raise ValueError('%s is not a supported mask name.') raise ValueError('%s is not a supported mask name.')
def get_mask_colormap(maskname):
if maskname == 'mask_clouds':
#return collections.OrderedDict(zip(['No data','Clear','Thick Clouds','Thin Clouds','Snow','Unknown Class'],
# [[0,0,0] ,[0,255,0],[80,80,80], [175,175,175],[255,255,255],[255,0,0]]))
return collections.OrderedDict( (
('No data', [0,0,0]),
('Clear', [0,255,0]),
('Water', [0,0,255]),
('Shadow', [50,50,50]),
('Cirrus', [175,175,175]),
('Cloud', [80,80,80]),
('Snow', [255,255,255]),
('Unknown Class', [255,0,0]), ) )
else: return None
def get_outFillZeroSaturated(dtype): def get_outFillZeroSaturated(dtype):
"""Returns the values for 'fill-', 'zero-' and 'saturated' pixels of an image """Returns the values for 'fill-', 'zero-' and 'saturated' pixels of an image
to be written with regard to the target data type. to be written with regard to the target data type.
...@@ -106,13 +122,6 @@ def get_outFillZeroSaturated(dtype): ...@@ -106,13 +122,6 @@ def get_outFillZeroSaturated(dtype):
return dict_outFill[dtype], dict_outZero[dtype], dict_outSaturated[dtype] return dict_outFill[dtype], dict_outZero[dtype], dict_outSaturated[dtype]
def get_mask_colormap(maskname):
if maskname == 'mask_clouds':
return collections.OrderedDict(zip(['No data','Clear','Thick Clouds','Thin Clouds','Snow','Unknown Class'],
[[0,0,0] ,[0,255,0],[80,80,80], [175,175,175],[255,255,255],[255,0,0]]))
else: return None
def is_dataset_provided_as_fullScene(GMS_identifier): def is_dataset_provided_as_fullScene(GMS_identifier):
# type: (dict) -> bool # type: (dict) -> bool
"""Returns True if the dataset belonging to the given GMS_identifier is provided as full scene and returns False if """Returns True if the dataset belonging to the given GMS_identifier is provided as full scene and returns False if
......
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