A method to remove residual OH emission from near infrared spectra