Source code for gui.core.baselineRemovalMethods.AirPLS

from PyQt5 import QtWidgets

from gui.ui.AirPLS import Ui_Form
from gui.util.Modules import Modules
from libpyhat.transform.baseline_code.airpls import AirPLS


[docs] class Ui_Form(Ui_Form, Modules):
[docs] def setupUi(self, Form): super().setupUi(Form) self.checkMinAndMax() Modules.setupUi(self, Form)
[docs] def get_widget(self): return self.groupbox
[docs] def setHidden(self, bool): self.get_widget().setHidden(bool)
[docs] def connectWidgets(self): airPLS = AirPLS() self.smoothnessSpinBox.setValue(airPLS.smoothness_param) self.convergenceThresholdDoubleSpinBox.setValue(airPLS.conv_thresh) self.maxNumOfIterationsSpinBox.setValue(airPLS.max_iters)
[docs] def run(self): methodParameters = { 'smoothness_param': float(self.smoothnessSpinBox.value()), 'conv_thresh': float( self.convergenceThresholdDoubleSpinBox.value() ), 'max_iters': float(self.maxNumOfIterationsSpinBox.value()) } return methodParameters, self.getChangedValues( methodParameters, AirPLS() )
if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) Form = QtWidgets.QWidget() ui = Ui_Form() ui.setupUi(Form) Form.show() sys.exit(app.exec_())