Commit 04b84005 authored by 3Yan's avatar 3Yan
Browse files

Fix of DRL which was broken on last commit

* hopefully no more reference before assigment
parent 5ba79b8f
......@@ -86,7 +86,7 @@ def about(parent):
QtWidgets.QMessageBox.information(
parent, "About Prasopes",
"Prasopes Finnigan raw file viewer\n\n"
"Version: 0.0.4 (alpha)")
"Version: 0.0.5 (alpha)")
def main():
......
......@@ -648,35 +648,20 @@ def main_window(parent, ds, filename, cache, update_signal):
def update_fnc():
update_drlspectrum(ds, drls, chromplot)
window = QtWidgets.QMainWindow(
parent, windowTitle='Delayed reactant labeling')
main_widget = QtWidgets.QWidget(window)
window.setCentralWidget(main_widget)
window.closeEvent = lambda event: onclose(
window, event, cache, drls, graph_canvas, update_fnc)
time_title = QtWidgets.QLabel("Time shift (min):")
drls['tshift'] = QtWidgets.QDoubleSpinBox(
if cache == [None, None]:
# pt = parenttable
# dt = daughtertable
drls = dict(pt=None, dt=None, tshift=None, cutoff=None, cors=None,
rel=None, checkAll=None)
drls['tshift'] = QtWidgets.QDoubleSpinBox(
minimum=-100, maximum=1440, decimals=3)
cutoff_title = QtWidgets.QLabel("Cut off (min):")
drls['cutoff'] = QtWidgets.QDoubleSpinBox(
drls['cutoff'] = QtWidgets.QDoubleSpinBox(
minimum=0, maximum=1440, decimals=3)
drls['rel'] = QtWidgets.QCheckBox("Steady state approximation")
drls['checkAll'] = QtWidgets.QCheckBox("Select all")
drls['cors'] = QtWidgets.QSpinBox(minimum=0)
drl_load = QtWidgets.QPushButton("&Load")
drl_save = QtWidgets.QPushButton("&Save")
drl_export = QtWidgets.QPushButton("&Export")
drl_print = QtWidgets.QPushButton("&Print")
close = QtWidgets.QPushButton("&Close")
close.clicked.connect(window.close)
btn_add = QtWidgets.QPushButton("&Add")
btn_rem = QtWidgets.QPushButton("Remove")
drls['rel'] = QtWidgets.QCheckBox("Steady state approximation")
drls['checkAll'] = QtWidgets.QCheckBox("Select all")
drls['cors'] = QtWidgets.QSpinBox(minimum=0)
drls['cors'].setValue(3)
if cache == [None, None]:
dial_graph = Figure(figsize=(5, 2), dpi=100, facecolor="None")
chromplot = dial_graph.add_subplot(111, facecolor=(1, 1, 1, 0.8))
graph_canvas = FigureCanvas(dial_graph)
......@@ -689,14 +674,7 @@ def main_window(parent, ds, filename, cache, update_signal):
gt.zoom_factory(chromplot, 1.15)
gt.pop_plot(chromplot, drls['graphlabels'])
# pt = parenttable
# dt = daughtertable
drls = dict(pt=None, dt=None, tshift=None, cutoff=None, cors=None,
rel=None, checkAll=None)
dcolums = ["Name"]
drls['cors'].setValue(3)
for i in range(drls['cors'].value()):
dcolums.append("corrected for ({})".format(i+1))
dcolums.append("factor ({})".format(i+1))
......@@ -704,15 +682,36 @@ def main_window(parent, ds, filename, cache, update_signal):
drls['pt'] = iontable(["Name", "Mass (m/z)", "Peak width",
"profile"])
#TODO: DIRTY, DIRTY, DIRTY !!! do it nicer when I'll know how i want it
for n in range(drls['dt'].columnCount()):
drls['dt'].horizontalHeader().setSectionResizeMode(
n, QtWidgets.QHeaderView.Interactive)
[drls['dt'].horizontalHeader().setSectionResizeMode(
n, QtWidgets.QHeaderView.Interactive) for n in range(
drls['dt'].columnCount())]
add_line(ds, drls, chromplot)
else:
drls = cache[0]
graph_canvas = cache[1]
chromplot = graph_canvas.figure.axes[0]
window = QtWidgets.QMainWindow(
parent, windowTitle='Delayed reactant labeling')
main_widget = QtWidgets.QWidget(window)
window.setCentralWidget(main_widget)
window.closeEvent = lambda event: onclose(
window, event, cache, drls, graph_canvas, update_fnc)
time_title = QtWidgets.QLabel("Time shift (min):")
cutoff_title = QtWidgets.QLabel("Cut off (min):")
drl_load = QtWidgets.QPushButton("&Load")
drl_save = QtWidgets.QPushButton("&Save")
drl_export = QtWidgets.QPushButton("&Export")
drl_print = QtWidgets.QPushButton("&Print")
close = QtWidgets.QPushButton("&Close")
close.clicked.connect(window.close)
btn_add = QtWidgets.QPushButton("&Add")
btn_rem = QtWidgets.QPushButton("Remove")
window.keyPressEvent = lambda event: key_pressed(
event, ds, drls, chromplot)
......
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setup(
name="prasopes",
version="0.0.4",
version="0.0.5",
author="Jan Zelenka",
author_email="3yanyanyan@gmail.com",
description="Thermo/Finnigan .raw file viewer based on rawprasslib",
......
Supports Markdown
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