use average k mode from binning in powerspectrum()