Fixed fourier sum approach to upshift fix.Working.