julia functions for PowerSpectrum