diff --git a/datasets/raise/fft/analyze_fft_ellipses.py b/datasets/raise/fft/analyze_fft_ellipses.py new file mode 100644 index 0000000..49dd3fc --- /dev/null +++ b/datasets/raise/fft/analyze_fft_ellipses.py @@ -0,0 +1,40 @@ +import matplotlib.pyplot as plt +from enum import Enum, auto +import itertools + +class Axis(Enum): + ABSCISSA = auto() + ORDINATE = auto() + + def __str__(self): + return self.name.title() + +# TODO: with right color +# TODO: precising somehow low or high +# TODO: limit axis based on these values +INTERESTING_VALUES_OF_AXES = { + Axis.ABSCISSA: [0, 30, 60, 84], + Axis.ORDINATE: [0, 25, 40, 55], +} + +for axisName, axisProfile in zip(Axis, [secondImage[height // 2, width // 2:], secondImage[height // 2:, width // 2]]): + plt.title('Axis Fourier transform profile') + plt.xlabel('Fourier transform axis') + plt.ylabel('Fourier transform logarithmic intensity') + height, width = secondImage.shape + plt.plot(axisProfile, label = axisName) + +''' +for axis in Axis: + for interestingValueOfAxis in INTERESTING_VALUES_OF_AXES[axis]: + match axis: + case Axis.ABSCISSA: + plt.vlines(interestingValueOfAxis) + #case Axis.ORDINATE: +''' + +#allInterestingValuesOfAxes = list(set(itertools.chain(*INTERESTING_VALUES_OF_AXES.values()))) +plt.xticks(list(plt.xticks()[0]) + allInterestingValuesOfAxes) + +plt.legend() +plt.show() \ No newline at end of file