-
Notifications
You must be signed in to change notification settings - Fork 1
/
consts.py
76 lines (68 loc) · 1.43 KB
/
consts.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
__author__ = "Igor Kim"
__credits__ = ["Igor Kim"]
__maintainer__ = "Igor Kim"
__email__ = "[email protected]"
__status__ = "Development"
__date__ = "05/2019"
__license__ = "MIT"
from dateutil import parser
import itertools
CHECK_NONE = 0
CHECK_REPLACE = 1
CHECK_DISTANCE = 2
TESSERACT_CONF = '--psm 6'
TRIGGER_WORD = "back"
DEBUG_FOLDER = "build/test"
FOLDERS = [
"build", "build/images", "build/results", "build/test"
]
# lower case is enough
REPLACE_RULES = {
"1,-1": ["i", "[", "]", "l", "7", "?", "t"],
"0,-1": ["o"],
"q,-2": ["g"],
"0,": ["0o", "o0", "00", "oo"],
"q,": ["qg","qq","gg","gq"]
}
# Order matters
EXPECTED_KEYS = {
"phy_cell_id": {
"corr": CHECK_DISTANCE,
"map": int,
"range": (0, 503)
},
"timestamp": {
"corr": CHECK_DISTANCE,
"map": parser.parse
},
"rsrp0": {
"corr": CHECK_REPLACE,
"map": int,
"range": (-150, -40)
},
"rsrp1": {
"corr": CHECK_REPLACE,
"map": int,
"range": (-150, -40)
},
"rsrq0": {
"corr": CHECK_REPLACE,
"map": int,
"range": (-51, -1)
},
"rsrq1": {
"corr": CHECK_REPLACE,
"map": int,
"range": (-51, -1)
},
"sinr0": {
"corr": CHECK_REPLACE,
"map": float,
"range": (-40, 40)
},
"sinr1": {
"corr": CHECK_REPLACE,
"map": float,
"range": (-40, 40)
}
}