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

Fix for not referencing accuracy layers on disk if L2C object is created from disk.

parent 2574a5a3
......@@ -139,10 +139,19 @@ class path_generator(object):
return os.path.join(self.get_path_procdata(), '%s_masks_%s.bsq' % (self.get_baseN(), self.proc_level))
def get_path_cloudmaskdata(self):
"""Returns the path of the *_masks_*.bsq file belonging to the given processing level,
"""Returns the path of the *_mask_clouds_*.bsq file belonging to the given processing level,
e.g. '/path/to/file/file_mask_clouds_L1A.bsq'."""
return os.path.join(self.get_path_procdata(), '%s_mask_clouds_%s.bsq' % (self.get_baseN(), self.proc_level))
def get_path_accuracylayers(self):
"""Returns the path of the *_accuracy_layers_*.bsq file, e.g., '/path/to/file/file_accuracy_layers_L2C.bsq'.
NOTE: Accuracy layers are only present in L2C.
"""
if self.proc_level == 'L2C':
return os.path.join(self.get_path_procdata(), '%s_accuracy_layers_%s.bsq'
% (self.get_baseN(), self.proc_level))
def get_path_tempdir(self):
path_archive = self.get_local_archive_path_baseN()
RootName = os.path.splitext(os.path.basename(path_archive))[0]
......
......@@ -931,6 +931,7 @@ class GMS_object(object):
GMS_obj.arr = GMS_obj.pathGen.get_path_imagedata()
# self.mask_nodata and self.mask_clouds are auto-synchronized via self.masks (see their getters):
GMS_obj.masks = GMS_obj.pathGen.get_path_maskdata()
GMS_obj.accuracy_layers = GMS_obj.pathGen.get_path_accuracylayers()
return GMS_obj
......
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