Measurement of Frequency Shifts Using Infrared or Raman Difference Spectroscopy