We are trying to make sense of the numbers provided by the PC program FourierPainter for a 2D Fourier Transform of a diffraction pattern.
We would like to evaluate the ratio of the zeroth harmonic to the first harmonic intensities. Refer to the Notebook here. There are references to other Mathematica Stack Exchange Posts here and here in it as well as our analysis. Here is a sample of our code (two$D$image is the import of our image):
fftshift[dat_?ArrayQ, k : (_Integer?Positive | All) : All] :=Module[{dims = Dimensions[dat]}, RotateRight[dat,If[k === All, Quotient[dims, 2], Quotient[dims[[k]], 2] UnitVector[Length[dims], k]]]]
img = ColorConvert[two$D$image, "Grayscale"];
(tst = Abs[fftshift[
Fourier[ImageData[img], FourierParameters -> {1, -1}]]]^2);
(tst$arg = Arg[fftshift[Fourier[ImageData[img], FourierParameters -> {1, -1}]]]);
abs = Log[1 + tst]
Manipulate[DynamicModule[{b = {}, i = slice},Do[AppendTo[b, {j - (2616/2), abs[[j, i]]}],{j, 1, Dimensions[abs][[1]]}];ListPlot[Total[#] & /@ Partition[b, group], PlotLabel -> "Pixels referenced to center " <> ToString[(3488/2) - i], PlotRange -> {Full, Full}]],{{slice, 3488/2}, 1, 3488, 1}, {{group, 1}, InputField}]
FourierPainter gives numbers for this pattern of the order of 5000/3000 for the intensities of the harmonics while Mathematica gives numbers of the order of 10$^{13}$/10$^{11}$ for the power spectrum of the same file. How to reconcile these numbers?
