afalsafi / RandomFields

0 stars 0 forks source link

symetries in higher dimensions #5

Open sannant opened 4 years ago

sannant commented 4 years ago

I am not shure about this part

https://github.com/afalsafi/RandomFields/blob/33c9ce02f4d70318d3e1a5667836dc9f19c76d12/Random_Field_fourier_synthesis.py#L268-L276

Symmetries

Note on this picture the wavevectors go from qmin, 0, qmax not like in numpy.

In this illustration, I tried to visualise with colors the symmetrize that should exist because the real-space representation is real-valued (nx and ny even). If all the entries after the rfft were independent we would have 2 nx (ny//2 +1) real valued DOF (2 DOF per complex number), and that is more then the nx * ny we had in the real space representation.

The first picture is the result of the rfft along x. In the first and last layers, the exponential in the fourier sery is one (q = 0 or n \pi), so the data is real (green color).

The fourier transformation along y is then basically a rfft again, with complex conjugacy (yellow) and real values at qy = 0 and qy=n \pi

After transforming along z, the symetry is a bit more complicated (orange), with Fourier(a(z).conj) = Fourier(a(-z)).conj

These symmetries are getting a bit complicated, and not necessarily worse the detail work. I wonder if the way the rfft implementations handles these symmetries is well defined, so that we can simply rely on what it is doing.

afalsafi commented 4 years ago

Thanks for your comment. What do you think we should do then? Do you think we can drop this symmetry enforcement? Unfortunately, I do not get the pictures can you please explain a little bit for me?

afalsafi commented 4 years ago

Thanks for your comment. What do you think we should do then? Do you think we can drop this symmetry enforcement?

sannant commented 4 years ago

Sure. I will update my comment but we should also probably discuss this lively, it will be easier.

afalsafi commented 4 years ago
  1. Sorry for my silly question but is the origin located at (0,0,0) in the picture at very below? I guess it is not and it is at the center of the drawn cube.
  2. Does it mean that we have real values in 8 entries and complex conjugacy in 2 directions? Actually, I would really appreciate it if we could discuss it more lively. Do you have access to ZOOM?