There are two techniques observers use in taking IR spectra. There is the classic sequence where one observes the object at two slit positions. i.e. ABBA, etc, and there is the more complex case where one has observed the target along several slit positions.
In the classical case, one simply subtracts frames taken at different slit positions. So one needs to form A-B, B-A, etc. This simple step removes the bias and results in an image with two spectra, one positive and one negative.
In the more complex case, one could build a sky frame from several spectra, as one does when building the sky frame in imaging. This results in an image with only one positive spectrum.