This PR re-factored the unmixing code to create a dedicated fractionalCover() function, which includes a keyword argument for shade_normalize=True.
The re-factoring was important because the helper functions (e.g. earthlib.Unmix.SVN()) were all using 'ravioli' code that would have to be edited or updated across each function every time a change was made. Re-factoring now allows for easily implementing new features like keyword arguments.
The shade normalization function adds an array of 0 values as a new spectral endmember to account for brightness differences between shaded and unshaded pixels. Dividing by the estimated shade fraction rescales all the remaining values to sum to one.
This PR re-factored the unmixing code to create a dedicated
fractionalCover()
function, which includes a keyword argument forshade_normalize=True
.The re-factoring was important because the helper functions (e.g.
earthlib.Unmix.SVN()
) were all using 'ravioli' code that would have to be edited or updated across each function every time a change was made. Re-factoring now allows for easily implementing new features like keyword arguments.The shade normalization function adds an array of 0 values as a new spectral endmember to account for brightness differences between shaded and unshaded pixels. Dividing by the estimated shade fraction rescales all the remaining values to sum to one.
Closes #25