-
Notifications
You must be signed in to change notification settings - Fork 2
/
constants.py
59 lines (50 loc) · 1.79 KB
/
constants.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
import os
# SI units
DT = 1E-4 # sec
RESISTANCE_LIF = 15e8 # ohm
CAPACITANCE_LIF = 1e-11 # F
VOLTAGE_THRESHOLD_LIF = 30e-3 # V
# Time window for static phase
STATIC_START = 2.
STATIC_END = 4.5
FS = int(1 / DT)
# Target COV for SAI, from Wellnitz et al., 0.78 ± 0.09
COV = .78
# Total fiber number
fiber_mech_fname = '2012042702V_01.mat'
fiber_hmstss_fname = '2012042702V_01.mat'
def get_fiber_tot_num():
fiber_dict = {}
fiber_tot_num = 0
for fname in os.listdir('./cleandata/rawData/finalSAI'):
if fname.endswith('.mat'):
fiber_dict[fiber_tot_num] = fname
fiber_tot_num += 1
if fname == fiber_mech_fname:
fiber_mech_id = fiber_tot_num - 1
if fname == fiber_hmstss_fname:
fiber_hmstss_id = fiber_tot_num - 1
return fiber_tot_num, fiber_mech_id, fiber_hmstss_id, fiber_dict
FIBER_TOT_NUM, FIBER_MECH_ID, FIBER_HMSTSS_ID, FIBER_DICT = get_fiber_tot_num()
# FIBER_FIT_ID_LIST = [FIBER_MECH_ID]
FIBER_FIT_ID_LIST = range(FIBER_TOT_NUM)
# Add the LIF parameters to each fiber by file name
FIBER_RCV = {}
for key in FIBER_DICT:
if FIBER_DICT[key] == '2012030905V_01.mat':
FIBER_RCV[key] = {
'r': 55e8, 'c': CAPACITANCE_LIF, 'v': VOLTAGE_THRESHOLD_LIF}
elif FIBER_DICT[key] == '2012042001V_01.mat':
FIBER_RCV[key] = {
'r': 70e8, 'c': CAPACITANCE_LIF, 'v': VOLTAGE_THRESHOLD_LIF}
elif FIBER_DICT[key] == '2012042702V_01.mat':
FIBER_RCV[key] = {
'r': 15e8, 'c': CAPACITANCE_LIF, 'v': VOLTAGE_THRESHOLD_LIF}
# Plotting constants
MARKER_LIST = ['v', 'D', 'o', 's', '.', '*', '.', 'x', 'h', '+']
COLOR_LIST = ['k', 'r', 'g', 'b', 'c', 'm', 'y', 'r', 'g', 'b']
LS_LIST = ['-', '--', '-.', ':']
MS = 6
# Evalutation levels
EVAL_DISPL = 500 # in um
EVAL_FORCE = 6 # in mN