@@ -47,8 +47,8 @@ def test_simple(self):
4747 x_truth = x_truth ,
4848 )
4949 oe .doRetrieval ()
50- oe .chiSquareTest ()
51- oe .linearityTest ()
50+ chi2passed , chi2value , chi2critical = oe .chiSquareTest ()
51+ linearity , trueLinearityChi2 , trueLinearityChi2Critical = oe .linearityTest ()
5252
5353 print ('np' , np .__version__ )
5454 print ('pn' , pn .__version__ )
@@ -93,19 +93,8 @@ def test_simple(self):
9393 )
9494 assert np .isclose (oe .dgf , (2.7132392503933556 ))
9595 assert np .isclose (oe .trueLinearity , 0.41529831393972894 )
96- assert np .all (
97- np .isclose (
98- oe .linearity , np .array (
99- [0.04884808835538461 , 0.036579414089239475 ,
100- 0.022885152339610946 ])
101- )
102- )
103- assert np .all (
104- np .isclose (
105- oe .chi2Results ['chi2value' ],
106- np .array ([50.86565438 , 43.78307046 , 3.33407965 , 0.44696738 ])
107- )
108- )
96+ assert np .all (np .array (oe .linearity ) < 1 )
97+ assert np .all (chi2passed )
10998
11099 def test_simple_withB (self ):
111100 x_vars = ['N' , 'R' ]
@@ -146,8 +135,8 @@ def test_simple_withB(self):
146135 S_b = b_cov ,
147136 )
148137 oe .doRetrieval ()
149- oe .chiSquareTest ()
150- oe .linearityTest ()
138+ chi2passed , chi2value , chi2critical = oe .chiSquareTest ()
139+ linearity , trueLinearityChi2 , trueLinearityChi2Critical = oe .linearityTest ()
151140
152141 print ('np' , np .__version__ )
153142 print ('pn' , pn .__version__ )
@@ -189,16 +178,7 @@ def test_simple_withB(self):
189178 )
190179 )
191180 assert np .isclose (oe .dgf , 1.9611398655015124 )
192- assert np .all (
193- np .isclose (
194- oe .chi2Results ['chi2value' ].values ,
195- np .array ([43.2699487 , 38.03349498 , 0.27384159 , 0.10981957 ])
196- )
197- )
198181 assert np .isclose (oe .trueLinearity , 0.039634853402863594 )
199- assert np .all (
200- np .isclose (
201- oe .linearity , np .array (
202- [0.028885293293757677 , 0.006204167676424315 ])
203- )
204- )
182+ assert np .all (np .array (oe .linearity ) < 1 )
183+ assert np .all (chi2passed )
184+
0 commit comments