Commit d2322fb5 authored by Ivo Peterek's avatar Ivo Peterek

ENH: apply cluster analysis on data selected (not on currently visualized...

ENH: apply cluster analysis on data selected (not on currently visualized data+no on previously smoothed data) #8
parent 975e1989
......@@ -40,7 +40,7 @@ class Window(QtWidgets.QDialog):
self.samples_data = []
self.samples_data_lables = []
self.samples_ylabel = "Power [W]"
self.min_sample_val = float(99999999999999)
self.min_sample_val = float(sys.maxsize)
self.max_sample_val = float(0)
self.setWindowTitle("Plot power samples")
......@@ -73,12 +73,12 @@ class Window(QtWidgets.QDialog):
self.smoothWindowSizeSpinBox.setValue(3)
self.smoothWindowSizeSpinBox.setMinimum(3)
self.smoothWindowSizeSpinBox.setSingleStep(2)
self.smoothWindowSizeSpinBox.setMaximum(9999999999)#TMP
self.smoothWindowSizeSpinBox.setMaximum(2147483647)#TMP
self.smoothpolyOrderLabel = QtWidgets.QLabel("Polynomial order:")
self.smoothpolyOrderLabel.setFixedWidth(120)
self.smoothpolyOrderSpinBox = QtWidgets.QSpinBox()
self.smoothpolyOrderSpinBox.setMinimum(2)
self.smoothpolyOrderSpinBox.setMaximum(9999999999999)
self.smoothpolyOrderSpinBox.setMaximum(2147483647)
self.smoothButton = QtWidgets.QPushButton('Smooth samples')
self.smoothButton.clicked.connect(self.smoothSamples)
......@@ -299,6 +299,8 @@ class Window(QtWidgets.QDialog):
return int(np.ceil(f) // 2 * 2 + 1)
def clustering(self):
self.clearCanvas()
self.addToPlot()
samples = self.samples_data[0]
nums = [e[0] for e in samples]
engs = [e[1] for e in samples]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment