Skip to content

Commit 76c16c9

Browse files
committed
fix blend to generate when not harmonization flag
1 parent 22cad8e commit 76c16c9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cube_builder_aws/cube_builder_aws/maestro.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ def prepare_merge(self, datacube, irregular_datacube, datasets, satellite, bands
283283
# Build the basics of the merge activity
284284
activity = {}
285285
activity['action'] = 'merge'
286+
activity['bucket_name'] = services.bucket_name
286287
activity['datacube'] = datacube
287288
activity['irregular_datacube'] = irregular_datacube
288289
activity['version'] = version
@@ -295,9 +296,8 @@ def prepare_merge(self, datacube, irregular_datacube, datasets, satellite, bands
295296
activity['resx'] = resx
296297
activity['resy'] = resy
297298
activity['srs'] = crs
298-
activity['nodata'] = nodata
299-
activity['quality_nodata'] = quality_nodata
300-
activity['bucket_name'] = services.bucket_name
299+
activity['nodata'] = int(nodata)
300+
activity['quality_nodata'] = int(quality_nodata)
301301
activity['quality_band'] = quality_band
302302
activity['functions'] = functions
303303
activity['force'] = force
@@ -781,7 +781,7 @@ def next_blend(services, mergeactivity):
781781
blendactivity = {}
782782
blendactivity['action'] = 'blend'
783783
for key in ['datasets', 'satellite', 'bands', 'quicklook', 'srs', 'functions', 'bands_ids',
784-
'tileid', 'start', 'end', 'dirname', 'nodata', 'bucket_name', 'quality_band',
784+
'tileid', 'start', 'end', 'dirname', 'nodata', 'bucket_name', 'quality_band', 'quality_nodata',
785785
'internal_bands', 'force', 'version', 'datacube', 'irregular_datacube', 'mask',
786786
'bands_expressions', 'indexes_only_regular_cube', 'empty_file', 'landsat_harmonization']:
787787
blendactivity[key] = mergeactivity.get(key, '')
@@ -1010,6 +1010,8 @@ def blend(self, activity):
10101010
resolution = 10
10111011
mask_tuples.append((100. * efficacy / resolution, key))
10121012

1013+
mask_tuples = sorted(mask_tuples, reverse=True)
1014+
10131015
provenance_merge_map = dict()
10141016
build_provenance = activity.get('internal_band') == PROVENANCE_NAME
10151017
build_clear_observation = activity.get('internal_band') == CLEAR_OBSERVATION_NAME

0 commit comments

Comments
 (0)