优化代码,注释掉不必要的计算,新增数据切割时的打印信息,调整信号时长计算逻辑
This commit is contained in:
@ -1353,7 +1353,7 @@ class Data:
|
||||
# 计算互相关1/2
|
||||
try:
|
||||
# 计算因子
|
||||
MULTIPLE_FACTOER = Params.APPROXIMATELY_ALIGN_CONFIG_NEW_CONTENT["Multiple_Factor"]
|
||||
# MULTIPLE_FACTOER = Params.APPROXIMATELY_ALIGN_CONFIG_NEW_CONTENT["Multiple_Factor"]
|
||||
a = self.processed_downsample_Tho[
|
||||
Config["PSGConfig"]["PreCut"]:len(self.processed_downsample_Tho) - Config["PSGConfig"][
|
||||
"PostCut"]].copy()
|
||||
@ -1365,7 +1365,7 @@ class Data:
|
||||
# a = a.astype(int64)
|
||||
# v = v.astype(int64)
|
||||
tho_relate = correlate(a, v, mode='full')
|
||||
tho_relate = tho_relate / (MULTIPLE_FACTOER ** 2)
|
||||
# tho_relate = tho_relate / (MULTIPLE_FACTOER ** 2)
|
||||
tho_relate2 = - tho_relate
|
||||
|
||||
result = {"tho_relate": tho_relate, "tho_relate2": tho_relate2}
|
||||
|
||||
Reference in New Issue
Block a user