-
Notifications
You must be signed in to change notification settings - Fork 0
/
iso_param.py
59 lines (44 loc) · 1.34 KB
/
iso_param.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# coding: UTF-8
from typing import Optional, Union, Iterable
class IsoStep:
"""
This class abstracts the isolation step parameters
"""
def __init__(self, start_param: Union[int, str], num_of_steps: int,
strides: int, first_time: int, interval: int) -> None:
self._start_param = start_param
self._num_of_steps = num_of_steps
self._strides = strides
self._first_time = first_time
self._interval = interval
@property
def start_param(self) -> Union[int, str]:
return self._start_param
@property
def num_of_steps(self) -> int:
return self._num_of_steps
@property
def strides(self) -> int:
return self._strides
@property
def first_time(self) -> int:
return self._first_time
@property
def interval(self) -> int:
return self._interval
class IsoSeq:
"""
This class express the exact sequence for isolation
"""
def __init__(self, seq: Iterable) -> None:
self._seq = seq
class IsoParam:
def __init__(self, iso_step: Optional[IsoStep], iso_seq: Optional[IsoSeq]) -> None:
self._iso_step = iso_step
self._iso_seq = iso_seq
@property
def iso_step(self) -> IsoStep:
return self._iso_step
@property
def iso_seq(self) -> IsoSeq:
return self._iso_seq