Fixed Fourier basis, untested
Partition function for cross-testing.