A wavelength and optical path length selection procedure for spectroscopic multicomponent analysis