Commit f50986e6 authored by Yan's avatar Yan
Browse files

More clear error messages in the DRL.

parent 3f3c0edb
......@@ -127,7 +127,7 @@ def get_parentset(ds, drls):
def update_drlspectrum(ds, drls, drlspectrum):
"""Generic DRL spectrum updating procedure"""
logger.info("updating DRL spectrum")
# Dont do anything when the dataset is not populated
# Do not do anything when the data set is not populated.
if isinstance(ds['masses'], type(None)):
return
colors = np.array([[0, 0, 0], [255, 0, 0], [0, 255, 0], [0, 0, 255],
......@@ -444,8 +444,8 @@ def save_drlconfig(drls, parent, exp_f_name=None):
def export_drlspectrum(parent, fn, ds, drls):
if fn[0] is None:
QtWidgets.QMessageBox.warning(
None, "Export DRL dataset",
"Nothing to export, cancelling request")
None, "Export DRL dat aset",
"No file opened. Nothing to export, canceling request")
return
names, times, intensities = get_daughterset(ds, drls)
subset = np.where(times > 0)[0]
......@@ -455,8 +455,9 @@ def export_drlspectrum(parent, fn, ds, drls):
pnames, ptimes, pintensities = get_parentset(ds, drls)
if names == []:
QtWidgets.QMessageBox.warning(
None, "Export DRL dataset",
"Nothing to export, cancelling request")
None, "Export DRL data set",
"No rows in the Corrected ions table selected. "
"Nothing to export, canceling request")
return
fname = QtWidgets.QFileDialog.getSaveFileName(
None,"Export DRL data",
......
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