1
0
forked from IPKM/nmreval

added f-omega option to log-fourier transform; closes #134

This commit is contained in:
Dominik Demuth
2023-11-09 17:50:29 +01:00
parent dbb35cdba4
commit 9c5d91918f
5 changed files with 78 additions and 28 deletions

View File

@ -16,16 +16,19 @@ class QDeriveIntegrate(QtWidgets.QDialog, Ui_Dialog):
self.start_lineedit.setValidator(QtGui.QDoubleValidator())
self.stop_lineedit.setValidator(QtGui.QDoubleValidator())
self.ft_comboBox.hide()
self.freq_box.hide()
elif self.mode == 'd':
self.setWindowTitle('Differentiation dialog')
self.widget.hide()
self.ft_comboBox.hide()
self.freq_box.hide()
elif self.mode == 'l':
self.setWindowTitle('Logarithmic FT dialog')
self.log_checkbox.hide()
self.widget.hide()
self.freq_box.show()
else:
raise ValueError(f'Unknown mode {mode}, use "d", "i", or "l".')
@ -54,8 +57,10 @@ class QDeriveIntegrate(QtWidgets.QDialog, Ui_Dialog):
self.stop_lineedit.setEnabled(full_range != QtCore.Qt.Checked)
def get_options(self):
opts = {'graph': '' if self.newgraph_checkbox.isChecked() else self.graph_combobox.currentData(),
'mode': self.mode, 'sets': []}
opts = {
'graph': '' if self.newgraph_checkbox.isChecked() else self.graph_combobox.currentData(),
'mode': self.mode, 'sets': []
}
if self.mode == 'i':
start = None
@ -75,6 +80,7 @@ class QDeriveIntegrate(QtWidgets.QDialog, Ui_Dialog):
if self.mode == 'l':
opts['ft_mode'] = ['cos', 'sin', 'complex'][self.ft_comboBox.currentIndex()]
opts['return_f'] = self.freq_box.isChecked()
else:
opts['log'] = self.log_checkbox.isChecked()