Power spectrum calculation updated