• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python signal.chebwin函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中scipy.signal.chebwin函数的典型用法代码示例。如果您正苦于以下问题:Python chebwin函数的具体用法?Python chebwin怎么用?Python chebwin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了chebwin函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_cheb_even_low_attenuation

 def test_cheb_even_low_attenuation(self):
     cheb_even_low_at_true = array([1.000000, 0.451924, 0.51027,
                                    0.541338, 0.541338, 0.51027,
                                    0.451924, 1.000000])
     with warnings.catch_warnings():
         warnings.simplefilter("ignore", UserWarning)
         cheb_even = signal.chebwin(8, at=-10)
     assert_array_almost_equal(cheb_even, cheb_even_low_at_true, decimal=4)
开发者ID:BitFoyle,项目名称:scipy,代码行数:8,代码来源:test_windows.py


示例2: test_cheb_even_low_attenuation

 def test_cheb_even_low_attenuation(self):
     cheb_even_low_at_true = array([1.000000, 0.451924, 0.51027,
                                    0.541338, 0.541338, 0.51027,
                                    0.451924, 1.000000])
     with suppress_warnings() as sup:
         sup.filter(UserWarning, "This window is not suitable")
         cheb_even = signal.chebwin(8, at=-10)
     assert_array_almost_equal(cheb_even, cheb_even_low_at_true, decimal=4)
开发者ID:alpaco42,项目名称:ML_Spring_2018,代码行数:8,代码来源:test_windows.py


示例3: test_cheb_odd_low_attenuation

 def test_cheb_odd_low_attenuation(self):
     cheb_odd_low_at_true = array([1.000000, 0.519052, 0.586405,
                                   0.610151, 0.586405, 0.519052,
                                   1.000000])
     with warnings.catch_warnings():
         warnings.simplefilter("ignore", UserWarning)
         cheb_odd = signal.chebwin(7, at=-10)
     assert_array_almost_equal(cheb_odd, cheb_odd_low_at_true, decimal=4)
开发者ID:BitFoyle,项目名称:scipy,代码行数:8,代码来源:test_windows.py


示例4: test_cheb_odd_low_attenuation

 def test_cheb_odd_low_attenuation(self):
     cheb_odd_low_at_true = array([1.000000, 0.519052, 0.586405,
                                   0.610151, 0.586405, 0.519052,
                                   1.000000])
     with suppress_warnings() as sup:
         sup.filter(UserWarning, "This window is not suitable")
         cheb_odd = signal.chebwin(7, at=10)
     assert_array_almost_equal(cheb_odd, cheb_odd_low_at_true, decimal=4)
开发者ID:alpaco42,项目名称:ML_Spring_2018,代码行数:8,代码来源:test_windows.py


示例5: test_basic

 def test_basic(self):
     assert_allclose(signal.chebwin(6, 100),
                     [0.1046401879356917, 0.5075781475823447, 1.0, 1.0,
                      0.5075781475823447, 0.1046401879356917])
     assert_allclose(signal.chebwin(7, 100),
                     [0.05650405062850233, 0.316608530648474,
                      0.7601208123539079, 1.0, 0.7601208123539079,
                      0.316608530648474, 0.05650405062850233])
     assert_allclose(signal.chebwin(6, 10),
                     [1.0, 0.6071201674458373, 0.6808391469897297,
                      0.6808391469897297, 0.6071201674458373, 1.0])
     assert_allclose(signal.chebwin(7, 10),
                     [1.0, 0.5190521247588651, 0.5864059018130382,
                      0.6101519801307441, 0.5864059018130382,
                      0.5190521247588651, 1.0])
     assert_allclose(signal.chebwin(6, 10, False),
                     [1.0, 0.5190521247588651, 0.5864059018130382,
                      0.6101519801307441, 0.5864059018130382,
                      0.5190521247588651])
开发者ID:chris-b1,项目名称:scipy,代码行数:19,代码来源:test_windows.py


示例6: test_basic

 def test_basic(self):
     with suppress_warnings() as sup:
         sup.filter(UserWarning, "This window is not suitable")
         assert_allclose(signal.chebwin(6, 100),
                         [0.1046401879356917, 0.5075781475823447, 1.0, 1.0,
                          0.5075781475823447, 0.1046401879356917])
         assert_allclose(signal.chebwin(7, 100),
                         [0.05650405062850233, 0.316608530648474,
                          0.7601208123539079, 1.0, 0.7601208123539079,
                          0.316608530648474, 0.05650405062850233])
         assert_allclose(signal.chebwin(6, 10),
                         [1.0, 0.6071201674458373, 0.6808391469897297,
                          0.6808391469897297, 0.6071201674458373, 1.0])
         assert_allclose(signal.chebwin(7, 10),
                         [1.0, 0.5190521247588651, 0.5864059018130382,
                          0.6101519801307441, 0.5864059018130382,
                          0.5190521247588651, 1.0])
         assert_allclose(signal.chebwin(6, 10, False),
                         [1.0, 0.5190521247588651, 0.5864059018130382,
                          0.6101519801307441, 0.5864059018130382,
                          0.5190521247588651])
开发者ID:alpaco42,项目名称:ML_Spring_2018,代码行数:21,代码来源:test_windows.py


示例7: test_cheb_odd

    def test_cheb_odd(self):
        cheb_odd_true = array([0.200938, 0.107729, 0.134941, 0.165348,
                               0.198891, 0.235450, 0.274846, 0.316836,
                               0.361119, 0.407338, 0.455079, 0.503883,
                               0.553248, 0.602637, 0.651489, 0.699227,
                               0.745266, 0.789028, 0.829947, 0.867485,
                               0.901138, 0.930448, 0.955010, 0.974482,
                               0.988591, 0.997138, 1.000000, 0.997138,
                               0.988591, 0.974482, 0.955010, 0.930448,
                               0.901138, 0.867485, 0.829947, 0.789028,
                               0.745266, 0.699227, 0.651489, 0.602637,
                               0.553248, 0.503883, 0.455079, 0.407338,
                               0.361119, 0.316836, 0.274846, 0.235450,
                               0.198891, 0.165348, 0.134941, 0.107729,
                               0.200938])

        cheb_odd = signal.chebwin(53, at=-40)
        assert_array_almost_equal(cheb_odd, cheb_odd_true, decimal=4)
开发者ID:mullens,项目名称:khk-lights,代码行数:18,代码来源:test_signaltools.py


示例8: test_cheb_even

    def test_cheb_even(self):
        cheb_even_true = array([0.203894, 0.107279, 0.133904,
                                0.163608, 0.196338, 0.231986,
                                0.270385, 0.311313, 0.354493,
                                0.399594, 0.446233, 0.493983,
                                0.542378, 0.590916, 0.639071,
                                0.686302, 0.732055, 0.775783,
                                0.816944, 0.855021, 0.889525,
                                0.920006, 0.946060, 0.967339,
                                0.983557, 0.994494, 1.000000,
                                1.000000, 0.994494, 0.983557,
                                0.967339, 0.946060, 0.920006,
                                0.889525, 0.855021, 0.816944,
                                0.775783, 0.732055, 0.686302,
                                0.639071, 0.590916, 0.542378,
                                0.493983, 0.446233, 0.399594,
                                0.354493, 0.311313, 0.270385,
                                0.231986, 0.196338, 0.163608,
                                0.133904, 0.107279, 0.203894])

        cheb_even = signal.chebwin(54, at=-40)
        assert_array_almost_equal(cheb_even, cheb_even_true, decimal=4)
开发者ID:mullens,项目名称:khk-lights,代码行数:22,代码来源:test_signaltools.py


示例9: test_cheb_even_low_attenuation

 def test_cheb_even_low_attenuation(self):
     cheb_even_low_at_true = array([1.000000, 0.451924, 0.51027,
                                    0.541338, 0.541338, 0.51027,
                                    0.451924, 1.000000])
     cheb_even = signal.chebwin(8, at=-10)
     assert_array_almost_equal(cheb_even, cheb_even_low_at_true, decimal=4)
开发者ID:ai-karanam,项目名称:scipy,代码行数:6,代码来源:test_windows.py


示例10: test_cheb_odd_low_attenuation

 def test_cheb_odd_low_attenuation(self):
     cheb_odd_low_at_true = array([1.000000, 0.519052, 0.586405,
                                   0.610151, 0.586405, 0.519052,
                                   1.000000])
     cheb_odd = signal.chebwin(7, at=-10)
     assert_array_almost_equal(cheb_odd, cheb_odd_low_at_true, decimal=4)
开发者ID:ai-karanam,项目名称:scipy,代码行数:6,代码来源:test_windows.py


示例11: test_cheb_even_high_attenuation

 def test_cheb_even_high_attenuation(self):
     cheb_even = signal.chebwin(54, at=-40)
     assert_array_almost_equal(cheb_even, cheb_even_true, decimal=4)
开发者ID:ai-karanam,项目名称:scipy,代码行数:3,代码来源:test_windows.py


示例12: test_cheb_odd_high_attenuation

 def test_cheb_odd_high_attenuation(self):
     cheb_odd = signal.chebwin(53, at=-40)
     assert_array_almost_equal(cheb_odd, cheb_odd_true, decimal=4)
开发者ID:ai-karanam,项目名称:scipy,代码行数:3,代码来源:test_windows.py


示例13: test_cheb_even_high_attenuation

 def test_cheb_even_high_attenuation(self):
     with warnings.catch_warnings():
         warnings.simplefilter("ignore", UserWarning)
         cheb_even = signal.chebwin(54, at=-40)
     assert_array_almost_equal(cheb_even, cheb_even_true, decimal=4)
开发者ID:BitFoyle,项目名称:scipy,代码行数:5,代码来源:test_windows.py


示例14: window

# Plot the window and its frequency response:

from scipy import signal
from scipy.fftpack import fft, fftshift
import matplotlib.pyplot as plt

window = signal.chebwin(51, at=100)
plt.plot(window)
plt.title("Dolph-Chebyshev window (100 dB)")
plt.ylabel("Amplitude")
plt.xlabel("Sample")

plt.figure()
A = fft(window, 2048) / (len(window)/2.0)
freq = np.linspace(-0.5, 0.5, len(A))
response = 20 * np.log10(np.abs(fftshift(A / abs(A).max())))
plt.plot(freq, response)
plt.axis([-0.5, 0.5, -120, 0])
plt.title("Frequency response of the Dolph-Chebyshev window (100 dB)")
plt.ylabel("Normalized magnitude [dB]")
plt.xlabel("Normalized frequency [cycles per sample]")
开发者ID:ethanluoyc,项目名称:Dash-Docset,代码行数:21,代码来源:scipy-signal-chebwin-1.py


示例15: test_cheb_even_high_attenuation

 def test_cheb_even_high_attenuation(self):
     with suppress_warnings() as sup:
         sup.filter(UserWarning, "This window is not suitable")
         cheb_even = signal.chebwin(54, at=40)
     assert_array_almost_equal(cheb_even, cheb_even_true, decimal=4)
开发者ID:alpaco42,项目名称:ML_Spring_2018,代码行数:5,代码来源:test_windows.py


示例16: str

cmdstring = cmdstring + " -p " + str(radioConfig.tunerOffsetPPM)

if radioConfig.cropPercentage > 0:
    cmdstring = cmdstring + " -x " + str(radioConfig.cropPercentage)

cmdstring = cmdstring + " -e " + datagathduration
cmdstring = cmdstring + " -q"

if radioConfig.linearPower:
    cmdstring = cmdstring + " -l"

if radioConfig.fftWindow != "":
    if radioConfig.fftWindow == "BlacHarr":
        window = signal.blackmanharris(freqbins)
    elif radioConfig.fftWindow == "DolpCheb":
        window = signal.chebwin(freqbins, at=80)
    elif radioConfig.fftWindow == "FlatTop":
        window = signal.flattop(freqbins)

    file = open("window.txt","w")
    for wparm in window:
        file.write('{0:.12f}\n'.format(wparm))
    file.close() 
    cmdstring = cmdstring + " -w window.txt"

if radioConfig.sessionDurationMin == 0:
    loopForever = True
else:
    loopForever = False

numscans = radioConfig.sessionDurationMin / radioConfig.dataGatheringDurationMin
开发者ID:mariocannistra,项目名称:radio-astronomy-fftw,代码行数:31,代码来源:doscanw.py



注:本文中的scipy.signal.chebwin函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python signal.cheby1函数代码示例发布时间:2022-05-27
下一篇:
Python signal.c2d函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap