Skip to content

Commit c5c6b61

Browse files
committed
added small number stats correction module
1 parent 9a1286d commit c5c6b61

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

laspec/snstat.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import numpy as np
2+
3+
"""
4+
{'p_gauss_1': array([ 0.07349721, -0.60647022, 1.97806105, -3.22994084, 2.72007585,
5+
-0.92812989]),
6+
'p_gauss_2': array([ 0.08434813, -0.69694429, 2.28047526, -3.73821453, 3.15612997,
7+
-0.99158461]),
8+
'p_q': array([ 0.05712779, -0.47050592, 1.56888875, -2.75649024, 2.71900493,
9+
-0.28637106]),
10+
'p_std': array([ 0.08344418, -0.68630504, 2.21084202, -3.50529186, 2.77854093,
11+
0.08576048])}
12+
"""
13+
14+
15+
def eval_xi_1(n):
16+
""" convert to MAD """
17+
p = np.array([0.07349721, -0.60647022, 1.97806105, -3.22994084, 2.72007585, -0.92812989])
18+
return 10. ** np.polyval(p, np.log10(n))
19+
20+
21+
def eval_xi_2(n):
22+
""" convert to MAD """
23+
p = np.array([0.08434813, -0.69694429, 2.28047526, -3.73821453, 3.15612997, -0.99158461])
24+
return 10. ** np.polyval(p, np.log10(n))
25+
26+
27+
def eval_zeta_q(n):
28+
""" convert to std """
29+
p = np.array([0.05712779, -0.47050592, 1.56888875, -2.75649024, 2.71900493, -0.28637106])
30+
return np.polyval(p, np.log10(n))
31+
32+
33+
def eval_zeta_std(n):
34+
""" convert to std """
35+
p = np.array([0.08344418, -0.68630504, 2.21084202, -3.50529186, 2.77854093, 0.08576048])
36+
return np.polyval(p, np.log10(n))

0 commit comments

Comments
 (0)