mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
feat: added FFT
This commit is contained in:
@ -101,6 +101,12 @@ class EigerPlot(QWidget):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def on_image_update(self):
|
def on_image_update(self):
|
||||||
# TODO first rotate then transpose
|
# TODO first rotate then transpose
|
||||||
|
if self.mask is not None:
|
||||||
|
# self.image = np.ma.masked_array(self.image, mask=self.mask) #TODO test if np works
|
||||||
|
self.image = self.image * (1 - self.mask) + 1
|
||||||
|
|
||||||
|
if self.checkBox_FFT.isChecked():
|
||||||
|
self.image = np.abs(np.fft.fftshift(np.fft.fft2(self.image)))
|
||||||
|
|
||||||
if self.comboBox_rotation.currentIndex() > 0: # rotate
|
if self.comboBox_rotation.currentIndex() > 0: # rotate
|
||||||
self.image = np.rot90(self.image, k=self.comboBox_rotation.currentIndex(), axes=(0, 1))
|
self.image = np.rot90(self.image, k=self.comboBox_rotation.currentIndex(), axes=(0, 1))
|
||||||
@ -111,10 +117,6 @@ class EigerPlot(QWidget):
|
|||||||
if self.checkBox_log.isChecked():
|
if self.checkBox_log.isChecked():
|
||||||
self.image = np.log(self.image)
|
self.image = np.log(self.image)
|
||||||
|
|
||||||
if self.mask is not None:
|
|
||||||
# self.image = np.ma.masked_array(self.image, mask=self.mask) #TODO test if np works
|
|
||||||
self.image = self.image * (1 - self.mask) + 1
|
|
||||||
|
|
||||||
self.imageItem.setImage(self.image, autoLevels=False)
|
self.imageItem.setImage(self.image, autoLevels=False)
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
|
@ -69,9 +69,9 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="checkBox_FFT">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FFT</string>
|
<string>FFT</string>
|
||||||
|
Reference in New Issue
Block a user