Started implementation for spectral function calculation