Add analyze_fft_ellipses.py
This commit is contained in:
parent
7a002f8b0d
commit
ffd71ce5b8
40
datasets/raise/fft/analyze_fft_ellipses.py
Normal file
40
datasets/raise/fft/analyze_fft_ellipses.py
Normal file
@ -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()
|
Loading…
x
Reference in New Issue
Block a user