本文整理汇总了Python中stingray.powerspectrum.classical_pvalue函数的典型用法代码示例。如果您正苦于以下问题:Python classical_pvalue函数的具体用法?Python classical_pvalue怎么用?Python classical_pvalue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了classical_pvalue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_pvalue_decreases_with_increasing_power
def test_pvalue_decreases_with_increasing_power(self):
power1 = 2.0
power2 = 20.0
nspec = 1.0
pval1 = classical_pvalue(power1, nspec)
pval2 = classical_pvalue(power2, nspec)
assert pval1 - pval2 > 0.0
示例2: test_pvalue_must_decrease_with_increasing_nspec
def test_pvalue_must_decrease_with_increasing_nspec(self):
power = 3.0
nspec1 = 1.0
nspec2 = 10.0
pval1 = classical_pvalue(power, nspec1)
pval2 = classical_pvalue(power, nspec2)
assert pval1 - pval2 > 0.0
示例3: test_nspec_is_an_integer_number
def test_nspec_is_an_integer_number(self):
power = 2.0
nspec = 2.5
with pytest.raises(ValueError):
classical_pvalue(power, nspec)
示例4: test_nspec_is_nonzero
def test_nspec_is_nonzero(self):
power = 2.0
nspec = 0.0
with pytest.raises(ValueError):
classical_pvalue(power, nspec)
示例5: test_nspec_is_positive
def test_nspec_is_positive(self):
power = 2.0
nspec = -1.0
with pytest.raises(ValueError):
classical_pvalue(power, nspec)
示例6: test_nspec_is_not_nan
def test_nspec_is_not_nan(self):
power = 2.0
nspec = np.nan
with pytest.raises(ValueError):
classical_pvalue(power, nspec)
示例7: test_nspec_is_not_infinite2
def test_nspec_is_not_infinite2(self):
power = 2.0
nspec = -np.inf
with pytest.raises(ValueError):
classical_pvalue(power, nspec)
示例8: test_power_is_non_nan
def test_power_is_non_nan(self):
power = np.nan
nspec = 1
classical_pvalue(power, nspec)
示例9: test_function_runs
def test_function_runs(self):
power = 2.0
nspec = 1.0
classical_pvalue(power, nspec)
示例10: test_nspec_is_an_integer_number
def test_nspec_is_an_integer_number(self):
power = 2.0
nspec = 2.5
classical_pvalue(power, nspec)
示例11: test_nspec_is_nonzero
def test_nspec_is_nonzero(self):
power = 2.0
nspec = 0.0
classical_pvalue(power, nspec)
示例12: test_nspec_is_positive
def test_nspec_is_positive(self):
power = 2.0
nspec = -1.0
classical_pvalue(power, nspec)
示例13: test_nspec_is_not_nan
def test_nspec_is_not_nan(self):
power = 2.0
nspec = np.nan
classical_pvalue(power, nspec)
示例14: test_nspec_is_not_infinite2
def test_nspec_is_not_infinite2(self):
power = 2.0
nspec = -np.inf
classical_pvalue(power, nspec)
示例15: test_power_is_positive
def test_power_is_positive(self):
power = -2.0
nspec = 1.0
classical_pvalue(power, nspec)