An Intelligent Acquisition System for Near Infrared Spectroscopy