revised process_samples to allow for single wavelength processing