-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeory_curve_matcher.py
37 lines (33 loc) · 1.32 KB
/
theory_curve_matcher.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
import config
def match_fem():
"""
return a tuple of (data_dir, degree, suffix, title)
"""
data_dir = config.DATA_BASE_DIR
# match string in data_dir
data_type_map = {
'0.0.90.90.s': ('[0-0-90-90]s/', '0', '_Lamb', '[0/0/90/90]s'),
'90.90.0.0.s': ('[0-0-90-90]s/', '90', '_Lamb', '[90/90/0/0]s'),
'0.90.0.90.s': ('[0-90-0-90]s/', '0', '_Lamb', '[0/90/0/90]s'),
'90.0.90.0.s': ('[0-90-0-90]s/', '90', '_Lamb', '[90/0/90/0]s'),
}
# find if one of the data_types is in data_dir
for data_type in data_type_map.keys():
if data_type in data_dir:
return data_type_map[data_type]
def match_exp():
"""
return a tuple of (data_dir, degree, suffix, title)
"""
data_dir = config.DATA_BASE_DIR
# match string in data_dir
data_type_map = {
'0.0.90.90.s-0': ('[0-0-90-90]s/', '0', '_Lamb', '[0/0/90/90]s'),
'0.0.90.90.s-90': ('[0-0-90-90]s/', '90', '_Lamb', '[90/90/0/0]s'),
'0.90.0.90.s-0': ('[0-90-0-90]s/', '0', '_Lamb', '[0/90/0/90]s'),
'0.90.0.90.s-90': ('[0-90-0-90]s/', '90', '_Lamb', '[90/0/90/0]s'),
}
# find if one of the data_types is in data_dir
for data_type in data_type_map.keys():
if data_type in data_dir:
return data_type_map[data_type]