Commit 07994c02 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added band names and center wavelengths to products of...

Added band names and center wavelengths to products of ReferenceCube_Generator.resample_image_spectrally().
parent 969a8215
Pipeline #3172 canceled with stages
......@@ -987,6 +987,9 @@ class ReferenceCube_Generator(object):
SR = SpectralResampler(im_gA.cwl, tgt_srf)
tgt_im = GeoArray(np.zeros((*im_gA.shape[:2], len(tgt_srf.bands)), dtype=np.int16), im_gA.gt, im_gA.prj)
tgt_im.meta.band_meta['wavelength'] = list(tgt_srf.wvl)
tgt_im.bandnames = tgt_srf.LayerBandsAssignment
tiles = im_gA.tiles((1000, 1000)) # use tiles to save memory
for ((rS, rE), (cS, cE)), tiledata in (tqdm(tiles) if progress else tiles):
tgt_im[rS: rE + 1, cS: cE + 1, :] = SR.resample_image(tiledata.astype(np.int16), CPUs=self.CPUs)
......
......@@ -249,6 +249,7 @@ class SRF(object):
self.satellite = GMS_id.satellite if GMS_id else ''
self.sensor = GMS_id.sensor if GMS_id else ''
self.conv = {}
self.LayerBandsAssignment = META.get_LayerBandsAssignment(GMS_id, no_thermal=no_thermal, no_pan=no_pan)
self.no_thermal = no_thermal
self.no_pan = no_pan
self.v = v
......
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