Adding functions for spectral line removal