Fourier series for singular measures and the Kaczmarz algorithm