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): ...@@ -100,7 +100,7 @@ def about(parent):
QtWidgets.QMessageBox.information( QtWidgets.QMessageBox.information(
parent, "About Prasopes", parent, "About Prasopes",
"Prasopes Finnigan raw file viewer\n\n" "Prasopes Finnigan raw file viewer\n\n"
"Version: 0.0.9 (alpha)") "Version: 0.0.10 (alpha)")
def main(): def main():
......
...@@ -150,7 +150,7 @@ def autozoomy(state, ms_spec, msdata): ...@@ -150,7 +150,7 @@ def autozoomy(state, ms_spec, msdata):
ms_spec.autoscale(True, 'y') ms_spec.autoscale(True, 'y')
ymin = -0.01 ymin = -0.01
argvis = dt.argsubselect(msdata['x'], *ms_spec.get_xlim()) 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]) ymax = max(msdata['y'][argvis])
ms_spec.set_ylim(ymax*ymin, ms_spec.set_ylim(ymax*ymin,
ymax*1.1) ymax*1.1)
...@@ -245,11 +245,12 @@ def populate(mpl_chromatogram, mpl_spectrum, data_set, ...@@ -245,11 +245,12 @@ def populate(mpl_chromatogram, mpl_spectrum, data_set,
mass_spect['y'] = np.mean(data_set['matrix'], axis=0) mass_spect['y'] = np.mean(data_set['matrix'], axis=0)
pop_plot(mpl_spectrum, mass_spect) pop_plot(mpl_spectrum, mass_spect)
if mass_spect['predict'] != None: if mass_spect['predict'] != None:
crudemasses = (np.arange(len(mass_spect['predict'][1])) maxm = np.argmax(mass_spect['predict'][1]) + mass_spect['predict'][0]
+mass_spect['predict'][0])
maxm = crudemasses[np.argmax(mass_spect['predict'][1])]
maxseek = dt.argsubselect(mass_spect['x'], maxm-.5, maxm+.5) 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, pints = [], []
[pmasses.extend([np.nan,i,i]) for i in crudemasses] [pmasses.extend([np.nan,i,i]) for i in crudemasses]
[pints.extend([np.nan,0,i]) for i in crudeints] [pints.extend([np.nan,0,i]) for i in crudeints]
......
...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh: ...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setup( setup(
name="prasopes", name="prasopes",
version="0.0.9", version="0.0.10",
author="Jan Zelenka", author="Jan Zelenka",
author_email="3yanyanyan@gmail.com", author_email="3yanyanyan@gmail.com",
description="Thermo/Finnigan .raw file viewer based on rawprasslib", 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