|
5 | 5 |
|
6 | 6 | from stdatamodels.jwst.datamodels import RampModel, GainModel, ReadnoiseModel, dqflags |
7 | 7 |
|
| 8 | + |
8 | 9 | # |
9 | 10 | # The first 12 tests are for a single ramp in a single integration. The ramps |
10 | 11 | # have a variety of GROUPDQ vectors, with 1 or more segments in each ramp. The |
@@ -54,7 +55,7 @@ def test_pix_0(): |
54 | 55 | # Set truth values for OPTIONAL results: |
55 | 56 | # [slope, sigslope, var_poisson, var_rnoise, yint, sigyint, ped, weights] |
56 | 57 | o_true = [1.0117551, 4.874572, 0.0020202, 0.00647973, |
57 | | - 15.911023, 27.789335, 4.882449, 13841.038] |
| 58 | + 15.911023, 27.789335, 13.988245, 13841.038] |
58 | 59 |
|
59 | 60 | assert_pri(p_true, new_mod, 0) |
60 | 61 | assert_opt(o_true, opt_mod, 0) |
@@ -92,7 +93,7 @@ def test_pix_1(): |
92 | 93 |
|
93 | 94 | # Set truth values for OPTIONAL results: |
94 | 95 | o_true = [1.9, 56.870003, 0.03454545, 1.0691562, -3., 56.870003, |
95 | | - -3.999998, 0.82091206] |
| 96 | + 13.1, 0.82091206] |
96 | 97 |
|
97 | 98 | assert_pri(p_true, new_mod, 0) |
98 | 99 | assert_opt(o_true, opt_mod, 0) |
@@ -129,7 +130,7 @@ def test_pix_2(): |
129 | 130 | [0.26728904, 1.0691562, 1.0691562], # var_rnoise |
130 | 131 | [14.999998, 51., 15.], # yint |
131 | 132 | [36.709427, 56.870003, 56.870003], # sigyint |
132 | | - [6.5166273], # pedestal |
| 133 | + [14.151663], # pedestal |
133 | 134 | [13.091425, 0.84580624, 0.84580624], # weights |
134 | 135 | ] |
135 | 136 |
|
@@ -169,7 +170,7 @@ def test_pix_3(): |
169 | 170 | [0.01272805, 1.0691562], |
170 | 171 | [14.504965, 15.], |
171 | 172 | [27.842508, 56.870003], |
172 | | - [4.253134], |
| 173 | + [13.925313], |
173 | 174 | [4.2576841e+03, 8.458062e-01], |
174 | 175 | ] |
175 | 176 |
|
@@ -202,7 +203,7 @@ def test_pix_4(): |
202 | 203 | p_true = [1.5, GOOD, 1.047105, 0.02727273, 1.0691562] |
203 | 204 |
|
204 | 205 | # Set truth values for OPTIONAL results: |
205 | | - o_true = [1.5, 0., 0.02727273, 1.0691562, 0., 0., 0., 0.8318386] |
| 206 | + o_true = [1.5, 0., 0.02727273, 1.0691562, 0., 0., 13.5, 0.8318386] |
206 | 207 |
|
207 | 208 | assert_pri(p_true, new_mod, 0) |
208 | 209 | assert_opt(o_true, opt_mod, 0) |
@@ -241,7 +242,7 @@ def test_pix_5(): |
241 | 242 | [0.10691562, 0.03054732], |
242 | 243 | [13.537246, 2015.0737], |
243 | 244 | [35.301933, 67.10882], |
244 | | - [4.2391253], |
| 245 | + [13.923912], |
245 | 246 | [78.34764, 855.78046] |
246 | 247 | ] |
247 | 248 |
|
@@ -282,7 +283,7 @@ def test_pix_6(): |
282 | 283 | [1.0691562, 0.01909207], |
283 | 284 | [15., -143.2391], |
284 | 285 | [56.870003, 58.76999], |
285 | | - [-45.92052], |
| 286 | + [8.907948], |
286 | 287 | [8.4580624e-01, 2.0433204e+03] |
287 | 288 | ] |
288 | 289 |
|
@@ -315,7 +316,7 @@ def test_pix_7(): |
315 | 316 |
|
316 | 317 | # Set truth values for OPTIONAL results: |
317 | 318 | o_true = [1.0757396, 6.450687, 0.0025974, 0.01272805, 14.504951, |
318 | | - 27.842508, 4.2426033, 4257.684] |
| 319 | + 27.842508, 13.92426, 4257.684] |
319 | 320 |
|
320 | 321 | assert_pri(p_true, new_mod, 0) |
321 | 322 | assert_opt(o_true, opt_mod, 0) |
@@ -347,7 +348,7 @@ def test_pix_8(): |
347 | 348 |
|
348 | 349 | # Set truth values for OPTIONAL results: |
349 | 350 | o_true = [0.98561335, 9.920554, 0.00363636, 0.03054732, 16.508228, |
350 | | - 39.383667, 5.1438665, 855.78046] |
| 351 | + 39.383667, 14.014386, 855.78046] |
351 | 352 |
|
352 | 353 | assert_pri(p_true, new_mod, 0) |
353 | 354 | assert_opt(o_true, opt_mod, 0) |
@@ -385,7 +386,7 @@ def test_pix_9(): |
385 | 386 | [1.0691562, 0.05345781, 1.0691562], |
386 | 387 | [15., 20.119896, 15.], |
387 | 388 | [56.870003, 68.618195, 56.870003], |
388 | | - [5.000005], |
| 389 | + [14.], |
389 | 390 | [0.84580624, 297.23172, 0.84580624] |
390 | 391 | ] |
391 | 392 |
|
@@ -425,7 +426,7 @@ def test_pix_10(): |
425 | 426 | [1.0691562, 0.26728904, 0.05345781], |
426 | 427 | [15., 17.999956, 15.000029], |
427 | 428 | [56.870003, 88.40799, 93.73906], |
428 | | - [5.], |
| 429 | + [14.], |
429 | 430 | [0.84580624, 13.091425, 297.23172] |
430 | 431 | ] |
431 | 432 |
|
@@ -457,7 +458,7 @@ def test_pix_11(): |
457 | 458 | p_true = [1., GOOD, 1.042755, 0.01818182, 1.0691562] |
458 | 459 |
|
459 | 460 | # Set truth values for OPTIONAL results: |
460 | | - o_true = [1., 56.870003, 0.01818182, 1.0691562, 15., 56.870003, 5., |
| 461 | + o_true = [1., 56.870003, 0.01818182, 1.0691562, 15., 56.870003, 14., |
461 | 462 | 0.84580624] |
462 | 463 |
|
463 | 464 | assert_pri(p_true, new_mod, 0) |
@@ -498,7 +499,7 @@ def test_pix_12(): |
498 | 499 | # slope, sig_slope, var_p, var_r, yint, sig_yint, pedestal, weights |
499 | 500 | # slope = group1 / deltatime = 15 / 10 = 1.5 |
500 | 501 | # sig_slope, yint, sig_yint, and pedestal are all zero, because only 1 good group |
501 | | - o_true = [1.5, 0., 0.027273, 1.069156, 0., 0., 0., 0.831839] |
| 502 | + o_true = [1.5, 0., 0.027273, 1.069156, 0., 0., 13.5, 0.831839] |
502 | 503 |
|
503 | 504 | assert_pri(p_true, new_mod, 0) |
504 | 505 | assert_opt(o_true, opt_mod, 0) |
@@ -544,7 +545,7 @@ def test_miri_0(): |
544 | 545 |
|
545 | 546 | # Set truth values for OPTIONAL results: |
546 | 547 | o_true = [1.025854, 6.450687, 0.0025974, 0.01272805, 26.439266, 27.842508, |
547 | | - 14.74146, 4257.684] |
| 548 | + 23.974146, 4257.684] |
548 | 549 |
|
549 | 550 | assert_pri(p_true, new_mod, 0) |
550 | 551 | assert_opt(o_true, opt_mod, 0) |
@@ -576,7 +577,7 @@ def test_miri_1(): |
576 | 577 |
|
577 | 578 | # Set truth values for OPTIONAL results: |
578 | 579 | o_true = [1.1996487, 6.450687, 0.0025974, 0.01272805, 126.110214, |
579 | | - 27.842508, 113.00351, 4257.684] |
| 580 | + 27.842508, 123.800354, 4257.684] |
580 | 581 |
|
581 | 582 | assert_pri(p_true, new_mod, 0) |
582 | 583 | assert_opt(o_true, opt_mod, 0) |
@@ -608,7 +609,7 @@ def test_miri_2(): |
608 | 609 |
|
609 | 610 | # Set truth values for OPTIONAL results: |
610 | 611 | o_true = [1.025854, 6.450687, 0.0025974, 0.01272805, 26.439266, 27.842508, |
611 | | - 14.74146, 4257.684] |
| 612 | + 23.974146, 4257.684] |
612 | 613 |
|
613 | 614 | assert_pri(p_true, new_mod, 0) |
614 | 615 | assert_opt(o_true, opt_mod, 0) |
@@ -640,7 +641,7 @@ def test_miri_3(): |
640 | 641 |
|
641 | 642 | # Set truth values for OPTIONAL results: |
642 | 643 | o_true = [1.025854, 6.450687, 0.0025974, 0.01272805, 26.439266, |
643 | | - 27.842508, 14.74146, 4257.684] |
| 644 | + 27.842508, 23.974146, 4257.684] |
644 | 645 |
|
645 | 646 | assert_pri(p_true, new_mod, 0) |
646 | 647 | assert_opt(o_true, opt_mod, 0) |
|
0 commit comments