当前位置: 首页>>代码示例>>Python>>正文


Python mlab._spectral_helper方法代码示例

本文整理汇总了Python中matplotlib.mlab._spectral_helper方法的典型用法代码示例。如果您正苦于以下问题:Python mlab._spectral_helper方法的具体用法?Python mlab._spectral_helper怎么用?Python mlab._spectral_helper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.mlab的用法示例。


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

示例1: test_spectral_helper_raises_complex_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_complex_same_data(self):
        # test that mode 'complex' cannot be used if x is not y
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, y=self.y+1, mode='complex') 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例2: test_spectral_helper_raises_magnitude_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_magnitude_same_data(self):
        # test that mode 'magnitude' cannot be used if x is not y
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, y=self.y+1, mode='magnitude') 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例3: test_spectral_helper_raises_angle_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_angle_same_data(self):
        # test that mode 'angle' cannot be used if x is not y
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, y=self.y+1, mode='angle') 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例4: test_spectral_helper_raises_phase_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_phase_same_data(self):
        # test that mode 'phase' cannot be used if x is not y
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, y=self.y+1, mode='phase') 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例5: test_spectral_helper_raises_unknown_mode

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_unknown_mode(self):
        # test that unknown value for mode cannot be used
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, mode='spam') 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例6: test_spectral_helper_raises_noverlap_gt_NFFT

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_noverlap_gt_NFFT(self):
        # test that noverlap cannot be larger than NFFT
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, y=self.y, NFFT=10, noverlap=20) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例7: test_spectral_helper_raises_noverlap_eq_NFFT

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_noverlap_eq_NFFT(self):
        # test that noverlap cannot be equal to NFFT
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, NFFT=10, noverlap=10) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例8: test_spectral_helper_raises_winlen_ne_NFFT

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_winlen_ne_NFFT(self):
        # test that the window length cannot be different from NFFT
        assert_raises(ValueError, mlab._spectral_helper,
                      x=self.y, y=self.y, NFFT=10, window=np.ones(9)) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:6,代码来源:test_mlab.py

示例9: test_spectral_helper_psd

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_psd(self):
        freqs = self.freqs_density
        spec, fsp, t = mlab._spectral_helper(x=self.y, y=self.y,
                                             NFFT=self.NFFT_density,
                                             Fs=self.Fs,
                                             noverlap=self.nover_density,
                                             pad_to=self.pad_to_density,
                                             sides=self.sides,
                                             mode='psd')

        assert_allclose(fsp, freqs, atol=1e-06)
        assert_allclose(t, self.t_density, atol=1e-06)

        assert_equal(spec.shape[0], freqs.shape[0])
        assert_equal(spec.shape[1], self.t_specgram.shape[0]) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:17,代码来源:test_mlab.py

示例10: test_spectral_helper_magnitude_specgram

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_magnitude_specgram(self):
        freqs = self.freqs_specgram
        spec, fsp, t = mlab._spectral_helper(x=self.y, y=self.y,
                                             NFFT=self.NFFT_specgram,
                                             Fs=self.Fs,
                                             noverlap=self.nover_specgram,
                                             pad_to=self.pad_to_specgram,
                                             sides=self.sides,
                                             mode='magnitude')

        assert_allclose(fsp, freqs, atol=1e-06)
        assert_allclose(t, self.t_specgram, atol=1e-06)

        assert_equal(spec.shape[0], freqs.shape[0])
        assert_equal(spec.shape[1], self.t_specgram.shape[0]) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:17,代码来源:test_mlab.py

示例11: test_spectral_helper_raises_complex_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_complex_same_data(self):
        # test that mode 'complex' cannot be used if x is not y
        with pytest.raises(ValueError):
            mlab._spectral_helper(x=self.y, y=self.y+1, mode='complex') 
开发者ID:holzschu,项目名称:python3_ios,代码行数:6,代码来源:test_mlab.py

示例12: test_spectral_helper_raises_magnitude_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_magnitude_same_data(self):
        # test that mode 'magnitude' cannot be used if x is not y
        with pytest.raises(ValueError):
            mlab._spectral_helper(x=self.y, y=self.y+1, mode='magnitude') 
开发者ID:holzschu,项目名称:python3_ios,代码行数:6,代码来源:test_mlab.py

示例13: test_spectral_helper_raises_angle_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_angle_same_data(self):
        # test that mode 'angle' cannot be used if x is not y
        with pytest.raises(ValueError):
            mlab._spectral_helper(x=self.y, y=self.y+1, mode='angle') 
开发者ID:holzschu,项目名称:python3_ios,代码行数:6,代码来源:test_mlab.py

示例14: test_spectral_helper_raises_phase_same_data

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_phase_same_data(self):
        # test that mode 'phase' cannot be used if x is not y
        with pytest.raises(ValueError):
            mlab._spectral_helper(x=self.y, y=self.y+1, mode='phase') 
开发者ID:holzschu,项目名称:python3_ios,代码行数:6,代码来源:test_mlab.py

示例15: test_spectral_helper_raises_unknown_mode

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import _spectral_helper [as 别名]
def test_spectral_helper_raises_unknown_mode(self):
        # test that unknown value for mode cannot be used
        with pytest.raises(ValueError):
            mlab._spectral_helper(x=self.y, mode='spam') 
开发者ID:holzschu,项目名称:python3_ios,代码行数:6,代码来源:test_mlab.py


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