Commit 9ecb82ab authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added some more logging to join functions of AC.

parent a3f433fc
......@@ -930,6 +930,9 @@ class AtmCorr(object):
if self.results.data_ac is not None:
for inObj in self.inObjs:
self.logger.info('Joining image data for %s.' % (inObj.entity_ID if not inObj.subsystem else
'%s_ %s' % (inObj.entity_ID, inObj.subsystem)))
assert isinstance(inObj, L1B_object)
nodata = self.results.nodata[inObj.arr.xgsd] # 2D mask with True outside of image coverage
ac_bandNs = [bandN for bandN in inObj.arr.bandnames if bandN in self.results.data_ac.keys()]
......@@ -977,6 +980,9 @@ class AtmCorr(object):
if self.results.data_errors is not None:
for inObj in self.inObjs:
inObj.logger.info('Joining AC errors for %s.' % (inObj.entity_ID if not inObj.subsystem else
'%s_ %s' % (inObj.entity_ID, inObj.subsystem)))
nodata = self.results.nodata[inObj.arr.xgsd] # 2D mask with True outside of image coverage
ac_bandNs = [bandN for bandN in inObj.arr.bandnames if bandN in self.results.data_ac.keys()]
......@@ -1020,11 +1026,15 @@ class AtmCorr(object):
joined = False
for inObj in self.inObjs:
# delete all previous cloud masks
del inObj.mask_clouds
# append mask_clouds only to the input GMS object with the same dimensions
if inObj.arr.shape[:2] == mask_clouds_ac.shape:
inObj.logger.info('Joining mask_clouds to %s.' % (inObj.entity_ID if not inObj.subsystem else
'%s_ %s' % (inObj.entity_ID, inObj.subsystem)))
inObj.mask_clouds = mask_clouds_ac
inObj.mask_clouds.legend = self.results.mask_clouds.mask_legend # dict(value=string, string=value))
# FIXME legend is not used later
......@@ -1066,8 +1076,12 @@ class AtmCorr(object):
joined = False
for inObj in self.inObjs:
# append mask_clouds only to the input GMS object with the same dimensions
# append mask_clouds confidence only to the input GMS object with the same dimensions
if inObj.arr.shape[:2] == cfd_arr.shape:
inObj.logger.info(
'Joining mask_clouds_confidence to %s.' % (inObj.entity_ID if not inObj.subsystem else
'%s_ %s' % (inObj.entity_ID, inObj.subsystem)))
# set cloud mask confidence array
inObj.mask_clouds_confidence = GeoArray(cfd_arr, inObj.arr.gt, inObj.arr.prj,
nodata=get_outFillZeroSaturated(cfd_arr.dtype)[0])
......
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