Commit 8f89ce41 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fix for the wrong number of bandwidth in the L2A output metadata in case...


Fix for the wrong number of bandwidth in the L2A output metadata in case 'vswir_overlap_algorithm' is set to 'vnir_only' or 'swir_only'. Added tests/linting to .gitignore.
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 465a5063
Pipeline #7272 passed with stage
in 47 minutes and 51 seconds
......@@ -199,3 +199,4 @@ fabric.properties
.gitignore
.idea/**
tests/data/test_outputs/
tests/linting/
\ No newline at end of file
......@@ -674,7 +674,7 @@ class EnMAP_Metadata_L2A_MapGeo(object):
# get band index order
wvls_sorted = np.array(sorted(np.hstack([self._meta_l1b.vnir.wvl_center,
self._meta_l1b.swir.wvl_center])))
bandidx_order = np.array([np.argmin(np.abs(wvls_l2a - cwl)) for cwl in wvls_sorted])
bandidx_order = np.array([np.argmin(np.abs(wvls_sorted - cwl)) for cwl in wvls_l2a])
self.wvl_center = np.hstack([meta_l1b.vnir.wvl_center, meta_l1b.swir.wvl_center])[bandidx_order]
self.fwhm = np.hstack([meta_l1b.vnir.fwhm, meta_l1b.swir.fwhm])[bandidx_order]
......
Supports Markdown
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