Method for closure constraint
Force rows of data sum up to given value
constraintClosure(x, d, sum = 1)
x
: data matrix (spectra or contributions)d
: matrix with the original spectral valuessum
: which value the specra or contributions should sum up to