Date : June 2020
Copyright : © 2020 by Arthur Maenhout (Locus) and Ann Crabbé (KU Leuven)
Acknowledgements : Jeroen Degerickx (KU Leuven). Documentation:

This file is part of the Spectral Libraries QGIS plugin and python package.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License (COPYING.txt). If not see
class spectral_libraries.core.amuses.Amuses[source]

Bases: object

AMUSES Prunes a spectral library with regard to an image and internal redundancy.

Degerickx, J.; Okujeni, A.; Iordache, M.-D.; Hermy, M.; van der Linden, S.; Somers, B. A Novel Spectral Library Pruning Technique for Spectral Unmixing of Urban Land Cover. Remote Sens. 2017, 9, 565.

static execute(image: numpy.array, library: numpy.array, music_pct: float = 0.9, amuses_pct: float = 0.95, min_eig: int = 15, thresholds: tuple = (0.0002, 0.02), log: callable = <built-in function print>, set_progress: callable = None) → dict[source]

AMUSES Prunes a spectral library with regard to an image and internal redundancy.

  • image – image used for pruning (bands x rows x columns), reflectance, no bad bands
  • library – the original spectral library to be pruned (bands x spectra), reflectance, no bad bands
  • music_pct – final pruned library size for the MUSIC algorithm (in pct)
  • amuses_pct – library size for the AMUSES algorithm (in pct)
  • min_eig – minimum number of eigenvectors to be retained from the image to calculate MUSIC distances,
  • thresholds – low and high threshold for the AMUSES algorithm
  • log – log function
  • set_progress – communicate progress (refer to the progress bar in case of GUI; otherwise print to console)

dictionary with each output metric as a numpy array in a key-value pair - music_indices: library indices after pruning with the MUSIC algorithm - music_eigenvectors: first kf eigenvectors of image subspace (needed for sparse unmixing)

kf = estimated number of eigenvectors in the image estimated by Hysime algorithm

  • music_distances: MUSIC distances of the pruned library spectra to the image, sorted from low to high
  • amuses_indices: library indices after pruning with the AMUSES algorithm

spectral_libraries.core.amuses.printProgress(value: int)[source]

Replacement for the GUI progress bar