我在Python中搜索一个函数,它返回多锥度功率谱密度,如pmtm for Matlab (http://fr.mathworks.com/help/signal/ref/pmtm.html)
有人认识吗?我试着安装mtspec,但在Python 3上没有成功。还有其他选择吗?
谢谢
发布于 2015-10-27 10:33:35
使用pip安装它:
pip install spectrum
并使用类似于文档示例:
from spectrum import *
data = data_cosine(N=2048, A=0.1, sampling=1024, freq=200)
# If you already have the DPSS windows
[tapers, eigen] = dpss(2048, 2.5, 4)
res = pmtm(data, e=tapers, v=eigen, show=False)
# You do not need to compute the DPSS before end
res = pmtm(data, NW=2.5, show=False)
res = pmtm(data, NW=2.5, k=4, show=True)
https://stackoverflow.com/questions/33363622
复制相似问题