pychemstation 0.5.2__py3-none-any.whl → 0.5.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pychemstation/analysis/base_spectrum.py +509 -509
- pychemstation/analysis/spec_utils.py +304 -304
- pychemstation/control/comm.py +58 -27
- pychemstation/control/hplc.py +49 -23
- pychemstation/control/table/method.py +77 -61
- pychemstation/control/table/sequence.py +116 -76
- pychemstation/control/table/table_controller.py +96 -35
- pychemstation/utils/macro.py +11 -1
- pychemstation/utils/method_types.py +1 -2
- pychemstation/utils/sequence_types.py +12 -8
- pychemstation/utils/table_types.py +8 -4
- pychemstation/utils/tray_types.py +14 -0
- {pychemstation-0.5.2.dist-info → pychemstation-0.5.4.dist-info}/METADATA +3 -2
- pychemstation-0.5.4.dist-info/RECORD +34 -0
- tests/constants.py +58 -5
- tests/test_comb.py +143 -0
- tests/test_comm.py +21 -9
- tests/test_method.py +26 -29
- tests/test_sequence.py +98 -74
- .DS_Store +0 -0
- pychemstation/control/chromatogram.py +0 -128
- pychemstation/control/method.py +0 -232
- pychemstation/control/sequence.py +0 -140
- pychemstation/control/table_controller.py +0 -75
- pychemstation/utils/chemstation.py +0 -290
- pychemstation/utils/constants.py +0 -15
- pychemstation/utils/hplc_param_types.py +0 -185
- pychemstation-0.5.2.dist-info/RECORD +0 -40
- {pychemstation-0.5.2.dist-info → pychemstation-0.5.4.dist-info}/LICENSE +0 -0
- {pychemstation-0.5.2.dist-info → pychemstation-0.5.4.dist-info}/WHEEL +0 -0
- {pychemstation-0.5.2.dist-info → pychemstation-0.5.4.dist-info}/top_level.txt +0 -0
@@ -1,290 +0,0 @@
|
|
1
|
-
#!/usr/bin/python
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
"""
|
5
|
-
File parser for Chemstation files (*.ch)
|
6
|
-
Basically a port of the matlab script at:
|
7
|
-
https://github.com/chemplexity/chromatography/blob/master/Development/File%20Conversion/ImportAgilentFID.m
|
8
|
-
|
9
|
-
This file is a standalone file to parse the binary files created by Chemstation
|
10
|
-
|
11
|
-
I use it for file with version 130, genereted by an Agilent LC.
|
12
|
-
"""
|
13
|
-
|
14
|
-
import struct
|
15
|
-
from struct import unpack
|
16
|
-
import numpy as np
|
17
|
-
|
18
|
-
# Constants used for binary file parsing
|
19
|
-
ENDIAN = ">"
|
20
|
-
STRING = ENDIAN + "{}s"
|
21
|
-
UINT8 = ENDIAN + "B"
|
22
|
-
UINT16 = ENDIAN + "H"
|
23
|
-
INT16 = ENDIAN + "h"
|
24
|
-
INT32 = ENDIAN + "i"
|
25
|
-
UINT32 = ENDIAN + "I"
|
26
|
-
|
27
|
-
|
28
|
-
def fread(fid, nelements, dtype):
|
29
|
-
|
30
|
-
"""Equivalent to Matlab fread function"""
|
31
|
-
|
32
|
-
if dtype is str:
|
33
|
-
dt = np.uint8 # WARNING: assuming 8-bit ASCII for np.str!
|
34
|
-
else:
|
35
|
-
dt = dtype
|
36
|
-
|
37
|
-
data_array = np.fromfile(fid, dt, nelements)
|
38
|
-
data_array.shape = (nelements, 1)
|
39
|
-
|
40
|
-
return data_array
|
41
|
-
|
42
|
-
|
43
|
-
def parse_utf16_string(file_, encoding="UTF16"):
|
44
|
-
|
45
|
-
"""Parse a pascal type UTF16 encoded string from a binary file object"""
|
46
|
-
|
47
|
-
# First read the expected number of CHARACTERS
|
48
|
-
string_length = unpack(UINT8, file_.read(1))[0]
|
49
|
-
# Then read and decode
|
50
|
-
parsed = unpack(STRING.format(2 * string_length), file_.read(2 * string_length))
|
51
|
-
return parsed[0].decode(encoding)
|
52
|
-
|
53
|
-
|
54
|
-
class cached_property(object):
|
55
|
-
|
56
|
-
"""A property that is only computed once per instance and then replaces
|
57
|
-
itself with an ordinary attribute. Deleting the attribute resets the
|
58
|
-
property.
|
59
|
-
|
60
|
-
https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76
|
61
|
-
"""
|
62
|
-
|
63
|
-
def __init__(self, func):
|
64
|
-
self.__doc__ = getattr(func, "__doc__")
|
65
|
-
self.func = func
|
66
|
-
|
67
|
-
def __get__(self, obj, cls):
|
68
|
-
if obj is None:
|
69
|
-
return self
|
70
|
-
value = obj.__dict__[self.func.__name__] = self.func(obj)
|
71
|
-
return value
|
72
|
-
|
73
|
-
|
74
|
-
class CHFile(object):
|
75
|
-
|
76
|
-
"""Class that implementats the Agilent .ch file format version
|
77
|
-
130. Warning: Not all aspects of the file header is understood,
|
78
|
-
so there may and probably is information that is not parsed. See
|
79
|
-
_parse_header_status for an overview of which parts of the header
|
80
|
-
is understood.
|
81
|
-
|
82
|
-
Attributes:
|
83
|
-
values (numpy.array): The internsity values (y-value) or the
|
84
|
-
spectrum. The unit for the values is given in `metadata['units']`
|
85
|
-
|
86
|
-
metadata (dict): The extracted metadata
|
87
|
-
|
88
|
-
filepath (str): The filepath this object was loaded from
|
89
|
-
"""
|
90
|
-
|
91
|
-
# Fields is a table of name, offset and type. Types 'x-time' and 'utf16'
|
92
|
-
# are specially handled, the rest are format arguments for struct unpack
|
93
|
-
fields = (
|
94
|
-
("sequence_line_or_injection", 252, UINT16),
|
95
|
-
("injection_or_sequence_line", 256, UINT16),
|
96
|
-
("data_offset", 264, UINT32),
|
97
|
-
("start_time", 282, "x-time"),
|
98
|
-
("end_time", 286, "x-time"),
|
99
|
-
("version_string", 326, "utf16"),
|
100
|
-
("description", 347, "utf16"),
|
101
|
-
("sample", 858, "utf16"),
|
102
|
-
("operator", 1880, "utf16"),
|
103
|
-
("date", 2391, "utf16"),
|
104
|
-
("inlet", 2492, "utf16"),
|
105
|
-
("instrument", 2533, "utf16"),
|
106
|
-
("method", 2574, "utf16"),
|
107
|
-
("software version", 3601, "utf16"),
|
108
|
-
("software name", 3089, "utf16"),
|
109
|
-
("software revision", 3802, "utf16"),
|
110
|
-
("zero", 4110, INT32),
|
111
|
-
("units", 4172, "utf16"),
|
112
|
-
("detector", 4213, "utf16"),
|
113
|
-
("yscaling", 4732, ENDIAN + "d"),
|
114
|
-
)
|
115
|
-
|
116
|
-
# The start position of the data
|
117
|
-
# Get it from metadata['data_offset'] * 512
|
118
|
-
data_start = 6144
|
119
|
-
|
120
|
-
# The versions of the file format supported by this implementation
|
121
|
-
supported_versions = {130}
|
122
|
-
|
123
|
-
def __init__(self, filepath):
|
124
|
-
|
125
|
-
self.filepath = filepath
|
126
|
-
self.metadata = {}
|
127
|
-
with open(self.filepath, "rb") as file_:
|
128
|
-
self._parse_header(file_)
|
129
|
-
self.values = self._parse_data(file_)
|
130
|
-
|
131
|
-
def _parse_header(self, file_):
|
132
|
-
|
133
|
-
"""Parse the header"""
|
134
|
-
|
135
|
-
# Parse and check version
|
136
|
-
length = unpack(UINT8, file_.read(1))[0]
|
137
|
-
parsed = unpack(STRING.format(length), file_.read(length))
|
138
|
-
version = int(parsed[0])
|
139
|
-
if version not in self.supported_versions:
|
140
|
-
raise ValueError("Unsupported file version {}".format(version))
|
141
|
-
self.metadata["magic_number_version"] = version
|
142
|
-
|
143
|
-
# Parse all metadata fields
|
144
|
-
for name, offset, type_ in self.fields:
|
145
|
-
file_.seek(offset)
|
146
|
-
if type_ == "utf16":
|
147
|
-
self.metadata[name] = parse_utf16_string(file_)
|
148
|
-
elif type_ == "x-time":
|
149
|
-
self.metadata[name] = unpack(UINT32, file_.read(4))[0] / 60000
|
150
|
-
else:
|
151
|
-
self.metadata[name] = unpack(type_, file_.read(struct.calcsize(type_)))[
|
152
|
-
0
|
153
|
-
]
|
154
|
-
|
155
|
-
def _parse_header_status(self):
|
156
|
-
|
157
|
-
"""Print known and unknown parts of the header"""
|
158
|
-
|
159
|
-
file_ = open(self.filepath, "rb")
|
160
|
-
|
161
|
-
print("Header parsing status")
|
162
|
-
# Map positions to fields for all the known fields
|
163
|
-
knowns = {item[1]: item for item in self.fields}
|
164
|
-
# A couple of places has a \x01 byte before a string, these we simply
|
165
|
-
# skip
|
166
|
-
skips = {325, 3600}
|
167
|
-
# Jump to after the magic number version
|
168
|
-
file_.seek(4)
|
169
|
-
|
170
|
-
# Initialize variables for unknown bytes
|
171
|
-
unknown_start = None
|
172
|
-
unknown_bytes = b""
|
173
|
-
# While we have not yet reached the data
|
174
|
-
while file_.tell() < self.data_start:
|
175
|
-
current_position = file_.tell()
|
176
|
-
# Just continue on skip bytes
|
177
|
-
if current_position in skips:
|
178
|
-
file_.read(1)
|
179
|
-
continue
|
180
|
-
|
181
|
-
# If we know about a data field that starts at this point
|
182
|
-
if current_position in knowns:
|
183
|
-
# If we have collected unknown bytes, print them out and reset
|
184
|
-
if unknown_bytes != b"":
|
185
|
-
print(
|
186
|
-
"Unknown at", unknown_start, repr(unknown_bytes.rstrip(b"\x00"))
|
187
|
-
)
|
188
|
-
unknown_bytes = b""
|
189
|
-
unknown_start = None
|
190
|
-
|
191
|
-
# Print out the position, type, name and value of the known
|
192
|
-
# value
|
193
|
-
print("Known field at {: >4},".format(current_position), end=" ")
|
194
|
-
name, _, type_ = knowns[current_position]
|
195
|
-
if type_ == "x-time":
|
196
|
-
print(
|
197
|
-
'x-time, "{: <19}'.format(name + '"'),
|
198
|
-
unpack(ENDIAN + "f", file_.read(4))[0] / 60000,
|
199
|
-
)
|
200
|
-
elif type_ == "utf16":
|
201
|
-
print(
|
202
|
-
' utf16, "{: <19}'.format(name + '"'), parse_utf16_string(file_)
|
203
|
-
)
|
204
|
-
else:
|
205
|
-
size = struct.calcsize(type_)
|
206
|
-
print(
|
207
|
-
'{: >6}, "{: <19}'.format(type_, name + '"'),
|
208
|
-
unpack(type_, file_.read(size))[0],
|
209
|
-
)
|
210
|
-
|
211
|
-
# We do not know about a data field at this position If we have
|
212
|
-
# already collected 4 zero bytes, assume that we are done with
|
213
|
-
# this unkonw field, print and reset
|
214
|
-
else:
|
215
|
-
if unknown_bytes[-4:] == b"\x00\x00\x00\x00":
|
216
|
-
print(
|
217
|
-
"Unknown at", unknown_start, repr(unknown_bytes.rstrip(b"\x00"))
|
218
|
-
)
|
219
|
-
unknown_bytes = b""
|
220
|
-
unknown_start = None
|
221
|
-
|
222
|
-
# Read one byte and save it
|
223
|
-
one_byte = file_.read(1)
|
224
|
-
if unknown_bytes == b"":
|
225
|
-
# Only start a new collection of unknown bytes, if this
|
226
|
-
# byte is not a zero byte
|
227
|
-
if one_byte != b"\x00":
|
228
|
-
unknown_bytes = one_byte
|
229
|
-
unknown_start = file_.tell() - 1
|
230
|
-
else:
|
231
|
-
unknown_bytes += one_byte
|
232
|
-
|
233
|
-
file_.close()
|
234
|
-
|
235
|
-
def _parse_data(self, file_):
|
236
|
-
|
237
|
-
"""Parse the data. Decompress the delta-encoded data, and scale them
|
238
|
-
with y-scaling"""
|
239
|
-
|
240
|
-
scaling = self.metadata["yscaling"]
|
241
|
-
|
242
|
-
# Go to the end of the file
|
243
|
-
file_.seek(0, 2)
|
244
|
-
stop = file_.tell()
|
245
|
-
|
246
|
-
# Go to the start point of the data
|
247
|
-
file_.seek(self.data_start)
|
248
|
-
|
249
|
-
signal = []
|
250
|
-
|
251
|
-
buff = [0, 0, 0, 0]
|
252
|
-
|
253
|
-
while file_.tell() < stop:
|
254
|
-
|
255
|
-
buff[0] = fread(file_, 1, INT16)[0][0]
|
256
|
-
buff[1] = buff[3]
|
257
|
-
|
258
|
-
if buff[0] << 12 == 0:
|
259
|
-
break
|
260
|
-
|
261
|
-
for i in range(buff[0] & 4095):
|
262
|
-
|
263
|
-
buff[2] = fread(file_, 1, INT16)[0][0]
|
264
|
-
|
265
|
-
if buff[2] != -32768:
|
266
|
-
buff[1] = buff[1] + buff[2]
|
267
|
-
else:
|
268
|
-
buff[1] = fread(file_, 1, INT32)[0][0]
|
269
|
-
|
270
|
-
signal.append(buff[1])
|
271
|
-
|
272
|
-
buff[3] = buff[1]
|
273
|
-
|
274
|
-
signal = np.array(signal)
|
275
|
-
signal = signal * scaling
|
276
|
-
|
277
|
-
return signal
|
278
|
-
|
279
|
-
@cached_property
|
280
|
-
def times(self):
|
281
|
-
|
282
|
-
"""The time values (x-value) for the data set in minutes"""
|
283
|
-
|
284
|
-
return np.linspace(
|
285
|
-
self.metadata["start_time"], self.metadata["end_time"], len(self.values)
|
286
|
-
)
|
287
|
-
|
288
|
-
|
289
|
-
if __name__ == "__main__":
|
290
|
-
CHFile("lcdiag.reg")
|
pychemstation/utils/constants.py
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
from ..utils.table_types import Table
|
2
|
-
|
3
|
-
# maximum command number
|
4
|
-
MAX_CMD_NO = 255
|
5
|
-
|
6
|
-
# tables
|
7
|
-
METHOD_TIMETABLE = Table(
|
8
|
-
register="RCPMP1Method[1]",
|
9
|
-
name="Timetable"
|
10
|
-
)
|
11
|
-
|
12
|
-
SEQUENCE_TABLE = Table(
|
13
|
-
register="_sequence[1]",
|
14
|
-
name="SeqTable1"
|
15
|
-
)
|
@@ -1,185 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from enum import Enum
|
3
|
-
from typing import Union, Any, Optional
|
4
|
-
|
5
|
-
from pychemstation.generated import SolventElement, Signal
|
6
|
-
|
7
|
-
|
8
|
-
# Commands sent to the Chemstation Macro
|
9
|
-
# See https://www.agilent.com/cs/library/usermanuals/Public/MACROS.PDF
|
10
|
-
class Command(Enum):
|
11
|
-
def __str__(self):
|
12
|
-
return '%s' % self.value
|
13
|
-
|
14
|
-
RESET_COUNTER_CMD = "last_cmd_no = 0"
|
15
|
-
GET_STATUS_CMD = "response$ = AcqStatus$"
|
16
|
-
SLEEP_CMD = "Sleep {seconds}"
|
17
|
-
STANDBY_CMD = "Standby"
|
18
|
-
STOP_MACRO_CMD = "Stop"
|
19
|
-
PREPRUN_CMD = "PrepRun"
|
20
|
-
LAMP_ON_CMD = "LampAll ON"
|
21
|
-
LAMP_OFF_CMD = "LampAll OFF"
|
22
|
-
PUMP_ON_CMD = "PumpAll ON"
|
23
|
-
PUMP_OFF_CMD = "PumpAll OFF"
|
24
|
-
GET_METHOD_CMD = "response$ = _MethFile$"
|
25
|
-
SWITCH_METHOD_CMD = 'LoadMethod "{method_dir}", "{method_name}.M"'
|
26
|
-
START_METHOD_CMD = "StartMethod"
|
27
|
-
RUN_METHOD_CMD = 'RunMethod "{data_dir}",, "{experiment_name}_{timestamp}"'
|
28
|
-
STOP_METHOD_CMD = "StopMethod"
|
29
|
-
UPDATE_METHOD_CMD = 'UpdateMethod'
|
30
|
-
SWITCH_SEQUENCE_CMD = 'LoadSequence _SeqPath$, _SeqFile$'
|
31
|
-
SAVE_SEQUENCE_CMD = 'SaveSequence _SeqPath$, _SeqFile$'
|
32
|
-
GET_SEQUENCE_CMD = 'response$ = _SeqFile$'
|
33
|
-
RUN_SEQUENCE_CMD = 'RunSequence "{data_dir}",, "{experiment_name}_{timestamp}"'
|
34
|
-
|
35
|
-
|
36
|
-
class RegisterFlag(Enum):
|
37
|
-
def __str__(self):
|
38
|
-
return '%s' % self.value
|
39
|
-
|
40
|
-
# for table
|
41
|
-
NUM_ROWS = "NumberOfRows"
|
42
|
-
|
43
|
-
# for Method
|
44
|
-
SOLVENT_A_COMPOSITION = "PumpChannel_CompositionPercentage"
|
45
|
-
SOLVENT_B_COMPOSITION = "PumpChannel2_CompositionPercentage"
|
46
|
-
SOLVENT_C_COMPOSITION = "PumpChannel3_CompositionPercentage"
|
47
|
-
SOLVENT_D_COMPOSITION = "PumpChannel4_CompositionPercentage"
|
48
|
-
FLOW = "Flow"
|
49
|
-
MAX_TIME = "StopTime_Time"
|
50
|
-
COLUMN_OVEN_TEMP1 = "TemperatureControl_Temperature"
|
51
|
-
COLUMN_OVEN_TEMP2 = "TemperatureControl2_Temperature"
|
52
|
-
STOPTIME_MODE = "StopTime_Mode"
|
53
|
-
POSTIME_MODE = "PostTime_Mode"
|
54
|
-
|
55
|
-
# for Method Timetable
|
56
|
-
SOLVENT_COMPOSITION = "SolventComposition"
|
57
|
-
|
58
|
-
# for Sequence
|
59
|
-
VIAL_LOCATION = "Vial"
|
60
|
-
NAME = ""
|
61
|
-
METHOD = ""
|
62
|
-
INJ_VOL = ""
|
63
|
-
|
64
|
-
|
65
|
-
class TableOperation(Enum):
|
66
|
-
def __str__(self):
|
67
|
-
return '%s' % self.value
|
68
|
-
|
69
|
-
DELETE_TABLE = 'DelTab {register}, "{table_name}"'
|
70
|
-
CREATE_TABLE = 'NewTab {register}, "{table_name}"'
|
71
|
-
NEW_ROW = 'InsTabRow {register}, "{table_name}"'
|
72
|
-
EDIT_ROW_VAL = 'SetTabVal "{register}", "{table_name}", {row}, "{col_name}", {val}'
|
73
|
-
EDIT_ROW_TEXT = 'SetTabText "{register}", "{table_name}", {row}, "{col_name}", "{val}"'
|
74
|
-
GET_ROW_VAL = 'TabVal ("{register}", "{table_name}", {row}, "{col_name}")'
|
75
|
-
GET_ROW_TEXT = 'TabText ("{register}", "{table_name}", {row}, "{col_name}")'
|
76
|
-
GET_OBJ_HDR_VAL = '{internal_val} = TabHdrVal({register}, "{table_name}", "{col_name}")'
|
77
|
-
GET_OBJ_HDR_TEXT = ''
|
78
|
-
UPDATE_OBJ_HDR_VAL = 'SetObjHdrVal {register}, {register_flag}, {val}'
|
79
|
-
UPDATE_OBJ_HDR_TEXT = 'SetObjHdrText {register}, {register_flag}, {val}'
|
80
|
-
NEW_COL_TEXT = 'NewColText {register}, "{table_name}", "{col_name}", "{val}"'
|
81
|
-
NEW_COL_VAL = 'NewColVal {register}, "{table_name}", "{col_name}", {val}'
|
82
|
-
|
83
|
-
|
84
|
-
class PType(Enum):
|
85
|
-
STR = "str"
|
86
|
-
NUM = "num"
|
87
|
-
|
88
|
-
|
89
|
-
@dataclass
|
90
|
-
class Param:
|
91
|
-
ptype: PType
|
92
|
-
val: Union[float, int, str, Any]
|
93
|
-
chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
|
94
|
-
|
95
|
-
|
96
|
-
@dataclass
|
97
|
-
class HPLCMethodParams:
|
98
|
-
organic_modifier: Param
|
99
|
-
flow: Param
|
100
|
-
temperature: Param
|
101
|
-
inj_vol: Param
|
102
|
-
equ_time: Param
|
103
|
-
maximum_run_time: Param
|
104
|
-
|
105
|
-
|
106
|
-
@dataclass
|
107
|
-
class Entry:
|
108
|
-
start_time: float
|
109
|
-
organic_modifer: float
|
110
|
-
flow: float
|
111
|
-
|
112
|
-
|
113
|
-
@dataclass
|
114
|
-
class SequenceEntry:
|
115
|
-
vial_location: Optional[int] = None
|
116
|
-
method: Optional[str] = None
|
117
|
-
inj_vol: Optional[int] = None
|
118
|
-
name: Optional[str] = None
|
119
|
-
|
120
|
-
|
121
|
-
@dataclass
|
122
|
-
class SequenceTable:
|
123
|
-
rows: list[SequenceEntry]
|
124
|
-
|
125
|
-
|
126
|
-
@dataclass
|
127
|
-
class MethodTimetable:
|
128
|
-
first_row: HPLCMethodParams
|
129
|
-
subsequent_rows: list[Entry]
|
130
|
-
dad_wavelengthes: Optional[list[Signal]] = None
|
131
|
-
organic_modifier: Optional[SolventElement] = None
|
132
|
-
modifier_a: Optional[SolventElement] = None
|
133
|
-
|
134
|
-
|
135
|
-
class HPLCRunningStatus(Enum):
|
136
|
-
@classmethod
|
137
|
-
def has_member_key(cls, key):
|
138
|
-
return key in cls.__members__
|
139
|
-
|
140
|
-
INJECTING = "INJECTING"
|
141
|
-
PREPARING = "PREPARING"
|
142
|
-
RUN = "RUN"
|
143
|
-
NOTREADY = "NOTREADY"
|
144
|
-
POSTRUN = "POSTRUN"
|
145
|
-
RAWDATA = "RAWDATA"
|
146
|
-
INITIALIZING = "INITIALIZING"
|
147
|
-
NOMODULE = "NOMODULE"
|
148
|
-
|
149
|
-
|
150
|
-
class HPLCAvailStatus(Enum):
|
151
|
-
@classmethod
|
152
|
-
def has_member_key(cls, key):
|
153
|
-
return key in cls.__members__
|
154
|
-
|
155
|
-
PRERUN = "PRERUN"
|
156
|
-
OFFLINE = "OFFLINE"
|
157
|
-
STANDBY = "STANDBY"
|
158
|
-
|
159
|
-
|
160
|
-
class HPLCErrorStatus(Enum):
|
161
|
-
|
162
|
-
@classmethod
|
163
|
-
def has_member_key(cls, key):
|
164
|
-
return key in cls.__members__
|
165
|
-
|
166
|
-
ERROR = "ERROR"
|
167
|
-
BREAK = "BREAK"
|
168
|
-
NORESPONSE = "NORESPONSE"
|
169
|
-
MALFORMED = "MALFORMED"
|
170
|
-
|
171
|
-
|
172
|
-
@dataclass
|
173
|
-
class Table:
|
174
|
-
register: str
|
175
|
-
name: str
|
176
|
-
|
177
|
-
|
178
|
-
def str_to_status(status: str) -> Union[HPLCAvailStatus, HPLCErrorStatus, HPLCRunningStatus]:
|
179
|
-
if HPLCErrorStatus.has_member_key(status):
|
180
|
-
return HPLCErrorStatus[status]
|
181
|
-
if HPLCRunningStatus.has_member_key(status):
|
182
|
-
return HPLCRunningStatus[status]
|
183
|
-
if HPLCAvailStatus.has_member_key(status):
|
184
|
-
return HPLCAvailStatus[status]
|
185
|
-
raise KeyError(status)
|
@@ -1,40 +0,0 @@
|
|
1
|
-
.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
2
|
-
pychemstation/__init__.py,sha256=SpTl-Tg1B1HTyjNOE-8ue-N2wGnXN_2zl7RFUSxlkiM,33
|
3
|
-
pychemstation/analysis/__init__.py,sha256=EWoU47iyn9xGS-b44zK9eq50bSjOV4AC5dvt420YMI4,44
|
4
|
-
pychemstation/analysis/base_spectrum.py,sha256=XPf9eJ72uz0CnxCY5uFOyu1MbVX-OTTXeN1tLzIMok4,16536
|
5
|
-
pychemstation/analysis/spec_utils.py,sha256=UOo9hJR3evJfmaohEEsyb7aq6X996ofuUfu-GKjiDi8,10201
|
6
|
-
pychemstation/analysis/utils.py,sha256=ISupAOb_yqA4_DZRK9v18UL-XjUQccAicIJKb1VMnGg,2055
|
7
|
-
pychemstation/control/__init__.py,sha256=aH9cPf-ljrVeVhN0K3cyEcAavmPXCjhhOnpLNf8qLqE,106
|
8
|
-
pychemstation/control/chromatogram.py,sha256=c4_RGconn4vYU9wyS0WX-GB5FlwnBf_sfVLh_GpeehE,3716
|
9
|
-
pychemstation/control/comm.py,sha256=8hjzp-MWWDYyYsEOdlpaJeWd-8eDQw5Y84pyMToK8gE,6008
|
10
|
-
pychemstation/control/hplc.py,sha256=xsfg0VWHSYy2f0YWxCAKxbyDla-POhp02zF5tgBPIVo,5829
|
11
|
-
pychemstation/control/method.py,sha256=h9KcccDtqx0hQT7JaUc1TWCB8d21t0McOuzeBsEsh4c,10977
|
12
|
-
pychemstation/control/sequence.py,sha256=ewc7l44VAtv3wHV2QgOILu5Ny3gmubHuEeHJN9N6OjQ,7511
|
13
|
-
pychemstation/control/table_controller.py,sha256=83i1J2CvIrJ3NtAB_E46qhUe8MvXo1_GnDPmuiq-vSA,2957
|
14
|
-
pychemstation/control/table/__init__.py,sha256=RgMN4uIWHdNUHpGRBWdzmzAbk7XEKl6Y-qtqWCxzSZU,124
|
15
|
-
pychemstation/control/table/method.py,sha256=pywWVFXpdewA-5pXmcmvauX2WsjFQtrAiOSBFYCJfLE,11946
|
16
|
-
pychemstation/control/table/sequence.py,sha256=mVay_KJNgL37GQBsVcxnQk9J7nPfRCzu5J17m6w8vMQ,8499
|
17
|
-
pychemstation/control/table/table_controller.py,sha256=g8IPKIyLbPcXfJDN2DvKtPd9sImbUdoI44qTutQzPi8,4986
|
18
|
-
pychemstation/generated/__init__.py,sha256=GAoZFAYbPVEJDkcOw3e1rgOqd7TCW0HyKNPM8OMehMg,1005
|
19
|
-
pychemstation/generated/dad_method.py,sha256=0W8Z5WDtF5jpIcudMqb7XrkTnR2EGg_QOCsHRFQ0rmM,8402
|
20
|
-
pychemstation/generated/pump_method.py,sha256=sUhE2Oo00nzVcoONtq3EMWsN4wLSryXbG8f3EeViWKg,12174
|
21
|
-
pychemstation/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
-
pychemstation/utils/chemstation.py,sha256=bnFIsZZwFy9NKzVUf517yN-ogzQbm0hp_aho3KUD6Is,9317
|
23
|
-
pychemstation/utils/chromatogram.py,sha256=35nvEh6prVsWO6lMHYgGuidUOFHv954_7MNf0Az3Fz4,3759
|
24
|
-
pychemstation/utils/constants.py,sha256=jLY-NixemSofukzSXJhAIU4aO2IJmBRAhAcq5066mFI,249
|
25
|
-
pychemstation/utils/hplc_param_types.py,sha256=xvmsbYQp3iiS1-0-9eUy--5zk_wE1bkrlHEHSm0UC18,5206
|
26
|
-
pychemstation/utils/macro.py,sha256=ngIhLfFCRXbFzfFu5y3LbWy16W1T2CErnx1374JjG0w,2284
|
27
|
-
pychemstation/utils/method_types.py,sha256=tVpmWKa2BdkvpaEcvVIKOTjF76ZfHGryw168GXYoKDA,868
|
28
|
-
pychemstation/utils/parsing.py,sha256=bnFIsZZwFy9NKzVUf517yN-ogzQbm0hp_aho3KUD6Is,9317
|
29
|
-
pychemstation/utils/sequence_types.py,sha256=fvoEsJaw3M0ADMNnIFzkHl07-tzqYHylPFeeJ8AdwZ8,867
|
30
|
-
pychemstation/utils/table_types.py,sha256=BBCRoz1R6zPV1i2u2Tdku7WwIp6EDv1rUuZVPVNgO1A,2090
|
31
|
-
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
-
tests/constants.py,sha256=TPwdBhG9M7VIZ5sxqEfspqC2pUS9ZSQM4z7ZKiKwzSo,625
|
33
|
-
tests/test_comm.py,sha256=SvA9xuYnyXApMN2NniEW3rDRadknjCgKwlCV4WANyfk,2460
|
34
|
-
tests/test_method.py,sha256=DGMDGj_O-YDc4-JYVEP152DxH81qsHP3E-5ZDlaKmTQ,2203
|
35
|
-
tests/test_sequence.py,sha256=83Ii7GI7OlBqugxMXKcP1xrZLwed6jABMecQoEQp9ac,3930
|
36
|
-
pychemstation-0.5.2.dist-info/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
|
37
|
-
pychemstation-0.5.2.dist-info/METADATA,sha256=7b6fapSIzcB1xHFUvifLjXdJObdQPpdTbnOBYvV2Gmc,3959
|
38
|
-
pychemstation-0.5.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
39
|
-
pychemstation-0.5.2.dist-info/top_level.txt,sha256=zXfKu_4nYWwPHo3OsuhshMNC3SPkcoTGCyODjURaghY,20
|
40
|
-
pychemstation-0.5.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|