Commit 7fe44ffa authored by Yan's avatar Yan
Browse files

Fix - drltools - bug in time axis

* also change of the width in DRL parent table peak profiler
parent ad228110
......@@ -77,7 +77,7 @@ def get_daughterset(ds, drls):
def get_parentset(ds, drls):
names = []
times = np.concatenate([sub['chrom_dat'][0, :] for sub in ds])
times = np.concatenate([sub[0] for sub in ds.chromatograms])
intensities = []
rowlist = []
for row in range(drls['dt'].rowCount()):
......
......@@ -6,6 +6,7 @@ from PyQt5 import QtCore
from PyQt5 import QtWidgets
from PyQt5 import QtGui
from PyQt5 import QtPrintSupport
from prasopes.datasets import ThermoRawDataset
import matplotlib
import numpy as np
import prasopes.datatools as dt
......@@ -51,7 +52,8 @@ def update_profile(pt, row, dataset):
max(spectxy[1][massargs])))
widest = np.argmax([abs(lim[0][1]-lim[0][0]) for lim in limits])
xmin, xmax = limits[widest][0]
xex = max((xmax-xmin)*0.25, 0.20)
xexlim = 0.20 if type(dataset) == ThermoRawDataset else 0.02
xex = max((xmax-xmin)*0.25, xexlim)
spectrum.set_xlim(xmin-xex, xmax+xex)
ymax = max(*[lim[1] for lim in limits], 1)
spectrum.set_ylim(ymax*-0.1, ymax*1.2)
......@@ -591,7 +593,7 @@ def main_window(parent, augCanvas, update_signal):
dcolums.append("factor ({})".format(i+1))
drls['dt'] = dt.table(dcolums)
drls['pt'] = dt.table(["Name", "Mass (m/z)", "Peak width",
"profile"])
"Profile"])
# TODO: DIRTY, DIRTY, DIRTY !!! Do it nicer when I'll know how
[drls['dt'].horizontalHeader().setSectionResizeMode(
n, QtWidgets.QHeaderView.Interactive) for n in range(
......
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