Quantitative infrared spectroscopy of thin solid and liquid films under attenuated total reflection conditions