  The density distribution in solids is often represented as a sum of Gaussian
peaks (or similar functions) centred on lattice sites or via a Fourier sum.
Here, we argue that representing instead the $\mathit{logarithm}$ of the
density distribution via a Fourier sum is better. We show that truncating such
a representation after only a few terms can be highly accurate for soft matter
crystals. For quasicrystals, this sum does not truncate so easily, nonetheless,
representing the density profile in this way is still of great use, enabling us
to calculate the phase diagram for a 3-dimensional quasicrystal forming system
using an accurate non-local density functional theory.
