Skip to content

Commit

Permalink
fix bug of window switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Sg4Dylan committed Feb 19, 2017
1 parent f0f78bb commit 3a4c509
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions EmiyaEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ def ProcessCore(self):
_TempSignal = np.append(_TempSignal, [0])
SuffixLength += 1
# 执行FFT运算, 单边谱用于分析, 双边谱用于处理
if self.AnalysisWindow:
_TempSignal *= scipy.signal.hann(_FFTPointCount, sym=0)
_MidFFTResultDouble = np.fft.fft(
_TempSignal, _FFTPointCount) / (_FFTPointCount)
if self.AnalysisWindow:
_TempSignal *= scipy.signal.hann(_FFTPointCount, sym=0)
_MidFFTResultSingle = np.fft.fft(
_TempSignal, _FFTPointCount) / (_FFTPointCount / 2)
# 获取当前分段最大振幅, 处理阈值点
Expand Down
2 changes: 1 addition & 1 deletion GUI_EmiyaEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ def run(self):
_TempSignal = np.append(_TempSignal, [0])
SuffixLength += 1
# 执行FFT运算, 单边谱用于分析, 双边谱用于处理
_MidFFTResultDouble = np.fft.fft(_TempSignal, _FFTPointCount) / (_FFTPointCount)
if self.AnalysisWindow:
_TempSignal *= scipy.signal.hann(_FFTPointCount, sym=0)
_MidFFTResultDouble = np.fft.fft(_TempSignal, _FFTPointCount) / (_FFTPointCount)
_MidFFTResultSingle = np.fft.fft(_TempSignal, _FFTPointCount) / (_FFTPointCount / 2)
# 获取当前分段最大振幅, 处理阈值点
_MidBaseFreqAmp, _MidThresholdPoint = self.MidFindThresholdPoint(_MidFFTResultSingle,
Expand Down

0 comments on commit 3a4c509

Please sign in to comment.