marcuspetschlies / cvc

3 stars 7 forks source link

rangauss produces gaussian prns with std dev 1.0 and generate_volume_source does not perform further normalisation #13

Open kostrzewa opened 5 years ago

kostrzewa commented 5 years ago

When this is used to generate a random source via generate_volume_source, this means that additional normalisation of each element will be required, depending on what one would like to achieve, would you agree @marcuspetschlies ? We would like our random source \eta to satisfy:

[\eta_a^{\alpha}(x)]^\ast \eta_b^{\beta}(x) = \delta^{\alpha,\beta}_{a,b} \delta(x,y)

which means that if we sample the real and imaginary components of the elements of \eta from a Gaussian distribution, we need to apply a normalisation factor:

\sigma_a^\alpha = N(0,1) + iN(0,1)
n = sqrt( (\sigma_a^\alpha)^\ast * \sigma_a^\alpha )
-> \eta_a^\alpha = \sigma_a^\alpha / n

such that

\lim_{n_r -> \infty} \eta_a^\alpha \rightarrow 0
(\eta_a^\alpha)^\ast * \eta_a^\alpha = n^2 / n^2 = 1
lim_{n_r -> \infty} (\eta_a^\alpha)^\ast * \eta_b^\beta \rightarrow 0

would you agree?

For Z2 x Z2 noise there is no such problem, of course, up to the factor of 1/sqrt(2) which is correctly applied.