Prime Numbers and the Riemann Hypothesis by Mazur and Stein makes use of an interesting function: $$\hat{\Phi}_{\le C}(\theta)=2\sum_{prime\:powers\:p^n\le C}p^{-n/2}\cdot log(p)\cdot cos(n\cdot log(p)\cdot \theta)$$
The function is basically a Fourier transform of symmetrized Dirac $\delta$ functions at the prime powers. Per the authors, the "spikes" of $\hat{\Phi}_{\le C}(\theta)$ "for large $C$ pinpoints the spectrum" $\{\theta_1,\theta_2,\theta_3,... \}$, i.e., the sequence in order of imaginary parts of the non-trivial $\zeta$-function zeros.
As an example, here's what I get with a C program and MATLAB to replicate Figure 32.7 in the book:
That matches the figure very well so I'm pretty sure the code is right. The red lines are at the locations of the the first six $\theta$'s
The first few $\theta_i$ are more or less at the negative peaks. However, increasing $C$ further doesn't really improve the situation:
Shouldn't the $\theta_i$ corresponding to the imaginary parts of the non-trivial $\zeta$-function zeros get more distinct as $C$ increases, not less? Or maybe there's a bug?
EDIT:
Per reuns suggestion of regularizing each term in the sum by $p^{−a^2θ^2n/2}$, here's a comparison of the result at $\theta_1$ using $a=0$ vs. $a=0.1$: