as.spectral function

Function to convert an object into an object of class 'spectral'.