Estimating variance in arbitrary, periodic signal I have a periodic signal $x[m], m \in [0;M-N+1]$ made of modulated templates $s[n],~ n \in [0;N-1],~ N \ll M = NK$ of finite energy and support (i.e. zero outside of its defined interval, which does not extend to infinity). For simplicity, we write thus

$$
x[m] = \sum_{k=1}^{K}A_{k}s[m-n_{k}] + w[m]
$$

with $n_{k}$ the $k$-th repetition of the template modulated by $A_{k}$. The noise term $w[m] \sim \mathcal{N}(\mathbb{0},\sigma^2_{w})$ sums over the whole signal (not just one template) and can be considered i.i.d for each realization.

Is it possible to estimate the variance $\sigma^2_{w}$ of the noise, given this setup? For one, I have seen methods that try to obtain some portion of the signal $x$ where the template $s$ is absent, but in my practical case, that is impossible to obtain. What DSP tricks can be applied in order to obtain this information?
Do a cross correlation with your known $s$; you will get peaks of height $\|s\|A_k$ at the positions of your shifts.

You just sum up these peaks, call that sum $P$, calculate the overall energy in your signal (i.e. $\|x\|$), and calculate $\text{SNR}=\frac P{\|x\|-P}$ if you need the SNR. If you just need the noise: $\|x\|-P$ (quite directly). Done!