This function creates the basis part of the Fourier series for the free energy and the radial diffusion profile. For a bin the basis is calculated with
hereby \(k\) is the number of coefficients, \(i\) is the bin index and \(n\) is the number of the bins.