Commit 66188ead authored by Niklas Bohn's avatar Niklas Bohn
Browse files

Merge branch 'bugfix/Issue#84' into 'master'

Bugfix/issue#84

See merge request !88
parents 826100b5 4bc3a0c2
......@@ -10,7 +10,7 @@ New features:
*
Bugfixes:
*
* Fixed bug in empirical line function which produced unrealistic peaks in water reflectance spectra.
0.16.1 (2021-03-24)
......
......@@ -124,7 +124,7 @@ def empirical_line_solution(X, rdn_subset, data_l2a_seg, rows, cols, bands, segs
else:
locations_subset = np.zeros((segs, 2))
for i in range(segs):
if np.count_nonzero(segs == i) == 0:
if np.count_nonzero(labels.flat == i) == 0:
pass
else:
locations_subset[i, :] = locations[labels.flat == i, :].mean(axis=0)
......
......@@ -111,11 +111,11 @@ def sicor_ac_enmap(enmap_l1b, options, unknowns=False, logger=None):
respect_keystone=False)
logger.info("Segmenting VNIR data cube according to transformed SWIR segmentation labels...")
vnir_rdn_subset = np.zeros((1, labels_trans.max(), fo_enmap.data_vnir.shape[2]))
vnir_cwv_subset = np.zeros((1, labels_trans.max()))
vnir_pt_subset = np.zeros((1, labels_trans.max(), fo_enmap.pt_vnir.shape[2]))
vnir_rdn_subset = np.zeros((1, np.unique(labels_trans).shape[0], fo_enmap.data_vnir.shape[2]))
vnir_cwv_subset = np.zeros((1, np.unique(labels_trans).shape[0]))
vnir_pt_subset = np.zeros((1, np.unique(labels_trans).shape[0], fo_enmap.pt_vnir.shape[2]))
for ii in range(labels_trans.max()):
for ii in range(np.unique(labels_trans).shape[0]):
if np.count_nonzero(labels_trans == ii) == 0:
pass
else:
......
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