pychemstation.utils.method_types

 1from __future__ import annotations
 2
 3from dataclasses import dataclass
 4from enum import Enum
 5from typing import Any, Optional, Union
 6
 7from .table_types import RegisterFlag
 8
 9
10class PType(Enum):
11    STR = "str"
12    NUM = "num"
13
14
15@dataclass
16class Param:
17    ptype: PType
18    val: Union[float, int, str, Any]
19    chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
20
21
22@dataclass
23class HPLCMethodParams:
24    """The starting conditions of a run that are displayed in the Chemstation GUI for the pump."""
25
26    organic_modifier: float
27    flow: float
28    pressure: Optional[float] = None  # TODO: find this
29
30
31@dataclass
32class TimeTableEntry:
33    """Row in a method timetable."""
34
35    start_time: float
36    organic_modifer: Optional[float] = None
37    flow: Optional[float] = None
38
39
40@dataclass
41class MethodDetails:
42    """An Agilent Chemstation method
43
44    :param name: the name of the method, should be the same as the Chemstation method name.
45    :param timetable: list of entries in the method timetable
46    :param stop_time: the time the method stops running after the last timetable entry. If `None`, won't be set.
47    :param post_time: the amount of time after the stoptime that the pumps keep running,
48        based on settings in the first row of the timetable. If `None`, won't be set.
49    :param params: the organic modifier (pump B) and flow rate displayed for the method (the time 0 settings)
50    """
51
52    name: str
53    params: HPLCMethodParams
54    timetable: list[TimeTableEntry]
55    stop_time: Optional[float] = None
56    post_time: Optional[float] = None
class PType(enum.Enum):
11class PType(Enum):
12    STR = "str"
13    NUM = "num"
STR = <PType.STR: 'str'>
NUM = <PType.NUM: 'num'>
@dataclass
class Param:
16@dataclass
17class Param:
18    ptype: PType
19    val: Union[float, int, str, Any]
20    chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
Param( ptype: PType, val: Union[float, int, str, Any], chemstation_key: Union[pychemstation.utils.table_types.RegisterFlag, list[pychemstation.utils.table_types.RegisterFlag]])
ptype: PType
val: Union[float, int, str, Any]
@dataclass
class HPLCMethodParams:
23@dataclass
24class HPLCMethodParams:
25    """The starting conditions of a run that are displayed in the Chemstation GUI for the pump."""
26
27    organic_modifier: float
28    flow: float
29    pressure: Optional[float] = None  # TODO: find this

The starting conditions of a run that are displayed in the Chemstation GUI for the pump.

HPLCMethodParams( organic_modifier: float, flow: float, pressure: Optional[float] = None)
organic_modifier: float
flow: float
pressure: Optional[float] = None
@dataclass
class TimeTableEntry:
32@dataclass
33class TimeTableEntry:
34    """Row in a method timetable."""
35
36    start_time: float
37    organic_modifer: Optional[float] = None
38    flow: Optional[float] = None

Row in a method timetable.

TimeTableEntry( start_time: float, organic_modifer: Optional[float] = None, flow: Optional[float] = None)
start_time: float
organic_modifer: Optional[float] = None
flow: Optional[float] = None
@dataclass
class MethodDetails:
41@dataclass
42class MethodDetails:
43    """An Agilent Chemstation method
44
45    :param name: the name of the method, should be the same as the Chemstation method name.
46    :param timetable: list of entries in the method timetable
47    :param stop_time: the time the method stops running after the last timetable entry. If `None`, won't be set.
48    :param post_time: the amount of time after the stoptime that the pumps keep running,
49        based on settings in the first row of the timetable. If `None`, won't be set.
50    :param params: the organic modifier (pump B) and flow rate displayed for the method (the time 0 settings)
51    """
52
53    name: str
54    params: HPLCMethodParams
55    timetable: list[TimeTableEntry]
56    stop_time: Optional[float] = None
57    post_time: Optional[float] = None

An Agilent Chemstation method

Parameters
  • name: the name of the method, should be the same as the Chemstation method name.
  • timetable: list of entries in the method timetable
  • stop_time: the time the method stops running after the last timetable entry. If None, won't be set.
  • post_time: the amount of time after the stoptime that the pumps keep running, based on settings in the first row of the timetable. If None, won't be set.
  • params: the organic modifier (pump B) and flow rate displayed for the method (the time 0 settings)
MethodDetails( name: str, params: HPLCMethodParams, timetable: list[TimeTableEntry], stop_time: Optional[float] = None, post_time: Optional[float] = None)
name: str
timetable: list[TimeTableEntry]
stop_time: Optional[float] = None
post_time: Optional[float] = None