Method for angle constraint
Adds a small portion of mean to contributions or spectra to increase contrast
constraintAngle(x, d, weight = 0.05)
x
: data matrix (spectra or contributions)d
: matrix with the original spectral valuesweight
: how many percent of mean to add (between 0 and 1)