pychemstation 0.5.13.dev7__py3-none-any.whl → 0.5.14.dev1__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/control/controllers/devices/injector.py +11 -0
- pychemstation/control/controllers/tables/ms.py +21 -0
- pychemstation/control/controllers/tables/table.py +26 -10
- {pychemstation-0.5.13.dev7.dist-info → pychemstation-0.5.14.dev1.dist-info}/METADATA +1 -1
- {pychemstation-0.5.13.dev7.dist-info → pychemstation-0.5.14.dev1.dist-info}/RECORD +10 -8
- tests/constants.py +1 -1
- tests/test_method.py +21 -1
- {pychemstation-0.5.13.dev7.dist-info → pychemstation-0.5.14.dev1.dist-info}/LICENSE +0 -0
- {pychemstation-0.5.13.dev7.dist-info → pychemstation-0.5.14.dev1.dist-info}/WHEEL +0 -0
- {pychemstation-0.5.13.dev7.dist-info → pychemstation-0.5.14.dev1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
from ....control.controllers import CommunicationController
|
2
|
+
from .device import DeviceController
|
3
|
+
from ....utils.table_types import Table
|
4
|
+
|
5
|
+
|
6
|
+
class InjectorController(DeviceController):
|
7
|
+
def get_row(self, row: int):
|
8
|
+
pass
|
9
|
+
|
10
|
+
def __init__(self, controller: CommunicationController, table: Table):
|
11
|
+
super().__init__(controller, table)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
from typing import Union
|
2
|
+
|
3
|
+
from ....control.controllers import CommunicationController
|
4
|
+
from ....control.controllers.tables.table import TableController
|
5
|
+
from ....utils.chromatogram import AgilentChannelChromatogramData
|
6
|
+
from ....utils.table_types import Table
|
7
|
+
|
8
|
+
|
9
|
+
class MassSpecController(TableController):
|
10
|
+
|
11
|
+
def __init__(self, controller: CommunicationController, src: str, data_dir: str, table: Table):
|
12
|
+
super().__init__(controller, src, data_dir, table)
|
13
|
+
|
14
|
+
def get_row(self, row: int):
|
15
|
+
pass
|
16
|
+
|
17
|
+
def retrieve_recent_data_files(self):
|
18
|
+
pass
|
19
|
+
|
20
|
+
def get_data(self) -> Union[list[AgilentChannelChromatogramData], AgilentChannelChromatogramData]:
|
21
|
+
pass
|
@@ -12,7 +12,6 @@ from typing import Union, Optional
|
|
12
12
|
import numpy as np
|
13
13
|
import polling
|
14
14
|
import rainbow as rb
|
15
|
-
from rainbow import DataFile
|
16
15
|
from result import Result, Ok, Err
|
17
16
|
|
18
17
|
from ....control.controllers.comm import CommunicationController
|
@@ -43,6 +42,9 @@ class TableController(abc.ABC):
|
|
43
42
|
self.table_state: Optional[TableType] = None
|
44
43
|
|
45
44
|
if not offline:
|
45
|
+
# Initialize row counter for table operations
|
46
|
+
self.send('Local Rows')
|
47
|
+
|
46
48
|
if os.path.isdir(src):
|
47
49
|
self.src: str = src
|
48
50
|
else:
|
@@ -53,7 +55,7 @@ class TableController(abc.ABC):
|
|
53
55
|
else:
|
54
56
|
raise FileNotFoundError(f"dir: {data_dir} not found.")
|
55
57
|
|
56
|
-
|
58
|
+
self.spectra: dict[str, Optional[AgilentHPLCChromatogram]] = {
|
57
59
|
"A": AgilentHPLCChromatogram(self.data_dir),
|
58
60
|
"B": AgilentHPLCChromatogram(self.data_dir),
|
59
61
|
"C": AgilentHPLCChromatogram(self.data_dir),
|
@@ -63,13 +65,22 @@ class TableController(abc.ABC):
|
|
63
65
|
"G": AgilentHPLCChromatogram(self.data_dir),
|
64
66
|
"H": AgilentHPLCChromatogram(self.data_dir),
|
65
67
|
}
|
66
|
-
|
68
|
+
else:
|
69
|
+
self.spectra: dict[str, Optional[AgilentHPLCChromatogram]] = {
|
70
|
+
"A": AgilentHPLCChromatogram(),
|
71
|
+
"B": AgilentHPLCChromatogram(),
|
72
|
+
"C": AgilentHPLCChromatogram(),
|
73
|
+
"D": AgilentHPLCChromatogram(),
|
74
|
+
"E": AgilentHPLCChromatogram(),
|
75
|
+
"F": AgilentHPLCChromatogram(),
|
76
|
+
"G": AgilentHPLCChromatogram(),
|
77
|
+
"H": AgilentHPLCChromatogram(),
|
78
|
+
}
|
67
79
|
self.data_files: Union[list[SequenceDataFiles], list[str]] = []
|
68
80
|
|
69
81
|
self.uv = None
|
70
82
|
|
71
|
-
|
72
|
-
self.send('Local Rows')
|
83
|
+
|
73
84
|
|
74
85
|
def receive(self) -> Result[Response, str]:
|
75
86
|
for _ in range(10):
|
@@ -231,10 +242,15 @@ class TableController(abc.ABC):
|
|
231
242
|
timeout *= len(sequence.rows)
|
232
243
|
|
233
244
|
most_recent_folder = self.retrieve_recent_data_files()
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
245
|
+
|
246
|
+
finished_run = False
|
247
|
+
try:
|
248
|
+
finished_run = polling.poll(
|
249
|
+
lambda: self.controller.check_if_running(),
|
250
|
+
timeout=timeout,
|
251
|
+
step=50)
|
252
|
+
except Exception:
|
253
|
+
pass
|
238
254
|
|
239
255
|
check_folder = self.fuzzy_match_most_recent_folder(most_recent_folder)
|
240
256
|
if check_folder.is_ok() and finished_run:
|
@@ -274,7 +290,7 @@ class TableController(abc.ABC):
|
|
274
290
|
pass
|
275
291
|
|
276
292
|
def get_uv_spectrum(self, path: str):
|
277
|
-
data_uv
|
293
|
+
data_uv = rb.agilent.chemstation.parse_file(os.path.join(path, "DAD1.UV"))
|
278
294
|
zipped_data = zip(data_uv.ylabels, data_uv.data)
|
279
295
|
self.uv = {str(w_a[0]): ChromData(x=data_uv.xlabels, y=w_a[1]) for w_a in zipped_data}
|
280
296
|
|
@@ -14,11 +14,13 @@ pychemstation/control/controllers/table_controller.py,sha256=70ovnIjLKkJborS1ztk
|
|
14
14
|
pychemstation/control/controllers/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
pychemstation/control/controllers/devices/column.py,sha256=SCpCnVFZFUM9LM51MbWkVcBRayN3WFxy7lz9gs2PYeY,348
|
16
16
|
pychemstation/control/controllers/devices/device.py,sha256=SF1JK93FjmACnYrlKvldX3gEeA21qnXZegeNhc9QJGQ,738
|
17
|
+
pychemstation/control/controllers/devices/injector.py,sha256=PfkSQlpE1zMzwyJ55Km1AdtPtdOS2RNyHDwAt_ZNa6M,349
|
17
18
|
pychemstation/control/controllers/devices/pump.py,sha256=DJQh4lNXEraeC1CWrsKmsITOjuYlRI3tih_XRB3F1hg,1404
|
18
19
|
pychemstation/control/controllers/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
20
|
pychemstation/control/controllers/tables/method.py,sha256=Woni_nAEWRZ79wf2WixLnJWZONNdGgZGGV9GG7m0qCQ,16189
|
21
|
+
pychemstation/control/controllers/tables/ms.py,sha256=JFD-tOhu8uRyKdl-E3-neRssii8MNqVRIlsrnFhNY_M,682
|
20
22
|
pychemstation/control/controllers/tables/sequence.py,sha256=vqwJeV38YWdFnaDXvZVOGYl-UCV9lmMbh8Fj5kQ3mqY,8815
|
21
|
-
pychemstation/control/controllers/tables/table.py,sha256=
|
23
|
+
pychemstation/control/controllers/tables/table.py,sha256=pJCtMDGHweBhm_BEo0qhh2AjCjYAx1QyIY0AShs707A,12411
|
22
24
|
pychemstation/control/table/__init__.py,sha256=RgMN4uIWHdNUHpGRBWdzmzAbk7XEKl6Y-qtqWCxzSZU,124
|
23
25
|
pychemstation/control/table/method.py,sha256=THVoGomSXff_CTU3eAYme0BYwkPzab5UgZKsiZ29QSk,12196
|
24
26
|
pychemstation/control/table/sequence.py,sha256=Eri52AnbE3BGthfrRSvYKYciquUzvHKo0lYUTySYYE8,10542
|
@@ -37,14 +39,14 @@ pychemstation/utils/sequence_types.py,sha256=4cNpmRdPLN5oGN7ozHgT21E65aBO8vV3ZcR
|
|
37
39
|
pychemstation/utils/table_types.py,sha256=mlbxPAiPvO_EBba5OSzuJcpCL0srrC7uUfm_lKsOsmA,2557
|
38
40
|
pychemstation/utils/tray_types.py,sha256=MaHN36rhcEI5mAY95VU8hfP9HhAlngQvMYq-2oyC0hc,764
|
39
41
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
|
-
tests/constants.py,sha256=
|
42
|
+
tests/constants.py,sha256=4FPJjW97yn6QiHNQVSlqjjJUE-Bh9SmyjIvgAeaGQBU,2450
|
41
43
|
tests/test_comb.py,sha256=EDE1Ve0A_EK4qro9imZsrD0xXrQN8hAowiOWPFtw3dM,5515
|
42
44
|
tests/test_comm.py,sha256=EYOpVXzEMQLGhhKYDPO-KaLcJdPSMPTD9Y4jSI0yVQY,2516
|
43
45
|
tests/test_inj.py,sha256=yaPGZoHiOC3ZSgsmrtiqp8QtSo2bMxB9FJhaFlOpad0,1412
|
44
|
-
tests/test_method.py,sha256=
|
46
|
+
tests/test_method.py,sha256=Up2EEysYwldPT9GJw27Mycs6qi_Y2W3opjhc7wnLU9U,3215
|
45
47
|
tests/test_sequence.py,sha256=Nz2iqp1cJgw6kcQvnwSkfBmhxpOH62PoEu6o_5rO-PY,4929
|
46
|
-
pychemstation-0.5.
|
47
|
-
pychemstation-0.5.
|
48
|
-
pychemstation-0.5.
|
49
|
-
pychemstation-0.5.
|
50
|
-
pychemstation-0.5.
|
48
|
+
pychemstation-0.5.14.dev1.dist-info/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
|
49
|
+
pychemstation-0.5.14.dev1.dist-info/METADATA,sha256=-kS4rtI8LDxt1GKutFyCSSMi2fx65plU2b7EgUb6m1c,4376
|
50
|
+
pychemstation-0.5.14.dev1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
51
|
+
pychemstation-0.5.14.dev1.dist-info/top_level.txt,sha256=zXfKu_4nYWwPHo3OsuhshMNC3SPkcoTGCyODjURaghY,20
|
52
|
+
pychemstation-0.5.14.dev1.dist-info/RECORD,,
|
tests/constants.py
CHANGED
@@ -20,7 +20,7 @@ HEIN_LAB_CONSTANTS = [DEFAULT_COMMAND_PATH,
|
|
20
20
|
# these CONSTANTS work in rm 254
|
21
21
|
DEFAULT_COMMAND_PATH_254 = "D:\\\git_repositories\\\hplc_comm\\"
|
22
22
|
DEFAULT_METHOD_DIR_254 = "D:\\Chemstation\\1\\Methods\\"
|
23
|
-
DATA_DIR_254 = "D:\\Chemstation\\1\\Data\\
|
23
|
+
DATA_DIR_254 = "D:\\Chemstation\\1\\Data\\LC BO\\"
|
24
24
|
SEQUENCE_DIR_254 = "C:\\1\\Sequence\\"
|
25
25
|
|
26
26
|
HEIN_LAB_CONSTANTS_254 = [DEFAULT_COMMAND_PATH_254,
|
tests/test_method.py
CHANGED
@@ -56,6 +56,26 @@ class TestMethod(unittest.TestCase):
|
|
56
56
|
except Exception as e:
|
57
57
|
self.fail(f"Should have not failed: {e}")
|
58
58
|
|
59
|
+
def test_run_10_times(self):
|
60
|
+
self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
|
61
|
+
rand_method = MethodDetails(
|
62
|
+
name=DEFAULT_METHOD,
|
63
|
+
params=HPLCMethodParams(
|
64
|
+
organic_modifier=5,
|
65
|
+
flow=0.65),
|
66
|
+
timetable=[TimeTableEntry(
|
67
|
+
start_time=0.50,
|
68
|
+
organic_modifer=99,
|
69
|
+
flow=0.65)],
|
70
|
+
stop_time=1,
|
71
|
+
post_time=0)
|
72
|
+
self.hplc_controller.edit_method(rand_method, save=True)
|
73
|
+
try:
|
74
|
+
for _ in range(10):
|
75
|
+
self.hplc_controller.run_method(experiment_name="limiting_testing")
|
76
|
+
except Exception as e:
|
77
|
+
self.fail(f"Should have not failed: {e}")
|
78
|
+
|
59
79
|
|
60
80
|
if __name__ == '__main__':
|
61
|
-
unittest.main()
|
81
|
+
unittest.main()
|
File without changes
|
File without changes
|
File without changes
|