An implementation of the method published by Goryawala et al MRM 79(6) 2886-2895 (2018). "Spectral decomposition for resolving partial volume effects in MRSI".
spec_decomp(mrs_data, wm, gm, norm_fractions = TRUE)
a list of two mrs_data objects corresponding to the two tissue types.
data to be decomposed into white and gray matter spectra.
vector of white matter contributions to each voxel.
vector of gray matter contributions to each voxel.
option to normalise the wm, gm vectors for each voxel.