Added Gb distribution to YAFF menu

This commit is contained in:
Markus Rosenstihl 2014-09-24 16:19:46 +02:00
parent 1fe6057cd6
commit 0a32f6576a
4 changed files with 56 additions and 51 deletions

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'YAFFConfig.ui' # Form implementation generated from reading ui file 'YAFFConfig.ui'
# #
# Created: Tue Jul 29 08:56:48 2014 # Created: Tue Sep 23 21:38:12 2014
# by: PyQt4 UI code generator 4.11.1 # by: PyQt4 UI code generator 4.11.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -12,21 +12,19 @@ from PyQt4 import QtCore, QtGui
try: try:
_fromUtf8 = QtCore.QString.fromUtf8 _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError: except AttributeError:
def _fromUtf8( s ): def _fromUtf8(s):
return s return s
try: try:
_encoding = QtGui.QApplication.UnicodeUTF8 _encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
def _translate( context, text, disambig ):
return QtGui.QApplication.translate(context, text, disambig, _encoding) return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError: except AttributeError:
def _translate( context, text, disambig ): def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig) return QtGui.QApplication.translate(context, text, disambig)
class Ui_Dialog(object): class Ui_Dialog(object):
def setupUi( self, Dialog ): def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(250, 229) Dialog.resize(250, 229)
self.gridLayout_3 = QtGui.QGridLayout(Dialog) self.gridLayout_3 = QtGui.QGridLayout(Dialog)
@ -87,7 +85,7 @@ class Ui_Dialog(object):
self.gridLayout_3.addWidget(self.groupBox_tau, 1, 0, 1, 1) self.gridLayout_3.addWidget(self.groupBox_tau, 1, 0, 1, 1)
self.buttonBox = QtGui.QDialogButtonBox(Dialog) self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.gridLayout_3.addWidget(self.buttonBox, 2, 0, 1, 1) self.gridLayout_3.addWidget(self.buttonBox, 2, 0, 1, 1)
@ -96,22 +94,14 @@ class Ui_Dialog(object):
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi( self, Dialog ): def retranslateUi(self, Dialog):
Dialog.setWindowTitle(_translate("Dialog", "YAFF Configuration", None)) Dialog.setWindowTitle(_translate("Dialog", "YAFF Configuration", None))
self.groupBox_time.setTitle(_translate("Dialog", "Time values (log10[t])", None)) self.groupBox_time.setTitle(_translate("Dialog", "Time values (log10[t])", None))
self.label.setText(_translate("Dialog", self.label.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">min</span></p></body></html>", None))
"<html><head/><body><p>t<span style=\" vertical-align:sub;\">min</span></p></body></html>", self.label_2.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">max</span></p></body></html>", None))
None))
self.label_2.setText(_translate("Dialog",
"<html><head/><body><p>t<span style=\" vertical-align:sub;\">max</span></p></body></html>",
None))
self.label_3.setText(_translate("Dialog", "N", None)) self.label_3.setText(_translate("Dialog", "N", None))
self.groupBox_tau.setTitle(_translate("Dialog", "τ-Distribution (log10[τ])", None)) self.groupBox_tau.setTitle(_translate("Dialog", "τ-Distribution (log10[τ])", None))
self.label_7.setText(_translate("Dialog", self.label_7.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">min</span></p></body></html>", None))
"<html><head/><body><p>t<span style=\" vertical-align:sub;\">min</span></p></body></html>", self.label_8.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">max</span></p></body></html>", None))
None))
self.label_8.setText(_translate("Dialog",
"<html><head/><body><p>t<span style=\" vertical-align:sub;\">max</span></p></body></html>",
None))
self.label_9.setText(_translate("Dialog", "N", None)) self.label_9.setText(_translate("Dialog", "N", None))

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'YAFFparameters.ui' # Form implementation generated from reading ui file 'YAFFparameters.ui'
# #
# Created: Tue Jul 29 08:56:48 2014 # Created: Tue Sep 23 21:38:12 2014
# by: PyQt4 UI code generator 4.11.1 # by: PyQt4 UI code generator 4.11.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -12,21 +12,19 @@ from PyQt4 import QtCore, QtGui
try: try:
_fromUtf8 = QtCore.QString.fromUtf8 _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError: except AttributeError:
def _fromUtf8( s ): def _fromUtf8(s):
return s return s
try: try:
_encoding = QtGui.QApplication.UnicodeUTF8 _encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
def _translate( context, text, disambig ):
return QtGui.QApplication.translate(context, text, disambig, _encoding) return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError: except AttributeError:
def _translate( context, text, disambig ): def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig) return QtGui.QApplication.translate(context, text, disambig)
class Ui_Form(object): class Ui_Form(object):
def setupUi( self, Form ): def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form")) Form.setObjectName(_fromUtf8("Form"))
Form.resize(300, 322) Form.resize(300, 322)
self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout = QtGui.QGridLayout(Form)
@ -42,7 +40,7 @@ class Ui_Form(object):
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1")) self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
self.gridLayout.addWidget(self.checkBox_1, 2, 3, 1, 1) self.gridLayout.addWidget(self.checkBox_1, 2, 3, 1, 1)
self.label_422 = QtGui.QLabel(Form) self.label_422 = QtGui.QLabel(Form)
self.label_422.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_422.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_422.setObjectName(_fromUtf8("label_422")) self.label_422.setObjectName(_fromUtf8("label_422"))
self.gridLayout.addWidget(self.label_422, 7, 0, 1, 1) self.gridLayout.addWidget(self.label_422, 7, 0, 1, 1)
self.label_10 = QtGui.QLabel(Form) self.label_10 = QtGui.QLabel(Form)
@ -62,7 +60,7 @@ class Ui_Form(object):
self.doubleSpinBox_4.setObjectName(_fromUtf8("doubleSpinBox_4")) self.doubleSpinBox_4.setObjectName(_fromUtf8("doubleSpinBox_4"))
self.gridLayout.addWidget(self.doubleSpinBox_4, 7, 1, 1, 1) self.gridLayout.addWidget(self.doubleSpinBox_4, 7, 1, 1, 1)
self.label_111 = QtGui.QLabel(Form) self.label_111 = QtGui.QLabel(Form)
self.label_111.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_111.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_111.setObjectName(_fromUtf8("label_111")) self.label_111.setObjectName(_fromUtf8("label_111"))
self.gridLayout.addWidget(self.label_111, 2, 0, 1, 1) self.gridLayout.addWidget(self.label_111, 2, 0, 1, 1)
self.label_4 = QtGui.QLabel(Form) self.label_4 = QtGui.QLabel(Form)
@ -85,11 +83,11 @@ class Ui_Form(object):
self.label_5.setObjectName(_fromUtf8("label_5")) self.label_5.setObjectName(_fromUtf8("label_5"))
self.gridLayout.addWidget(self.label_5, 8, 2, 1, 1) self.gridLayout.addWidget(self.label_5, 8, 2, 1, 1)
self.label_522 = QtGui.QLabel(Form) self.label_522 = QtGui.QLabel(Form)
self.label_522.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_522.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_522.setObjectName(_fromUtf8("label_522")) self.label_522.setObjectName(_fromUtf8("label_522"))
self.gridLayout.addWidget(self.label_522, 8, 0, 1, 1) self.gridLayout.addWidget(self.label_522, 8, 0, 1, 1)
self.label_112 = QtGui.QLabel(Form) self.label_112 = QtGui.QLabel(Form)
self.label_112.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_112.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_112.setObjectName(_fromUtf8("label_112")) self.label_112.setObjectName(_fromUtf8("label_112"))
self.gridLayout.addWidget(self.label_112, 12, 0, 1, 1) self.gridLayout.addWidget(self.label_112, 12, 0, 1, 1)
self.label_9 = QtGui.QLabel(Form) self.label_9 = QtGui.QLabel(Form)
@ -109,7 +107,7 @@ class Ui_Form(object):
self.label_6.setObjectName(_fromUtf8("label_6")) self.label_6.setObjectName(_fromUtf8("label_6"))
self.gridLayout.addWidget(self.label_6, 9, 2, 1, 1) self.gridLayout.addWidget(self.label_6, 9, 2, 1, 1)
self.label_type = QtGui.QLabel(Form) self.label_type = QtGui.QLabel(Form)
self.label_type.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_type.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_type.setObjectName(_fromUtf8("label_type")) self.label_type.setObjectName(_fromUtf8("label_type"))
self.gridLayout.addWidget(self.label_type, 0, 0, 1, 1) self.gridLayout.addWidget(self.label_type, 0, 0, 1, 1)
self.doubleSpinBox_3 = QtGui.QDoubleSpinBox(Form) self.doubleSpinBox_3 = QtGui.QDoubleSpinBox(Form)
@ -129,15 +127,15 @@ class Ui_Form(object):
self.label_2.setObjectName(_fromUtf8("label_2")) self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout.addWidget(self.label_2, 3, 2, 1, 1) self.gridLayout.addWidget(self.label_2, 3, 2, 1, 1)
self.label_102 = QtGui.QLabel(Form) self.label_102 = QtGui.QLabel(Form)
self.label_102.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_102.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_102.setObjectName(_fromUtf8("label_102")) self.label_102.setObjectName(_fromUtf8("label_102"))
self.gridLayout.addWidget(self.label_102, 13, 0, 1, 1) self.gridLayout.addWidget(self.label_102, 13, 0, 1, 1)
self.label_222 = QtGui.QLabel(Form) self.label_222 = QtGui.QLabel(Form)
self.label_222.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_222.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_222.setObjectName(_fromUtf8("label_222")) self.label_222.setObjectName(_fromUtf8("label_222"))
self.gridLayout.addWidget(self.label_222, 3, 0, 1, 1) self.gridLayout.addWidget(self.label_222, 3, 0, 1, 1)
self.label_322 = QtGui.QLabel(Form) self.label_322 = QtGui.QLabel(Form)
self.label_322.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_322.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_322.setObjectName(_fromUtf8("label_322")) self.label_322.setObjectName(_fromUtf8("label_322"))
self.gridLayout.addWidget(self.label_322, 5, 0, 1, 1) self.gridLayout.addWidget(self.label_322, 5, 0, 1, 1)
self.doubleSpinBox_9 = QtGui.QDoubleSpinBox(Form) self.doubleSpinBox_9 = QtGui.QDoubleSpinBox(Form)
@ -170,11 +168,11 @@ class Ui_Form(object):
self.label_3.setObjectName(_fromUtf8("label_3")) self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout.addWidget(self.label_3, 5, 2, 1, 1) self.gridLayout.addWidget(self.label_3, 5, 2, 1, 1)
self.label_82 = QtGui.QLabel(Form) self.label_82 = QtGui.QLabel(Form)
self.label_82.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_82.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_82.setObjectName(_fromUtf8("label_82")) self.label_82.setObjectName(_fromUtf8("label_82"))
self.gridLayout.addWidget(self.label_82, 11, 0, 1, 1) self.gridLayout.addWidget(self.label_82, 11, 0, 1, 1)
self.label_622 = QtGui.QLabel(Form) self.label_622 = QtGui.QLabel(Form)
self.label_622.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_622.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_622.setObjectName(_fromUtf8("label_622")) self.label_622.setObjectName(_fromUtf8("label_622"))
self.gridLayout.addWidget(self.label_622, 9, 0, 1, 1) self.gridLayout.addWidget(self.label_622, 9, 0, 1, 1)
self.doubleSpinBox_7 = QtGui.QDoubleSpinBox(Form) self.doubleSpinBox_7 = QtGui.QDoubleSpinBox(Form)
@ -191,7 +189,7 @@ class Ui_Form(object):
self.label_7.setObjectName(_fromUtf8("label_7")) self.label_7.setObjectName(_fromUtf8("label_7"))
self.gridLayout.addWidget(self.label_7, 10, 2, 1, 1) self.gridLayout.addWidget(self.label_7, 10, 2, 1, 1)
self.label_72 = QtGui.QLabel(Form) self.label_72 = QtGui.QLabel(Form)
self.label_72.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_72.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_72.setObjectName(_fromUtf8("label_72")) self.label_72.setObjectName(_fromUtf8("label_72"))
self.gridLayout.addWidget(self.label_72, 10, 0, 1, 1) self.gridLayout.addWidget(self.label_72, 10, 0, 1, 1)
self.doubleSpinBox_8 = QtGui.QDoubleSpinBox(Form) self.doubleSpinBox_8 = QtGui.QDoubleSpinBox(Form)
@ -257,6 +255,7 @@ class Ui_Form(object):
self.comboBox.addItem(_fromUtf8("")) self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8("")) self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8("")) self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8(""))
self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1)
self.removeButton = QtGui.QPushButton(Form) self.removeButton = QtGui.QPushButton(Form)
self.removeButton.setObjectName(_fromUtf8("removeButton")) self.removeButton.setObjectName(_fromUtf8("removeButton"))
@ -268,7 +267,7 @@ class Ui_Form(object):
self.retranslateUi(Form) self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi( self, Form ): def retranslateUi(self, Form):
Form.setWindowTitle(_translate("Form", "Form", None)) Form.setWindowTitle(_translate("Form", "Form", None))
self.label_422.setText(_translate("Form", "β", None)) self.label_422.setText(_translate("Form", "β", None))
self.label_10.setText(_translate("Form", "TextLabel", None)) self.label_10.setText(_translate("Form", "TextLabel", None))
@ -283,24 +282,21 @@ class Ui_Form(object):
self.label_huh.setText(_translate("Form", "TextLabel", None)) self.label_huh.setText(_translate("Form", "TextLabel", None))
self.label_2.setText(_translate("Form", "TextLabel", None)) self.label_2.setText(_translate("Form", "TextLabel", None))
self.label_102.setText(_translate("Form", "g", None)) self.label_102.setText(_translate("Form", "g", None))
self.label_222.setText( self.label_222.setText(_translate("Form", "<html><head/><body><p>τ<span style=\" vertical-align:sub;\">α</span></p></body></html>", None))
_translate("Form", "<html><head/><body><p>τ<span style=\" vertical-align:sub;\">α</span></p></body></html>",
None))
self.label_322.setText(_translate("Form", "α", None)) self.label_322.setText(_translate("Form", "α", None))
self.label_8.setText(_translate("Form", "TextLabel", None)) self.label_8.setText(_translate("Form", "TextLabel", None))
self.label_1.setText(_translate("Form", "TextLabel", None)) self.label_1.setText(_translate("Form", "TextLabel", None))
self.label_3.setText(_translate("Form", "TextLabel", None)) self.label_3.setText(_translate("Form", "TextLabel", None))
self.label_82.setText(_translate("Form", "b", None)) self.label_82.setText(_translate("Form", "b", None))
self.label_622.setText( self.label_622.setText(_translate("Form", "<html><head/><body><p>τ<span style=\" vertical-align:sub;\">β</span></p></body></html>", None))
_translate("Form", "<html><head/><body><p>τ<span style=\" vertical-align:sub;\">β</span></p></body></html>",
None))
self.label_7.setText(_translate("Form", "TextLabel", None)) self.label_7.setText(_translate("Form", "TextLabel", None))
self.label_72.setText(_translate("Form", "a", None)) self.label_72.setText(_translate("Form", "a", None))
self.label_23.setText(_translate("Form", "Fix", None)) self.label_23.setText(_translate("Form", "Fix", None))
self.comboBox.setItemText(0, _translate("Form", "GG", None)) self.comboBox.setItemText(0, _translate("Form", "GG", None))
self.comboBox.setItemText(1, _translate("Form", "GGe", None)) self.comboBox.setItemText(1, _translate("Form", "GGe", None))
self.comboBox.setItemText(2, _translate("Form", "GG + b", None)) self.comboBox.setItemText(2, _translate("Form", "Gb", None))
self.comboBox.setItemText(3, _translate("Form", "GGe + b", None)) self.comboBox.setItemText(3, _translate("Form", "GG + b", None))
self.comboBox.setItemText(4, _translate("Form", "GGe + b", None))
self.removeButton.setText(_translate("Form", "Remove", None)) self.removeButton.setText(_translate("Form", "Remove", None))
self.configButton.setText(_translate("Form", "Configure", None)) self.configButton.setText(_translate("Form", "Configure", None))

View File

@ -441,6 +441,11 @@
<string>GGe</string> <string>GGe</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>Gb</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>GG + b</string> <string>GG + b</string>

View File

@ -45,6 +45,7 @@ class Yaff(QObject):
yaff = [ yaff = [
(self.yaff_gg, "GG"), (self.yaff_gg, "GG"),
(self.yaff_gge, "GGe"), (self.yaff_gge, "GGe"),
(self.yaff_gb, "Gb"),
(self.yaff, "GG + GGb"), (self.yaff, "GG + GGb"),
(self.yaff_extended, "GGe + GGb"), (self.yaff_extended, "GGe + GGb"),
] ]
@ -205,6 +206,19 @@ class Yaff(QObject):
self.step_signal.emit(list(p)) self.step_signal.emit(list(p))
return epp return epp
def yaff_gb(self, p,x, cb=None):
"""
GG
"""
delta_eps, tau1, a1, b1, lambd, tau2, a2, b2, s, g = p
#ts = logspace(-10,5,512*2)
dist_ggb = self.ggb(p=[tau2, a2, b2], tau=self.dist_tau)
self.dist_y = dist_ggb
phi_alpha = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
epp = delta_eps*2*pi*x*filon(2*pi*x, self.time_points, phi_alpha )
self.step_signal.emit(list(p))
return epp
def yaff_gg(self, p,x, cb=None): def yaff_gg(self, p,x, cb=None):
""" """
GG GG