Date : August 2018
Copyright : © 2018 - 2020 by Ann Crabbé (KU Leuven)
Acknowledgements : Translated from VIPER Tools 2.0 (UC Santa Barbara, VIPER Lab).
Dar Roberts, Kerry Halligan, Philip Dennison, Kenneth Dudley, Ben Somers, Ann Crabbé

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 www.gnu.org/licenses.
class spectral_libraries.core.ear_masa_cob.EarMasaCob[source]

Bases: object

Calculate EAR, MASA, and CoB values from a spectral library.

  • EAR = Endmember Average RMSE
  • MASA = Minimum Average Spectral Angle
  • CoB = Count based Endmember selection (CoB)

Citation EAR:

Dennison, P.E., Roberts, D.A., 2003, Endmember Selection for Multiple Endmember Spectral Mixture Analysis using Endmember Average RMSE, Remote Sensing of Environment, 87, p. 123-135.

Citation MASA:

Dennison, P.E., Halligan, K. Q., Roberts, D.A., 2004, A Comparison of Error Metrics and Constraints for Multiple Endmember Spectral Mixture Analysis and Spectral Angle Mapper, Remote Sensing of Environment, 93, p. 359-367.

Citations CoB:

Roberts, D.A., Dennison, P.E., Gardner, M.E., Hetzel, Y., Ustin, S.L., Lee, C.T., 2003, Evaluation of the potential of Hyperion for fire danger assessment by comparison to the Airborne Visible/Infrared Imaging Spectrometer, IEEE Transactions on Geoscience and Remote Sensing, 41, p. 1297-1310.

Clark, M., 2005, An assessment of Hyperspectral and LIDAR Remote Sensing for the Monitoring of Tropical Rain Forest Trees, PhD Dissertation, UC Santa Barbara, 319 p.

static execute(library: numpy.array, class_list: numpy.array, constraints: tuple = (-0.05, 1.05, 0.025), reset: bool = True, log: callable = <built-in function print>)[source]

Calculate EAR, MASA and COB parameters.

Beware of the square array used as input! Ideally it is built in ‘reset’ mode. The constraints band has 6 possible values indicating which constraint was breached:

  • 0 = no breach
  • 1/2 = a fraction constraint breached (reset/no reset)
  • 3 = RMSE constraint breached
  • 4/5 = 1/2 (fractions reset/no reset) + 3 (RMSE)
  • library – spectral library [spectra as columns], scaled to reflectance values, without bad bands
  • class_list – str array with the class for each spectrum (e.g. GV or SOIL)
  • constraints – min fraction, max fraction and max RMSE. Use (-9999, -9999, -9999) for unconstrained.
  • reset – fractions are reset to threshold values in case of breach, BEST TURNED ON
  • log – log function

ear, masa, cob_in, cob_out, cob_ratio: all 1-D arrays complementing the original library’s metadata.