Commit 9b136e52 authored by Yan's avatar Yan
Browse files

Temporarily populated the help button in ZCE tools.

further modification will be needed in future.
parent 423d3e9d
......@@ -21,6 +21,8 @@ Use File -> Open or Ctrl+O to open a spectrum from GUI.
For exporting a spectrum use File -> Export or Ctrl+E.
**experimental** For calculating ZCE out of TSQ spectra use Tools -> TSQ zce or Ctrl+T. Works properly only on spectrum which is acquired by TODO: napsat by co
### GUI control
* **Doubleclick** resets active graph
......
import numpy as np
import prasopes.graphtools as gt
import os.path
import pkg_resources
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from PyQt5 import QtCore
......@@ -93,6 +94,14 @@ def exp_zce(zce_spec, zcegrad_spec, fn, parent):
expf.close()
def help_msg(pw):
path = pkg_resources.resource_filename(__name__,'zcetools_help')
with open(path, 'r') as helpfile:
helpcontent = helpfile.read()
QtWidgets.QMessageBox.information(
pw, "TSQ zce tool help", "{}".format(helpcontent))
def dialog(parent, ds, filename):
coff = dict(x=[0], y=[0], line=None, name="",
xlabel="Voltage (V)", ylabel="ion count")
......@@ -119,6 +128,7 @@ def dialog(parent, ds, filename):
zce_export.clicked.connect(lambda: exp_zce(
coff, coffgrad, filename, parent))
zce_help = QtWidgets.QPushButton("Help")
zce_help.clicked.connect(lambda: help_msg(parent))
close_button = QtWidgets.QPushButton("Close")
close_button.clicked.connect(dial_widget.close)
......
The TSQ zce tool expects DAC spectrum as an imput spectrum. It does not verify the validity of the imput. Thus it is up to the sw user to evaluate that the given figure is sane.
Acquiring DAC spectrum:
For acquiring DAC spectrum you first need to find the correct number of the DAC[1] (digital-to-analog converter) involved. You do this by opening the Tune Window view in The Xcalibur Tune and then reading the DAC which is connected to the collision offset.[2] Then you need to call the .dac command[3] with proper vaules. The syntax is .dac #DAC, from, to, step, m/z.[3] If your desired ion has m/z 133.7 in ESI+, the command should look for example like ".dac 9,-8,6,.1,133.7".[4] Do not forget to turn off the collision gas during .dac acquisition. When .dac command is running, you can start the acquisition into file. After some time you will acquire smooth curve. After end of the acquisition you can go back to the normal scan mode by calling the .dac command without arguments.[3]
Limitations:
* The program does not perform any sanity check, be careful and know what you're doing
* The program expects to get an TSQ DAC as an imput and expects, that minimal value of that concrete DAC is -196.
* The program expects positive-ion mode. Code for the manual switch to negative-ions will be provided on-demand.
* You tell me.
Notes:
[1] DAC = digital-to-analog converter
[2] on all TSQ7000 which I've seen the proper value is 9
[3] for full reference do not hesitate to check the DAC.TXT in original sw (Xcalibur/system/xsq/msi/DAC.TXT)
[4] Dont be shocked to see wierd numbers on X-axis of Prof view after submitting the command. As m/z is not expected to be negative, the whole spectrum is shifted so that the minimal value of the selected DAC is 0. As our specific DAC has the minimal value of -196, it means the shift of the whole spectrum by +196.
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