Differentiable probabilistic models of scientific imaging with the Fourier slice theorem