FFT transformations, RGSpace(zerocenter)
Hi, during a few small tests Martin and me came across a serious problem concerning harmonic transformations. If one uses a RGSpace with npix%2 !=0 and zerocenter=True the FFT gives wrong results (see example res4.val). As the handling of the zerocenter-keyword seems to give rise to various problems and in particular complexity in the code, we have to ask the question "what is it necessary for". If we come to the conclusion that we can drop it in fewer of simplicity, which necessary functionality would we loose?
`x1 = RGSpace(200, zerocenter=False, distances=0.1) k1 = RGRGTransformation.get_codomain(x1, zerocenter=False)
FFT1 = FFTOperator(domain=x1, target=k1, domain_dtype=np.float64, target_dtype=np.complex64)
test_field_1 = Field(x1, val=1.)
res1 = FFT1.inverse_times(FFT1.times(test_field_1))
x2 = RGSpace(200, zerocenter=True, distances=0.1) k2 = RGRGTransformation.get_codomain(x2, zerocenter=True)
FFT2 = FFTOperator(domain=x2, target=k2, domain_dtype=np.float64, target_dtype=np.complex64)
test_field_2 = Field(x2, val=1.)
res2 = FFT2.inverse_times(FFT2.times(test_field_2))
x3 = RGSpace(199, zerocenter=False, distances=0.1) k3 = RGRGTransformation.get_codomain(x3, zerocenter=False)
FFT3 = FFTOperator(domain=x3, target=k3, domain_dtype=np.float64, target_dtype=np.complex64)
test_field_3 = Field(x3, val=1.)
res3 = FFT3.inverse_times(FFT3.times(test_field_3))
x4 = RGSpace(199, zerocenter=True, distances=0.1) k4 = RGRGTransformation.get_codomain(x4, zerocenter=True)
FFT4 = FFTOperator(domain=x4, target=k4, domain_dtype=np.float64, target_dtype=np.complex64)
test_field_4 = Field(x4, val=1.)
res4 = FFT4.inverse_times(FFT4.times(test_field_4))```