1- import pytest
21import numpy as np
32
43import sys
@@ -449,7 +448,6 @@ def test_2_group_cases():
449448 """
450449 # XXX JP-3121: Still needs work
451450 base_group = [- 12328.601 , - 4289.051 ]
452- base_err = [0.0 , 0.0 ]
453451 gain_val = 0.9699
454452 rnoise_val = 9.4552
455453
@@ -511,7 +509,7 @@ def test_2_group_cases():
511509 check = np .array ([[551.0735 , np .nan , np .nan , np .nan , - 293.9943 , - 845.0678 , - 845.0677 ]])
512510 np .testing .assert_allclose (data , check , tol )
513511
514- check = np .array ([[GOOD , DNU | SAT , DNU | SAT , DNU , GOOD , GOOD , GOOD ]])
512+ check = np .array ([[GOOD , DNU | SAT , DNU | SAT , DNU | SAT , GOOD , GOOD , SAT ]])
515513 # np.testing.assert_allclose(dq, check, tol) # XXX double
516514
517515 check = np .array ([[38.945766 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ]])
@@ -597,7 +595,7 @@ def test_one_group_ramp_suppressed_one_integration():
597595 check = np .array ([[np .nan , np .nan , 1.0000001 ]])
598596 np .testing .assert_allclose (sdata , check , tol )
599597
600- check = np .array ([[DNU | SAT , DNU , GOOD ]])
598+ check = np .array ([[DNU | SAT , DNU | SAT , GOOD ]])
601599 # np.testing.assert_allclose(sdq, check, tol) # XXX double
602600
603601 check = np .array ([[0.0 , 0.0 , 0.25 ]])
@@ -615,7 +613,7 @@ def test_one_group_ramp_suppressed_one_integration():
615613 check = np .array ([[[np .nan , np .nan , 1.0000001 ]]])
616614 np .testing .assert_allclose (cdata , check , tol )
617615
618- check = np .array ([[[DNU | SAT , DNU , GOOD ]]])
616+ check = np .array ([[[DNU | SAT , DNU | SAT , GOOD ]]])
619617 # np.testing.assert_allclose(cdq, check, tol) # XXX double
620618
621619 check = np .array ([[[0.0 , 0.0 , 0.25 ]]])
@@ -642,7 +640,7 @@ def test_one_group_ramp_not_suppressed_one_integration():
642640 check = np .array ([[np .nan , 1.0 , 1.0000001 ]])
643641 np .testing .assert_allclose (sdata , check , tol )
644642
645- check = np .array ([[DNU | SAT , GOOD , GOOD ]])
643+ check = np .array ([[DNU | SAT , SAT , GOOD ]])
646644 # np.testing.assert_allclose(sdq, check, tol) # XXX double
647645
648646 check = np .array ([[0.0 , 1.0 , 0.25 ]])
@@ -660,7 +658,7 @@ def test_one_group_ramp_not_suppressed_one_integration():
660658 check = np .array ([[[np .nan , 1.0 , 1.0000001 ]]])
661659 np .testing .assert_allclose (cdata , check , tol )
662660
663- check = np .array ([[[DNU | SAT , GOOD , GOOD ]]])
661+ check = np .array ([[[DNU | SAT , SAT , GOOD ]]])
664662 # np.testing.assert_allclose(cdq, check, tol) # XXX double
665663
666664 check = np .array ([[[0.0 , 1 , 0.25 ]]])
@@ -688,7 +686,7 @@ def test_one_group_ramp_suppressed_two_integrations():
688686 check = np .array ([[1.0000001 , 1.0000001 , 1.0000001 ]])
689687 np .testing .assert_allclose (sdata , check , tol )
690688
691- check = np .array ([[GOOD , GOOD , GOOD ]])
689+ check = np .array ([[SAT , SAT , GOOD ]])
692690 np .testing .assert_allclose (sdq , check , tol )
693691
694692 check = np .array ([[0.125 , 0.125 , 0.125 ]])
@@ -706,7 +704,7 @@ def test_one_group_ramp_suppressed_two_integrations():
706704 check = np .array ([[[np .nan , np .nan , 1.0000001 ]], [[1.0000001 , 1.0000001 , 1.0000001 ]]])
707705 np .testing .assert_allclose (cdata , check , tol )
708706
709- check = np .array ([[[DNU | SAT , DNU , GOOD ]], [[GOOD , GOOD , GOOD ]]])
707+ check = np .array ([[[DNU | SAT , DNU | SAT , GOOD ]], [[GOOD , GOOD , GOOD ]]])
710708 # np.testing.assert_allclose(cdq, check, tol) # XXX double
711709
712710 check = np .array ([[[0.0 , 0.0 , 0.25 ]], [[0.125 , 0.125 , 0.25 ]]])
@@ -734,7 +732,7 @@ def test_one_group_ramp_not_suppressed_two_integrations():
734732 check = np .array ([[1.0000001 , 1.0000001 , 1.0000001 ]])
735733 np .testing .assert_allclose (sdata , check , tol )
736734
737- check = np .array ([[GOOD , GOOD , GOOD ]])
735+ check = np .array ([[SAT , SAT , GOOD ]])
738736 np .testing .assert_allclose (sdq , check , tol )
739737
740738 check = np .array ([[0.125 , 0.2 , 0.125 ]])
@@ -752,7 +750,7 @@ def test_one_group_ramp_not_suppressed_two_integrations():
752750 check = np .array ([[[np .nan , 1.0 , 1.0000001 ]], [[1.0000001 , 1.0000001 , 1.0000001 ]]])
753751 np .testing .assert_allclose (cdata , check , tol )
754752
755- check = np .array ([[[DNU | SAT , GOOD , GOOD ]], [[GOOD , GOOD , GOOD ]]])
753+ check = np .array ([[[DNU | SAT , SAT , GOOD ]], [[GOOD , GOOD , GOOD ]]])
756754 # np.testing.assert_allclose(cdq, check, tol) # XXX double
757755
758756 check = np .array ([[[0.0 , 1.0 , 0.25 ]], [[0.125 , 0.25 , 0.25 ]]])
@@ -866,7 +864,7 @@ def test_zeroframe():
866864 check = np .array ([[48.965397 , 18.628912 , 47.863224 ]])
867865 np .testing .assert_allclose (sdata , check , tol , tol )
868866
869- check = np .array ([[GOOD , GOOD , GOOD ]])
867+ check = np .array ([[SAT , SAT , SAT ]])
870868 np .testing .assert_allclose (sdq , check , tol , tol )
871869
872870 check = np .array ([[0.13110262 , 0.00867591 , 0.29745975 ]])
@@ -887,7 +885,7 @@ def test_zeroframe():
887885 check = np .array ([[[298.0626 , np .nan , 652.01196 ]], [[18.62891 , 18.62891 , 18.62891 ]]])
888886 np .testing .assert_allclose (cdata , check , tol , tol )
889887
890- check = np .array ([[[GOOD , DNU | SAT , GOOD ]], [[GOOD , GOOD , GOOD ]]])
888+ check = np .array ([[[SAT , DNU | SAT , SAT ]], [[GOOD , GOOD , GOOD ]]])
891889 # np.testing.assert_allclose(cdq, check, tol, tol) # XXX double
892890
893891 check = np .array ([[[1.1799237 , 0.0 , 6.246655 ]], [[0.14749046 , 0.00867591 , 0.31233275 ]]])
@@ -1463,7 +1461,7 @@ def test_one_group():
14631461 sdata , sdq , svp , svr , serr = slopes
14641462
14651463 # XXX JP-3121: this is the value from python, which may not be correct
1466- chk_data = 1.9618962
1464+ chk_data = 1.9618962
14671465 chk_dq = 0
14681466 chk_var_p = 0.02923839
14691467 chk_var_r = 0.03470363
0 commit comments