What you see and what you get: combining near-infrared spectroscopy with powder diffraction