Commit 283d1a7e authored by 3Yan's avatar 3Yan
Browse files

Fixes after last commit

* Fixed if statement in autozoomy
* Masses prediction now calibrated to the main mass
parent 89237278
......@@ -100,7 +100,7 @@ def about(parent):
QtWidgets.QMessageBox.information(
parent, "About Prasopes",
"Prasopes Finnigan raw file viewer\n\n"
"Version: 0.0.9 (alpha)")
"Version: 0.0.10 (alpha)")
def main():
......
......@@ -150,7 +150,7 @@ def autozoomy(state, ms_spec, msdata):
ms_spec.autoscale(True, 'y')
ymin = -0.01
argvis = dt.argsubselect(msdata['x'], *ms_spec.get_xlim())
if msdata['y'] != [0]:
if not np.array_equal(msdata['y'], [0]):
ymax = max(msdata['y'][argvis])
ms_spec.set_ylim(ymax*ymin,
ymax*1.1)
......@@ -245,11 +245,12 @@ def populate(mpl_chromatogram, mpl_spectrum, data_set,
mass_spect['y'] = np.mean(data_set['matrix'], axis=0)
pop_plot(mpl_spectrum, mass_spect)
if mass_spect['predict'] != None:
crudemasses = (np.arange(len(mass_spect['predict'][1]))
+mass_spect['predict'][0])
maxm = crudemasses[np.argmax(mass_spect['predict'][1])]
maxm = np.argmax(mass_spect['predict'][1]) + mass_spect['predict'][0]
maxseek = dt.argsubselect(mass_spect['x'], maxm-.5, maxm+.5)
crudeints = mass_spect['predict'][1]*np.amax(mass_spect['y'][maxseek])
maxpos = maxseek[np.argmax(mass_spect['y'][maxseek])]
crudeints = mass_spect['predict'][1] * mass_spect['y'][maxpos]
crudemasses = (np.arange(len(mass_spect['predict'][1])) +
mass_spect['x'][maxpos])
pmasses, pints = [], []
[pmasses.extend([np.nan,i,i]) for i in crudemasses]
[pints.extend([np.nan,0,i]) for i in crudeints]
......
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setup(
name="prasopes",
version="0.0.9",
version="0.0.10",
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