Read file and perform spectral analysis