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


Python Powerspectrum.classical_significances方法代码示例

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


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

示例1: test_classical_significances_trial_correction

# 需要导入模块: from stingray import Powerspectrum [as 别名]
# 或者: from stingray.Powerspectrum import classical_significances [as 别名]
 def test_classical_significances_trial_correction(self):
     ps = Powerspectrum(lc=self.lc, norm="leahy")
     # change the powers so that just one exceeds the threshold
     ps.power = np.zeros_like(ps.power) + 2.0
     index = 1
     ps.power[index] = 10.0
     threshold = 0.01
     pval = ps.classical_significances(threshold=threshold,
                                       trial_correction=True)
     assert np.size(pval) == 0
开发者ID:abigailStev,项目名称:stingray,代码行数:12,代码来源:test_powerspectrum.py

示例2: test_pvals_is_numpy_array

# 需要导入模块: from stingray import Powerspectrum [as 别名]
# 或者: from stingray.Powerspectrum import classical_significances [as 别名]
    def test_pvals_is_numpy_array(self):
        ps = Powerspectrum(lc=self.lc, norm="leahy")
        # change the powers so that just one exceeds the threshold
        ps.power = np.zeros_like(ps.power) + 2.0

        index = 1
        ps.power[index] = 10.0

        threshold = 1.0

        pval = ps.classical_significances(threshold=threshold,
                                          trial_correction=True)

        assert isinstance(pval, np.ndarray)
        assert pval.shape[0] == 2
开发者ID:abigailStev,项目名称:stingray,代码行数:17,代码来源:test_powerspectrum.py

示例3: test_classical_significances_threshold

# 需要导入模块: from stingray import Powerspectrum [as 别名]
# 或者: from stingray.Powerspectrum import classical_significances [as 别名]
    def test_classical_significances_threshold(self):
        ps = Powerspectrum(lc=self.lc, norm="leahy")

        # change the powers so that just one exceeds the threshold
        ps.ps = np.zeros(ps.ps.shape[0])+2.0

        index = 1
        ps.ps[index] = 10.0

        threshold = 0.01

        pval = ps.classical_significances(threshold=threshold,
                                          trial_correction=False)
        assert pval[0, 0] < threshold
        assert pval[1, 0] == index
开发者ID:AbhishekKumarSingh,项目名称:stingray,代码行数:17,代码来源:test_powerspectrum.py

示例4: test_classical_significances_fails_in_rms

# 需要导入模块: from stingray import Powerspectrum [as 别名]
# 或者: from stingray.Powerspectrum import classical_significances [as 别名]
 def test_classical_significances_fails_in_rms(self):
     ps = Powerspectrum(lc=self.lc, norm="frac")
     with pytest.raises(ValueError):
         ps.classical_significances()
开发者ID:abigailStev,项目名称:stingray,代码行数:6,代码来源:test_powerspectrum.py

示例5: test_classical_significances_runs

# 需要导入模块: from stingray import Powerspectrum [as 别名]
# 或者: from stingray.Powerspectrum import classical_significances [as 别名]
 def test_classical_significances_runs(self):
     ps = Powerspectrum(lc=self.lc, norm="Leahy")
     ps.classical_significances()
开发者ID:abigailStev,项目名称:stingray,代码行数:5,代码来源:test_powerspectrum.py

示例6: test_classical_significances_fails_in_rms

# 需要导入模块: from stingray import Powerspectrum [as 别名]
# 或者: from stingray.Powerspectrum import classical_significances [as 别名]
 def test_classical_significances_fails_in_rms(self):
     ps = Powerspectrum(lc=self.lc, norm="rms")
     ps.classical_significances()
开发者ID:AbhishekKumarSingh,项目名称:stingray,代码行数:5,代码来源:test_powerspectrum.py


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