-
Notifications
You must be signed in to change notification settings - Fork 3
/
QtCVFIT.py
71 lines (59 loc) · 1.88 KB
/
QtCVFIT.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /usr/bin/python
"""
Load set(s) of data from an Excel, csv or text file.
From a checkable list select set(s) of data to fit.
Plot the data.
Choose a function to fit the data points.
Fit the function to the data using ...
Calculate approximate SD and likelihood intervals.
Display the fit on the data plot.
Generate HTML report.
Supported data input file formats:
1. Excel .xls and .xlsx files.
2. CSV file.
3. TXT file.
"""
__author__="remislp"
__date__ ="$07-Feb-2010 16:23:20$"
import sys
try:
from PyQt5.QtWidgets import *
#from PyQt5.QtGui import *
#from PyQt5.QtCore import *
except:
raise ImportError("pyqt module is missing")
from cvfitgui import cvfit_blocks as blocks
class CVFITgui(QMainWindow):
def __init__(self, parent=None):
super(CVFITgui, self).__init__(parent)
self.resize(1000, 700) # wide, high in px
self.mainFrame = QWidget()
self.setWindowTitle("CVFIT: Curve fitting")
self.log = None
self.data = None
self.fits = None
self.eqname = None
self.eqtype = None
self.fname = ''
self.report = None
self.workdir = "."
upperHBox = QHBoxLayout()
self.datablk = blocks.DataBlock(self)
upperHBox.addWidget(self.datablk)
self.eqblk = blocks.EquationBlock(self)
upperHBox.addWidget(self.eqblk)
lowerHBox = QHBoxLayout()
self.textblk = blocks.TextBlock(self)
lowerHBox.addWidget(self.textblk)
self.plotblk = blocks.PlotBlock(self)
lowerHBox.addWidget(self.plotblk)
VBox = QVBoxLayout()
VBox.addLayout(upperHBox)
VBox.addLayout(lowerHBox)
self.mainFrame.setLayout(VBox)
self.setCentralWidget(self.mainFrame)
if __name__ == "__main__":
app = QApplication(sys.argv)
form = CVFITgui()
form.show()
app.exec_()