pychemstation 0.4.7.dev1__py3-none-any.whl → 0.4.7.dev2__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/__init__.py +3 -2
- hein-analytical-control/devices/Agilent/hplc.py → pychemstation/control/comm.py +21 -181
- pychemstation/control/method.py +232 -0
- pychemstation/control/sequence.py +140 -0
- pychemstation/control/table_controller.py +75 -0
- pychemstation/utils/__init__.py +0 -2
- {ag_hplc_macro/control → pychemstation/utils}/chromatogram.py +2 -1
- pychemstation/utils/constants.py +1 -1
- hein_analytical_control/devices/Agilent/hplc_param_types.py → pychemstation/utils/macro.py +5 -69
- pychemstation/utils/method_types.py +44 -0
- pychemstation/utils/sequence_types.py +33 -0
- pychemstation/utils/table_types.py +60 -0
- {pychemstation-0.4.7.dev1.dist-info → pychemstation-0.4.7.dev2.dist-info}/METADATA +13 -12
- pychemstation-0.4.7.dev2.dist-info/RECORD +30 -0
- ag_hplc_macro/__init__.py +0 -3
- ag_hplc_macro/analysis/__init__.py +0 -1
- ag_hplc_macro/analysis/base_spectrum.py +0 -509
- ag_hplc_macro/analysis/spec_utils.py +0 -304
- ag_hplc_macro/analysis/utils.py +0 -63
- ag_hplc_macro/control/__init__.py +0 -5
- ag_hplc_macro/control/hplc.py +0 -673
- ag_hplc_macro/generated/__init__.py +0 -56
- ag_hplc_macro/generated/dad_method.py +0 -367
- ag_hplc_macro/generated/pump_method.py +0 -519
- ag_hplc_macro/utils/__init__.py +0 -2
- ag_hplc_macro/utils/constants.py +0 -15
- ag_hplc_macro/utils/hplc_param_types.py +0 -185
- hein-analytical-control/__init__.py +0 -3
- hein-analytical-control/analysis/__init__.py +0 -1
- hein-analytical-control/analysis/base_spectrum.py +0 -509
- hein-analytical-control/analysis/spec_utils.py +0 -304
- hein-analytical-control/analysis/utils.py +0 -63
- hein-analytical-control/devices/Agilent/__init__.py +0 -3
- hein-analytical-control/devices/Agilent/chemstation.py +0 -290
- hein-analytical-control/devices/Agilent/chromatogram.py +0 -129
- hein-analytical-control/devices/Agilent/hplc_param_types.py +0 -141
- hein-analytical-control/devices/Magritek/Spinsolve/__init__.py +0 -0
- hein-analytical-control/devices/Magritek/Spinsolve/commands.py +0 -495
- hein-analytical-control/devices/Magritek/Spinsolve/spectrum.py +0 -822
- hein-analytical-control/devices/Magritek/Spinsolve/spinsolve.py +0 -425
- hein-analytical-control/devices/Magritek/Spinsolve/utils/__init__.py +0 -5
- hein-analytical-control/devices/Magritek/Spinsolve/utils/connection.py +0 -168
- hein-analytical-control/devices/Magritek/Spinsolve/utils/constants.py +0 -8
- hein-analytical-control/devices/Magritek/Spinsolve/utils/exceptions.py +0 -25
- hein-analytical-control/devices/Magritek/Spinsolve/utils/parser.py +0 -340
- hein-analytical-control/devices/Magritek/Spinsolve/utils/shimming.py +0 -55
- hein-analytical-control/devices/Magritek/Spinsolve/utils/spinsolve_logging.py +0 -43
- hein-analytical-control/devices/Magritek/__init__.py +0 -0
- hein-analytical-control/devices/OceanOptics/IR/NIRQuest512.py +0 -90
- hein-analytical-control/devices/OceanOptics/IR/__init__.py +0 -0
- hein-analytical-control/devices/OceanOptics/IR/ir_spectrum.py +0 -191
- hein-analytical-control/devices/OceanOptics/Raman/__init__.py +0 -0
- hein-analytical-control/devices/OceanOptics/Raman/raman_control.py +0 -46
- hein-analytical-control/devices/OceanOptics/Raman/raman_spectrum.py +0 -148
- hein-analytical-control/devices/OceanOptics/UV/QEPro2192.py +0 -90
- hein-analytical-control/devices/OceanOptics/UV/__init__.py +0 -0
- hein-analytical-control/devices/OceanOptics/UV/uv_spectrum.py +0 -227
- hein-analytical-control/devices/OceanOptics/__init__.py +0 -0
- hein-analytical-control/devices/OceanOptics/oceanoptics.py +0 -115
- hein-analytical-control/devices/__init__.py +0 -15
- hein-analytical-control/generated/__init__.py +0 -56
- hein-analytical-control/generated/dad_method.py +0 -367
- hein-analytical-control/generated/pump_method.py +0 -519
- hein_analytical_control/__init__.py +0 -3
- hein_analytical_control/analysis/__init__.py +0 -1
- hein_analytical_control/analysis/base_spectrum.py +0 -509
- hein_analytical_control/analysis/spec_utils.py +0 -304
- hein_analytical_control/analysis/utils.py +0 -63
- hein_analytical_control/devices/Agilent/__init__.py +0 -3
- hein_analytical_control/devices/Agilent/chemstation.py +0 -290
- hein_analytical_control/devices/Agilent/chromatogram.py +0 -129
- hein_analytical_control/devices/Agilent/hplc.py +0 -436
- hein_analytical_control/devices/Magritek/Spinsolve/__init__.py +0 -0
- hein_analytical_control/devices/Magritek/Spinsolve/commands.py +0 -495
- hein_analytical_control/devices/Magritek/Spinsolve/spectrum.py +0 -822
- hein_analytical_control/devices/Magritek/Spinsolve/spinsolve.py +0 -425
- hein_analytical_control/devices/Magritek/Spinsolve/utils/__init__.py +0 -5
- hein_analytical_control/devices/Magritek/Spinsolve/utils/connection.py +0 -168
- hein_analytical_control/devices/Magritek/Spinsolve/utils/constants.py +0 -8
- hein_analytical_control/devices/Magritek/Spinsolve/utils/exceptions.py +0 -25
- hein_analytical_control/devices/Magritek/Spinsolve/utils/parser.py +0 -340
- hein_analytical_control/devices/Magritek/Spinsolve/utils/shimming.py +0 -55
- hein_analytical_control/devices/Magritek/Spinsolve/utils/spinsolve_logging.py +0 -43
- hein_analytical_control/devices/Magritek/__init__.py +0 -0
- hein_analytical_control/devices/OceanOptics/IR/NIRQuest512.py +0 -90
- hein_analytical_control/devices/OceanOptics/IR/__init__.py +0 -0
- hein_analytical_control/devices/OceanOptics/IR/ir_spectrum.py +0 -191
- hein_analytical_control/devices/OceanOptics/Raman/__init__.py +0 -0
- hein_analytical_control/devices/OceanOptics/Raman/raman_control.py +0 -46
- hein_analytical_control/devices/OceanOptics/Raman/raman_spectrum.py +0 -148
- hein_analytical_control/devices/OceanOptics/UV/QEPro2192.py +0 -90
- hein_analytical_control/devices/OceanOptics/UV/__init__.py +0 -0
- hein_analytical_control/devices/OceanOptics/UV/uv_spectrum.py +0 -227
- hein_analytical_control/devices/OceanOptics/__init__.py +0 -0
- hein_analytical_control/devices/OceanOptics/oceanoptics.py +0 -115
- hein_analytical_control/devices/__init__.py +0 -15
- hein_analytical_control/generated/__init__.py +0 -56
- hein_analytical_control/generated/dad_method.py +0 -367
- hein_analytical_control/generated/pump_method.py +0 -519
- pychemstation-0.4.7.dev1.dist-info/RECORD +0 -109
- /ag_hplc_macro/utils/chemstation.py → /pychemstation/utils/parsing.py +0 -0
- {pychemstation-0.4.7.dev1.dist-info → pychemstation-0.4.7.dev2.dist-info}/LICENSE +0 -0
- {pychemstation-0.4.7.dev1.dist-info → pychemstation-0.4.7.dev2.dist-info}/WHEEL +0 -0
- {pychemstation-0.4.7.dev1.dist-info → pychemstation-0.4.7.dev2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
import os
|
2
|
+
from typing import Union
|
3
|
+
|
4
|
+
|
5
|
+
from .comm import HPLCController
|
6
|
+
from ..utils.macro import Command
|
7
|
+
from ..utils.table_types import Table, TableOperation, RegisterFlag
|
8
|
+
|
9
|
+
|
10
|
+
class TableController:
|
11
|
+
|
12
|
+
def __init__(self, controller: HPLCController, src: str):
|
13
|
+
self.controller = controller
|
14
|
+
if os.path.isdir(src):
|
15
|
+
self.src: str = src
|
16
|
+
else:
|
17
|
+
raise FileNotFoundError(f"dir: {src} not found.")
|
18
|
+
|
19
|
+
def sleep(self, seconds: int):
|
20
|
+
self.controller.sleep(seconds)
|
21
|
+
|
22
|
+
def receive(self):
|
23
|
+
self.controller.receive()
|
24
|
+
|
25
|
+
def send(self, cmd: Union[Command, str]):
|
26
|
+
self.controller.send(cmd)
|
27
|
+
|
28
|
+
def sleepy_send(self, cmd: Union[Command, str]):
|
29
|
+
self.controller.sleepy_send(cmd)
|
30
|
+
|
31
|
+
def add_table_row(self, table: Table):
|
32
|
+
"""Adds a row to the provided table for currently loaded method or sequence.
|
33
|
+
Import either the SEQUENCE_TABLE or METHOD_TIMETABLE from hein_analytical_control.constants.
|
34
|
+
You can also provide your own table.
|
35
|
+
|
36
|
+
:param table: the table to add a new row to
|
37
|
+
"""
|
38
|
+
self.sleepy_send(TableOperation.NEW_ROW.value.format(register=table.register,
|
39
|
+
table_name=table.name))
|
40
|
+
|
41
|
+
def delete_table(self, table: Table):
|
42
|
+
"""Deletes the table for the current loaded method or sequence.
|
43
|
+
Import either the SEQUENCE_TABLE or METHOD_TIMETABLE from hein_analytical_control.constants.
|
44
|
+
You can also provide your own table.
|
45
|
+
|
46
|
+
:param table: the table to delete
|
47
|
+
"""
|
48
|
+
self.sleepy_send(TableOperation.DELETE_TABLE.value.format(register=table.register,
|
49
|
+
table_name=table.name))
|
50
|
+
|
51
|
+
def new_table(self, table: Table):
|
52
|
+
"""Creates the table for the currently loaded method or sequence. Import either the SEQUENCE_TABLE or
|
53
|
+
METHOD_TIMETABLE from hein_analytical_control.constants. You can also provide your own table.
|
54
|
+
|
55
|
+
:param table: the table to create
|
56
|
+
"""
|
57
|
+
self.send(TableOperation.CREATE_TABLE.value.format(register=table.register,
|
58
|
+
table_name=table.name))
|
59
|
+
|
60
|
+
def _get_table_rows(self, table: Table) -> str:
|
61
|
+
self.send(TableOperation.GET_OBJ_HDR_VAL.value.format(internal_val="Rows",
|
62
|
+
register=table.register,
|
63
|
+
table_name=table.name,
|
64
|
+
col_name=RegisterFlag.NUM_ROWS, ))
|
65
|
+
res = self.controller.receive()
|
66
|
+
self.send("Sleep 1")
|
67
|
+
self.send('Print Rows')
|
68
|
+
return res
|
69
|
+
|
70
|
+
def get_data(self):
|
71
|
+
self.controller.get_spectrum()
|
72
|
+
return self.controller.spectra["A"]
|
73
|
+
|
74
|
+
def data_ready(self) -> bool:
|
75
|
+
return self.controller.check_hplc_ready_with_data()
|
pychemstation/utils/__init__.py
CHANGED
@@ -6,8 +6,8 @@ import time
|
|
6
6
|
|
7
7
|
import numpy as np
|
8
8
|
|
9
|
+
from .parsing import CHFile
|
9
10
|
from ..analysis import AbstractSpectrum
|
10
|
-
from ..utils.chemstation import CHFile
|
11
11
|
|
12
12
|
# Chemstation data path
|
13
13
|
DATA_DIR = r"C:\Chem32\1\Data"
|
@@ -20,6 +20,7 @@ ACQUISITION_PARAMETERS = "acq.txt"
|
|
20
20
|
|
21
21
|
# format used in acquisition parameters
|
22
22
|
TIME_FORMAT = "%Y-%m-%d-%H-%M-%S"
|
23
|
+
SEQUENCE_TIME_FORMAT = "%Y-%m-%d %H"
|
23
24
|
|
24
25
|
|
25
26
|
class AgilentHPLCChromatogram(AbstractSpectrum):
|
pychemstation/utils/constants.py
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
1
|
from enum import Enum
|
3
|
-
from typing import Union
|
4
|
-
|
5
|
-
from ...generated import SolventElement, Signal
|
2
|
+
from typing import Union
|
6
3
|
|
7
4
|
|
8
5
|
# Commands sent to the Chemstation Macro
|
@@ -27,71 +24,10 @@ class Command(Enum):
|
|
27
24
|
RUN_METHOD_CMD = 'RunMethod "{data_dir}",, "{experiment_name}_{timestamp}"'
|
28
25
|
STOP_METHOD_CMD = "StopMethod"
|
29
26
|
UPDATE_METHOD_CMD = 'UpdateMethod'
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
return '%s' % self.value
|
35
|
-
|
36
|
-
SOLVENT_A_COMPOSITION = "PumpChannel_CompositionPercentage"
|
37
|
-
SOLVENT_B_COMPOSITION = "PumpChannel2_CompositionPercentage"
|
38
|
-
SOLVENT_C_COMPOSITION = "PumpChannel3_CompositionPercentage"
|
39
|
-
SOLVENT_D_COMPOSITION = "PumpChannel4_CompositionPercentage"
|
40
|
-
FLOW = "Flow"
|
41
|
-
MAX_TIME = "StopTime_Time"
|
42
|
-
COLUMN_OVEN_TEMP1 = "TemperatureControl_Temperature"
|
43
|
-
COLUMN_OVEN_TEMP2 = "TemperatureControl2_Temperature"
|
44
|
-
STOPTIME_MODE = "StopTime_Mode"
|
45
|
-
POSTIME_MODE = "PostTime_Mode"
|
46
|
-
|
47
|
-
|
48
|
-
class MethodTableOperation(Enum):
|
49
|
-
def __str__(self):
|
50
|
-
return '%s' % self.value
|
51
|
-
|
52
|
-
DELETE_TABLE = 'DelTab RCPMP1Method[1], "Timetable"'
|
53
|
-
CREATE_TABLE = 'NewTab RCPMP1Method[1], "Timetable"'
|
54
|
-
NEW_ROW = 'InsTabRow RCPMP1Method[1], "Timetable"'
|
55
|
-
NEW_COLUMN = ""
|
56
|
-
DOWNLOAD_TABLE = ""
|
57
|
-
|
58
|
-
|
59
|
-
class PType(Enum):
|
60
|
-
STR = "str"
|
61
|
-
NUM = "num"
|
62
|
-
|
63
|
-
|
64
|
-
@dataclass
|
65
|
-
class Param:
|
66
|
-
ptype: PType
|
67
|
-
val: Union[float, int, str, Any]
|
68
|
-
chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
|
69
|
-
|
70
|
-
|
71
|
-
@dataclass
|
72
|
-
class HPLCMethodParams:
|
73
|
-
organic_modifier: Param
|
74
|
-
flow: Param
|
75
|
-
temperature: Param
|
76
|
-
inj_vol: Param
|
77
|
-
equ_time: Param
|
78
|
-
maximum_run_time: Param
|
79
|
-
|
80
|
-
|
81
|
-
@dataclass
|
82
|
-
class Entry:
|
83
|
-
start_time: float
|
84
|
-
organic_modifer: float
|
85
|
-
flow: float
|
86
|
-
|
87
|
-
|
88
|
-
@dataclass
|
89
|
-
class MethodTimetable:
|
90
|
-
first_row: HPLCMethodParams
|
91
|
-
subsequent_rows: list[Entry]
|
92
|
-
dad_wavelengthes: list[Signal]
|
93
|
-
organic_modifier: SolventElement
|
94
|
-
modifier_a: SolventElement
|
27
|
+
SWITCH_SEQUENCE_CMD = 'LoadSequence _SeqPath$, _SeqFile$'
|
28
|
+
SAVE_SEQUENCE_CMD = 'SaveSequence _SeqPath$, _SeqFile$'
|
29
|
+
GET_SEQUENCE_CMD = 'response$ = _SeqFile$'
|
30
|
+
RUN_SEQUENCE_CMD = 'RunSequence'
|
95
31
|
|
96
32
|
|
97
33
|
class HPLCRunningStatus(Enum):
|
@@ -0,0 +1,44 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from enum import Enum
|
3
|
+
from typing import Union, Any, Optional
|
4
|
+
|
5
|
+
from .table_types import RegisterFlag
|
6
|
+
from ..generated import Signal, SolventElement
|
7
|
+
|
8
|
+
|
9
|
+
class PType(Enum):
|
10
|
+
STR = "str"
|
11
|
+
NUM = "num"
|
12
|
+
|
13
|
+
|
14
|
+
@dataclass
|
15
|
+
class Param:
|
16
|
+
ptype: PType
|
17
|
+
val: Union[float, int, str, Any]
|
18
|
+
chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
|
19
|
+
|
20
|
+
|
21
|
+
@dataclass
|
22
|
+
class HPLCMethodParams:
|
23
|
+
organic_modifier: Param
|
24
|
+
flow: Param
|
25
|
+
temperature: Param
|
26
|
+
inj_vol: Param
|
27
|
+
equ_time: Param
|
28
|
+
maximum_run_time: Param
|
29
|
+
|
30
|
+
|
31
|
+
@dataclass
|
32
|
+
class TimeTableEntry:
|
33
|
+
start_time: float
|
34
|
+
organic_modifer: float
|
35
|
+
flow: float
|
36
|
+
|
37
|
+
|
38
|
+
@dataclass
|
39
|
+
class MethodTimetable:
|
40
|
+
first_row: HPLCMethodParams
|
41
|
+
subsequent_rows: list[TimeTableEntry]
|
42
|
+
dad_wavelengthes: Optional[list[Signal]] = None
|
43
|
+
organic_modifier: Optional[SolventElement] = None
|
44
|
+
modifier_a: Optional[SolventElement] = None
|
@@ -0,0 +1,33 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from enum import Enum
|
3
|
+
from typing import Optional
|
4
|
+
|
5
|
+
|
6
|
+
class SampleType(Enum):
|
7
|
+
SAMPLE = 1
|
8
|
+
BLANK = 2
|
9
|
+
CONTROL = 3
|
10
|
+
CALIBRATION = 4
|
11
|
+
|
12
|
+
|
13
|
+
class InjectionSource(Enum):
|
14
|
+
AS_METHOD = "AsMethod"
|
15
|
+
MANUAL = "Manual"
|
16
|
+
HIP_ALS = "HipAls"
|
17
|
+
|
18
|
+
|
19
|
+
@dataclass
|
20
|
+
class SequenceEntry:
|
21
|
+
vial_location: Optional[int] = None
|
22
|
+
method: Optional[str] = None
|
23
|
+
num_inj: Optional[int] = 1
|
24
|
+
inj_vol: Optional[int] = 2
|
25
|
+
inj_source: Optional[InjectionSource] = InjectionSource.HIP_ALS
|
26
|
+
sample_name: Optional[str] = None
|
27
|
+
sample_type: Optional[SampleType] = SampleType.SAMPLE
|
28
|
+
|
29
|
+
|
30
|
+
@dataclass
|
31
|
+
class SequenceTable:
|
32
|
+
name: str
|
33
|
+
rows: list[SequenceEntry]
|
@@ -0,0 +1,60 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from enum import Enum
|
3
|
+
|
4
|
+
|
5
|
+
class TableOperation(Enum):
|
6
|
+
def __str__(self):
|
7
|
+
return '%s' % self.value
|
8
|
+
|
9
|
+
DELETE_TABLE = 'DelTab {register}, "{table_name}"'
|
10
|
+
CREATE_TABLE = 'NewTab {register}, "{table_name}"'
|
11
|
+
NEW_ROW = 'InsTabRow {register}, "{table_name}"'
|
12
|
+
EDIT_ROW_VAL = 'SetTabVal "{register}", "{table_name}", {row}, "{col_name}", {val}'
|
13
|
+
EDIT_ROW_TEXT = 'SetTabText "{register}", "{table_name}", {row}, "{col_name}", "{val}"'
|
14
|
+
GET_ROW_VAL = 'TabVal ("{register}", "{table_name}", {row}, "{col_name}")'
|
15
|
+
GET_ROW_TEXT = 'TabText ("{register}", "{table_name}", {row}, "{col_name}")'
|
16
|
+
GET_OBJ_HDR_VAL = '{internal_val} = TabHdrVal({register}, "{table_name}", "{col_name}")'
|
17
|
+
GET_OBJ_HDR_TEXT = ''
|
18
|
+
UPDATE_OBJ_HDR_VAL = 'SetObjHdrVal {register}, {register_flag}, {val}'
|
19
|
+
UPDATE_OBJ_HDR_TEXT = 'SetObjHdrText {register}, {register_flag}, {val}'
|
20
|
+
NEW_COL_TEXT = 'NewColText {register}, "{table_name}", "{col_name}", "{val}"'
|
21
|
+
NEW_COL_VAL = 'NewColVal {register}, "{table_name}", "{col_name}", {val}'
|
22
|
+
|
23
|
+
|
24
|
+
class RegisterFlag(Enum):
|
25
|
+
def __str__(self):
|
26
|
+
return '%s' % self.value
|
27
|
+
|
28
|
+
# for table
|
29
|
+
NUM_ROWS = "NumberOfRows"
|
30
|
+
|
31
|
+
# for Method
|
32
|
+
SOLVENT_A_COMPOSITION = "PumpChannel_CompositionPercentage"
|
33
|
+
SOLVENT_B_COMPOSITION = "PumpChannel2_CompositionPercentage"
|
34
|
+
SOLVENT_C_COMPOSITION = "PumpChannel3_CompositionPercentage"
|
35
|
+
SOLVENT_D_COMPOSITION = "PumpChannel4_CompositionPercentage"
|
36
|
+
FLOW = "Flow"
|
37
|
+
MAX_TIME = "StopTime_Time"
|
38
|
+
COLUMN_OVEN_TEMP1 = "TemperatureControl_Temperature"
|
39
|
+
COLUMN_OVEN_TEMP2 = "TemperatureControl2_Temperature"
|
40
|
+
STOPTIME_MODE = "StopTime_Mode"
|
41
|
+
POSTIME_MODE = "PostTime_Mode"
|
42
|
+
|
43
|
+
# for Method Timetable
|
44
|
+
SOLVENT_COMPOSITION = "SolventComposition"
|
45
|
+
|
46
|
+
# for Sequence
|
47
|
+
VIAL_LOCATION = "Vial"
|
48
|
+
NAME = "SampleName"
|
49
|
+
METHOD = "Method"
|
50
|
+
INJ_VOL = "InjVolume"
|
51
|
+
INJ_SOR = "InjectionSource"
|
52
|
+
NUM_INJ = "InjVial"
|
53
|
+
SAMPLE_TYPE = "SampleType"
|
54
|
+
DATA_FILE = "DataFileName"
|
55
|
+
|
56
|
+
|
57
|
+
@dataclass
|
58
|
+
class Table:
|
59
|
+
register: str
|
60
|
+
name: str
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pychemstation
|
3
|
-
Version: 0.4.7.
|
3
|
+
Version: 0.4.7.dev2
|
4
4
|
Summary: Library to interact with Chemstation software, primarily used in Hein lab
|
5
5
|
Home-page: https://gitlab.com/heingroup/pychemstation
|
6
6
|
Author: Lucy Hao
|
@@ -15,8 +15,9 @@ Requires-Dist: seabreeze
|
|
15
15
|
|
16
16
|
# Agilent HPLC Macro Control
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+

|
19
|
+
|
20
|
+
[](https://pypi.org/project/pychemstation/)
|
20
21
|
|
21
22
|
Unofficial Python package to control Agilent Chemstation; we are not affiliated with Agilent.
|
22
23
|
Check out the [docs](https://hein-analytical-control-5e6e85.gitlab.io/) for usage instructions. This project is under
|
@@ -58,7 +59,7 @@ HPLCTalk_Run
|
|
58
59
|
## Example Usage
|
59
60
|
|
60
61
|
```python
|
61
|
-
from pychemstation.control import HPLCController
|
62
|
+
from pychemstation.control import HPLCController, MethodController, SequenceController
|
62
63
|
import pandas as pd
|
63
64
|
|
64
65
|
# these paths will be unique to your Chemstation setup
|
@@ -67,17 +68,17 @@ DATA_DIR = "C:\\Users\\Public\\Documents\\ChemStation\\2\\Data"
|
|
67
68
|
DEFAULT_COMMAND_PATH = "C:\\Users\\User\\Desktop\\Lucy\\hplc-method-optimization\\tests"
|
68
69
|
|
69
70
|
hplc_controller = HPLCController(data_dir=DATA_DIR,
|
70
|
-
comm_dir=DEFAULT_COMMAND_PATH
|
71
|
-
|
71
|
+
comm_dir=DEFAULT_COMMAND_PATH)
|
72
|
+
method_controller = MethodController(controller=hplc_controller,
|
73
|
+
src=DEFAULT_METHOD_DIR)
|
72
74
|
|
73
75
|
hplc_controller.preprun()
|
74
|
-
|
75
|
-
|
76
|
-
data_ready =
|
76
|
+
method_controller.switch(method_name="General-Poroshell")
|
77
|
+
method_controller.run(experiment_name="Run 10")
|
78
|
+
data_ready = method_controller.data_ready()
|
77
79
|
|
78
80
|
if data_ready:
|
79
|
-
|
80
|
-
chrom = hplc_controller.spectra["A"]
|
81
|
+
chrom = method_controller.get_data()
|
81
82
|
# afterwards, save, analyze or plot the data!
|
82
83
|
values = {"x": chrom.x, "y": chrom.y}
|
83
84
|
chromatogram_data = pd.DataFrame.from_dict(values)
|
@@ -92,7 +93,7 @@ put the file in the `user.mac` file and then list the function you want to use.
|
|
92
93
|
## Developing
|
93
94
|
|
94
95
|
If you would like to contribute to this project, check out
|
95
|
-
our [GitLab](https://gitlab.com/heingroup/
|
96
|
+
our [GitLab](https://gitlab.com/heingroup/device-api/pychemstation)!
|
96
97
|
|
97
98
|
## Authors and Acknowledgements
|
98
99
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
pychemstation/__init__.py,sha256=SpTl-Tg1B1HTyjNOE-8ue-N2wGnXN_2zl7RFUSxlkiM,33
|
2
|
+
pychemstation/analysis/__init__.py,sha256=EWoU47iyn9xGS-b44zK9eq50bSjOV4AC5dvt420YMI4,44
|
3
|
+
pychemstation/analysis/base_spectrum.py,sha256=FBvwzLtF9mdqW7f8ETY9G4cpfJ-SzbiSkZq9EtXcSXo,17045
|
4
|
+
pychemstation/analysis/spec_utils.py,sha256=8NZMV0dtfxZLARjWzM5ks0tgEYQv_SKUiZzba2IoKgw,10505
|
5
|
+
pychemstation/analysis/utils.py,sha256=ISupAOb_yqA4_DZRK9v18UL-XjUQccAicIJKb1VMnGg,2055
|
6
|
+
pychemstation/control/__init__.py,sha256=Azsalc8Pz1PuygH7CoTzRV8xQOSfET6zd72AMAB7irE,142
|
7
|
+
pychemstation/control/chromatogram.py,sha256=c4_RGconn4vYU9wyS0WX-GB5FlwnBf_sfVLh_GpeehE,3716
|
8
|
+
pychemstation/control/comm.py,sha256=iuzeFLZ_BhNVJwyNJjDiUuaoQBQpFFc0rHiRk0qOgnk,9976
|
9
|
+
pychemstation/control/hplc.py,sha256=GvEL2zxz0_V47E_JrP4ePTUc8FahDDT3PYmd7ASbobA,29746
|
10
|
+
pychemstation/control/method.py,sha256=h9KcccDtqx0hQT7JaUc1TWCB8d21t0McOuzeBsEsh4c,10977
|
11
|
+
pychemstation/control/sequence.py,sha256=ewc7l44VAtv3wHV2QgOILu5Ny3gmubHuEeHJN9N6OjQ,7511
|
12
|
+
pychemstation/control/table_controller.py,sha256=83i1J2CvIrJ3NtAB_E46qhUe8MvXo1_GnDPmuiq-vSA,2957
|
13
|
+
pychemstation/generated/__init__.py,sha256=GAoZFAYbPVEJDkcOw3e1rgOqd7TCW0HyKNPM8OMehMg,1005
|
14
|
+
pychemstation/generated/dad_method.py,sha256=0W8Z5WDtF5jpIcudMqb7XrkTnR2EGg_QOCsHRFQ0rmM,8402
|
15
|
+
pychemstation/generated/pump_method.py,sha256=sUhE2Oo00nzVcoONtq3EMWsN4wLSryXbG8f3EeViWKg,12174
|
16
|
+
pychemstation/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
+
pychemstation/utils/chemstation.py,sha256=bnFIsZZwFy9NKzVUf517yN-ogzQbm0hp_aho3KUD6Is,9317
|
18
|
+
pychemstation/utils/chromatogram.py,sha256=X-D-FdMwHPugrqAtp5vfPPbD_aU3gor3G6WjQzvEuSk,3742
|
19
|
+
pychemstation/utils/constants.py,sha256=jLY-NixemSofukzSXJhAIU4aO2IJmBRAhAcq5066mFI,249
|
20
|
+
pychemstation/utils/hplc_param_types.py,sha256=xvmsbYQp3iiS1-0-9eUy--5zk_wE1bkrlHEHSm0UC18,5206
|
21
|
+
pychemstation/utils/macro.py,sha256=y_ynL_A-FqK3v4-StTmmbUd741vWhjm6kmduVi5IUfE,2212
|
22
|
+
pychemstation/utils/method_types.py,sha256=PSVbKq1IHL4QJNSEl0Szaymfvm3sfXy1rqjT2W_qbN0,911
|
23
|
+
pychemstation/utils/parsing.py,sha256=bnFIsZZwFy9NKzVUf517yN-ogzQbm0hp_aho3KUD6Is,9317
|
24
|
+
pychemstation/utils/sequence_types.py,sha256=sin3X37EQb52CAGY2MOzY4Us9tdLg7FScTGMBWAF5Fs,689
|
25
|
+
pychemstation/utils/table_types.py,sha256=BBCRoz1R6zPV1i2u2Tdku7WwIp6EDv1rUuZVPVNgO1A,2090
|
26
|
+
pychemstation-0.4.7.dev2.dist-info/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
|
27
|
+
pychemstation-0.4.7.dev2.dist-info/METADATA,sha256=QuJvRtOpyJboxO9qPJFi_VbuUw4JP2UTczqXWRz2iW0,3929
|
28
|
+
pychemstation-0.4.7.dev2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
29
|
+
pychemstation-0.4.7.dev2.dist-info/top_level.txt,sha256=ONCqQRPu9Z4_k7TOvj64NVTmO8CqMg_PITePUzYchdY,14
|
30
|
+
pychemstation-0.4.7.dev2.dist-info/RECORD,,
|
ag_hplc_macro/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
from .base_spectrum import AbstractSpectrum
|