I would like to evalue the absolute value of the theta function with unit nome, i.e. when $|q|=1$ or equivelantly when $\tau\in\mathbb R$. The theta function is expressed as
$$\vartheta(z;q=e^{\pi i \tau})=\sum_{n=-\infty}^\infty e^{\pi i n^2 \tau}e^{2\pi i n z}=\sum_{n=-\infty}^\infty q^{n^2}e^{2\pi i n z}$$
I understand from a comment on this post that for certain values this can be rewritten in terms of a dirac comb. I.e. for $q$ an $m$-th root of unity (equivelantly $\tau$ is a rational number, and $m$ is the denominator of its simplest form) the expression can be expressed as
$$\sum_{k=0}^{m-1} q^{k^2}\sum_n e^{2i\pi (nm+k) x} =\sum_{k=0}^{m-1} q^{k^2} e^{2i\pi k x} \sum_l \delta(mx-l)$$
And therefore the absolute value of the theta function for $q$ an $m$-th root of unity can be written as
$$|\vartheta(z;q=e^{\pi i \tau})|=\left|\sum_{k=0}^{m-1} q^{k^2} e^{2i\pi k x}\right|\sum_l \delta(mx-l)$$
Is it possible to find an expression of $|\vartheta(z;q=e^{\pi i \tau})|$ in terms of delta functions (or to say it is equal to $0$ or a constant) when $\tau$ is irrational?