Implemented calculation of spectral function to get bands