Add band averaging to psd function