Began work on function calcPowerSpectrum