我得到一个显示相对形状的信号,即局部最大值实际上是0,局部最小值是真实的失真。
我设法恢复了一些接近原始信号的结果,但是结果变得不可区分,因为我以不可区分的方式将其分解为幅度和频率取决于(x)的余弦函数。
我的问题是我可以通过一种简单的方式强制我的信号变得与众不同吗?
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
train_fit = pd.read_csv('train_fit.csv')
fig,ax = plt.subplots(figsize=(24,9))
ax.fill_between(train_fit['x'],train_fit['H_A'],-train_fit['H_A'],alpha=.1)
#ax.plot(train_0['x'],train_0['H']) #the orignal signal
ax.plot(train_fit['x'],train_fit['H_fit'])
ax.plot(train_fit['x'],train_fit['H_fit_adj'])
ax.axhline(0,color='k',linestyle=':')
ax.legend(loc='upper left')
ax2 = ax.twinx()
ax2.plot(train_fit['x'],train_fit['H_f'],color='gray',alpha=.5)
ax2.legend(loc='upper right')
plt.show()
示例数据在这里:https://pastebin.com/ViwUDTx8