gen_mod.py : updates through 3-6-17
This commit is contained in:
parent
420361d6f3
commit
0a0f8c78b8
@ -585,6 +585,24 @@ def mod_range( presetL, var, val00, val01, val10, val11 ):
|
|||||||
psL[1][var] = v1L[i]
|
psL[1][var] = v1L[i]
|
||||||
|
|
||||||
|
|
||||||
|
def mod_discrete_range( presetL, var, v0L, v1L ):
|
||||||
|
|
||||||
|
assert( len(v0L) == len(v1L) )
|
||||||
|
|
||||||
|
N = min(len(v0L),len(presetL))
|
||||||
|
|
||||||
|
|
||||||
|
for i in range(N):
|
||||||
|
preset = presetL[i]
|
||||||
|
label = preset.keys()[0]
|
||||||
|
psL = preset[label]
|
||||||
|
|
||||||
|
print "%i %s %f %f" % (i,label,v0L[i],v1L[i])
|
||||||
|
|
||||||
|
psL[0][var] = v0L[i]
|
||||||
|
psL[1][var] = v1L[i]
|
||||||
|
|
||||||
|
return N
|
||||||
|
|
||||||
def print_preset( presetL ):
|
def print_preset( presetL ):
|
||||||
|
|
||||||
@ -626,6 +644,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# assign a sequential range of thresholds to each preset
|
# assign a sequential range of thresholds to each preset
|
||||||
if 0: # 12/28/16
|
if 0: # 12/28/16
|
||||||
|
|
||||||
mod_range( presetL, "thr", 50.0, 90.0, 55.0, 95.0 )
|
mod_range( presetL, "thr", 50.0, 90.0, 55.0, 95.0 )
|
||||||
mod_range( presetL, "cigain", 6.0, 12.0, 6.0, 12.0 )
|
mod_range( presetL, "cigain", 6.0, 12.0, 6.0, 12.0 )
|
||||||
mod_range( presetL, "upr", 2.5, -5.0, 2.3, -5.2)
|
mod_range( presetL, "upr", 2.5, -5.0, 2.3, -5.2)
|
||||||
@ -648,30 +667,45 @@ if __name__ == "__main__":
|
|||||||
#mod_range( presetL, "upr", 2.5, -5.0, 2.3, -5.2)
|
#mod_range( presetL, "upr", 2.5, -5.0, 2.3, -5.2)
|
||||||
#mod_range( presetL, "lwr", 0.5, 2.0, 0.5, 2.0)
|
#mod_range( presetL, "lwr", 0.5, 2.0, 0.5, 2.0)
|
||||||
|
|
||||||
if 0: # 1/14/17
|
if 1: # 1/14/17
|
||||||
|
|
||||||
seq1L =[
|
seq1L =[
|
||||||
(778, None) # meas 50
|
(778, None) # meas 50
|
||||||
]
|
]
|
||||||
|
|
||||||
presetL = dupl_preset( dfltPresetL, "f_3", dfltLabelsL)
|
if 0:
|
||||||
|
presetL = dupl_preset( dfltPresetL, "f_3", dfltLabelsL)
|
||||||
|
|
||||||
# thr: (40 ok) - (71 0k) upr:-3.0 lwr:1.0 cigain:6.0 vetted trajectory for measure 50
|
# thr: (40 ok) - (71 0k) upr:-3.0 lwr:1.0 cigain:6.0 vetted trajectory for measure 50
|
||||||
|
|
||||||
mod_range( presetL, "thr", 40.0, 74.0, 40.0, 74.0 )
|
mod_range( presetL, "thr", 40.0, 71.0, 40.0, 71.0 )
|
||||||
#mod_range( presetL, "thr", 68.0, 68.0, 68.0, 68.0 )
|
#mod_range( presetL, "thr", 68.0, 68.0, 68.0, 68.0 )
|
||||||
#mod_range( presetL, "upr", -4.0, 0.0, -4.0, 0.0)
|
#mod_range( presetL, "upr", -4.0, 0.0, -4.0, 0.0)
|
||||||
mod_range( presetL, "upr", -3.0, -3.0, -3.0, -3.0)
|
mod_range( presetL, "upr", -3.0, -3.0, -3.0, -3.0)
|
||||||
mod_range( presetL, "lwr", 1.0, 1.0, 1.0, 1.0 )
|
mod_range( presetL, "lwr", 1.0, 1.0, 1.0, 1.0 )
|
||||||
mod_range( presetL, "cigain", 6.0, 6.0, 6.0, 6.0 )
|
mod_range( presetL, "cigain", 6.0, 6.0, 6.0, 6.0 )
|
||||||
|
|
||||||
|
else: # 3/6/17
|
||||||
|
|
||||||
|
presetL = dupl_preset( dfltPresetL, "g_1_a", dfltLabelsL)
|
||||||
|
|
||||||
|
mod_range( presetL, "thr", 20.0, 50.0, 20.0, 50.0 ) # offs:65 thr:20-50
|
||||||
|
mod_range( presetL, "off", 10.0, 80.0, 10.0, 80.0)
|
||||||
|
mod_range( presetL, "upr", -0.7, -0.2, -0.7, -0.2 )
|
||||||
|
mod_range( presetL, "lwr", 2.0, 2.0, 8.0, 4.0 )
|
||||||
|
|
||||||
|
mod_range( presetL, "cigain", 10.0, 14.0, 10.0, 14.0 )
|
||||||
|
|
||||||
|
|
||||||
if 0: # 1/14/17 and 1/28/17
|
if 0: # 1/14/17 and 1/28/17
|
||||||
|
|
||||||
seq1L =[
|
seq1L =[
|
||||||
(917, None) # meas 53
|
(917, None) # meas 53
|
||||||
|
#(1, None) # meas 1
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# 2/4/17 vetted for both meas 53 and meas 1
|
||||||
|
|
||||||
# make all presets identical to preset 'a'.
|
# make all presets identical to preset 'a'.
|
||||||
presetL = dupl_preset( dfltPresetL, "g_1_d", dfltLabelsL)
|
presetL = dupl_preset( dfltPresetL, "g_1_d", dfltLabelsL)
|
||||||
|
|
||||||
@ -679,10 +713,10 @@ if __name__ == "__main__":
|
|||||||
#mod_range( presetL, "off", 10.0, 80.0, 10.0, 80.0)
|
#mod_range( presetL, "off", 10.0, 80.0, 10.0, 80.0)
|
||||||
#mod_range( presetL, "off", 65.0, 65.0, 65.0, 65.0) # thr 34, offset should be > 50
|
#mod_range( presetL, "off", 65.0, 65.0, 65.0, 65.0) # thr 34, offset should be > 50
|
||||||
#mod_range( presetL, "off", 50.0, 80.0, 50.0, 80.0)
|
#mod_range( presetL, "off", 50.0, 80.0, 50.0, 80.0)
|
||||||
mod_range( presetL, "off", 80.0, 50.0, 80.0, 50.0)
|
mod_range( presetL, "off", 10.0, 80.0, 10.0, 80.0)
|
||||||
mod_range( presetL, "cigain", 14.0, 14.0, 14.0, 14.0 )
|
mod_range( presetL, "cigain", 14.0, 14.0, 14.0, 14.0 )
|
||||||
|
|
||||||
if 1: # 1/28/17
|
if 0: # 1/28/17
|
||||||
|
|
||||||
seq1L =[
|
seq1L =[
|
||||||
(917, None) # meas 53
|
(917, None) # meas 53
|
||||||
@ -696,6 +730,124 @@ if __name__ == "__main__":
|
|||||||
mod_range( presetL, "lwr", 4.0, 4.0, 4.0, 4.0) # vocal artifacts come in with lwr < 4
|
mod_range( presetL, "lwr", 4.0, 4.0, 4.0, 4.0) # vocal artifacts come in with lwr < 4
|
||||||
mod_range( presetL, "cigain", 3.0, 8.0, 3.0, 8.0 )
|
mod_range( presetL, "cigain", 3.0, 8.0, 3.0, 8.0 )
|
||||||
|
|
||||||
|
|
||||||
|
if 0: # 2/4/17
|
||||||
|
|
||||||
|
seq1L =[
|
||||||
|
(378, None), # meas 36
|
||||||
|
]
|
||||||
|
|
||||||
|
presetL = dupl_preset( dfltPresetL, "g_1_a", dfltLabelsL)
|
||||||
|
|
||||||
|
mod_range( presetL, "thr", 20.0, 50.0, 20.0, 50.0 ) # offs:65 thr:20-50
|
||||||
|
mod_range( presetL, "off", 10.0, 80.0, 10.0, 80.0)
|
||||||
|
mod_range( presetL, "upr", -0.7, -0.2, -0.7, -0.2 )
|
||||||
|
mod_range( presetL, "lwr", 2.0, 2.0, 8.0, 4.0 )
|
||||||
|
|
||||||
|
mod_range( presetL, "cigain", 10.0, 14.0, 10.0, 14.0 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if 0: # 2/4/17
|
||||||
|
|
||||||
|
seq1L =[
|
||||||
|
(378, "g_1_a"), # meas 36
|
||||||
|
(384, None),
|
||||||
|
]
|
||||||
|
|
||||||
|
presetL = dupl_preset( dfltPresetL, "f_4", dfltLabelsL)
|
||||||
|
|
||||||
|
mod_range( presetL, "thr", 70.0, 75.0, 70.0, 75.0 )
|
||||||
|
mod_range( presetL, "upr", -8.0, -4.0, -8.0, -4.0 )
|
||||||
|
mod_range( presetL, "lwr", 8.0, 1.0, 8.0, 1.0)
|
||||||
|
mod_range( presetL, "cigain", 10.0, 14.0, 10.0, 14.0 )
|
||||||
|
|
||||||
|
|
||||||
|
if 0:
|
||||||
|
|
||||||
|
seq1L =[
|
||||||
|
(1, None) # meas 1
|
||||||
|
]
|
||||||
|
|
||||||
|
# 2/4/17 vetted for both meas 53 and meas 1
|
||||||
|
|
||||||
|
# make all presets identical to preset 'a'.
|
||||||
|
presetL = dupl_preset( dfltPresetL, "g_1_d", dfltLabelsL)
|
||||||
|
|
||||||
|
print "preset len:",len(presetL)
|
||||||
|
|
||||||
|
w0L = [ 512, 512, 512, 512, 1024, 1024, 1024, 2048, 2048, 4096 ]
|
||||||
|
w1L = [ 512, 1024, 2048, 4096, 1024, 2048, 4096, 2048, 4096, 4096 ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
N = mod_discrete_range( presetL, "win", w0L, w1L )
|
||||||
|
|
||||||
|
presetL = presetL[0:N]
|
||||||
|
|
||||||
|
mod_range( presetL, "thr", 40.0, 40.0, 40.0, 40.0 ) # offs:65 thr:20-50
|
||||||
|
mod_range( presetL, "off", 55.0, 55.0, 55.0, 55.0)
|
||||||
|
mod_range( presetL, "cigain", 14.0, 14.0, 14.0, 14.0 )
|
||||||
|
|
||||||
|
|
||||||
|
if 0: # 3/6/17
|
||||||
|
|
||||||
|
seq1L =[
|
||||||
|
(1, None) # meas 1
|
||||||
|
]
|
||||||
|
|
||||||
|
presetL = dupl_preset( dfltPresetL, "g_1_d", dfltLabelsL)
|
||||||
|
|
||||||
|
mod_range( presetL, "thr", 20.0, 50.0, 20.0, 50.0 ) # offs:65 thr:20-50
|
||||||
|
mod_range( presetL, "off", 10.0, 80.0, 10.0, 80.0)
|
||||||
|
mod_range( presetL, "cigain", 14.0, 14.0, 14.0, 14.0 )
|
||||||
|
|
||||||
|
|
||||||
|
if 0: # 3/6/17
|
||||||
|
|
||||||
|
seq1L =[
|
||||||
|
(1, None) # meas 1
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
presetL = dupl_preset( dfltPresetL, "a", dfltLabelsL)
|
||||||
|
mod_range( presetL, "thr", 55.0, 65.0, 55.0, 65.0 )
|
||||||
|
mod_range( presetL, "upr", -1.0, -5.0, -1.0, -5.0 )
|
||||||
|
mod_range( presetL, "lwr", 2.0, 1.0, 2.0, 1.0 )
|
||||||
|
mod_range( presetL, "cigain", 6.0, 8.0, 6.0, 8.0 )
|
||||||
|
|
||||||
|
|
||||||
|
if 0: # 3/6/17
|
||||||
|
|
||||||
|
seq1L =[
|
||||||
|
#(1, None) # meas 38
|
||||||
|
(38, None)
|
||||||
|
]
|
||||||
|
|
||||||
|
presetL = dupl_preset( dfltPresetL, "f_4", dfltLabelsL)
|
||||||
|
|
||||||
|
"""
|
||||||
|
w0L = [ 512, 512, 512, 512, 1024, 1024, 1024, 2048, 2048, 4096 ]
|
||||||
|
w1L = [ 512, 1024, 2048, 4096, 1024, 2048, 4096, 2048, 4096, 4096 ]
|
||||||
|
|
||||||
|
N = mod_discrete_range( presetL, "win", w0L, w1L )
|
||||||
|
|
||||||
|
presetL = presetL[0:N]
|
||||||
|
"""
|
||||||
|
if 1:
|
||||||
|
mod_range( presetL, "thr", 55.0, 65.0, 55.0, 65.0 )
|
||||||
|
mod_range( presetL, "upr", -1.0, -5.0, -1.0, -5.0 )
|
||||||
|
mod_range( presetL, "lwr", 2.0, 1.0, 2.0, 1.0 )
|
||||||
|
mod_range( presetL, "cigain", 6.0, 8.0, 6.0, 8.0 )
|
||||||
|
else:
|
||||||
|
mod_range( presetL, "thr", 55.0, 75.0, 55.0, 75.0 )
|
||||||
|
mod_range( presetL, "upr", -8.0, -4.0, -8.0, -4.0 )
|
||||||
|
mod_range( presetL, "lwr", 8.0, 1.0, 8.0, 1.0)
|
||||||
|
mod_range( presetL, "cigain", 10.0, 14.0, 10.0, 14.0 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# thr upr lwr offs
|
# thr upr lwr offs
|
||||||
# 65 -0.05 1.5 0.0
|
# 65 -0.05 1.5 0.0
|
||||||
# 99.9
|
# 99.9
|
||||||
|
Loading…
Reference in New Issue
Block a user