Skip to content

Commit

Permalink
JP-1950: Update ramp fit unit tests (#6038)
Browse files Browse the repository at this point in the history
* Updating test cases for the bug fix done in 
   spacetelescope/stcal#12

* bump install_requires and requirements-sdp.txt for stcal 0.2.1
  • Loading branch information
kmacdonald-stsci authored May 20, 2021
1 parent 9df6401 commit bfe9d64
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ ramp_fitting

- Moved ramp fit code to STCAL. [#6023]

- Now that ramp fitting has been moved to STCAL, for the JWST unit tests to
pass need to use STCAL 0.2.1 or greater. The bug fix for JP-1920 were made
in STCAL, which affected JWST unit tests for ramp fitting. [#6038]

refpix
------

Expand Down
14 changes: 7 additions & 7 deletions jwst/ramp_fitting/tests/test_ramp_fit_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def test_pix_1():
ramp_model, 1024 * 300., True, rnoise_model, gain_model, 'OLS', 'optimal', 'none')

# Set truth values for PRIMARY results:
p_true = [1.8999999, 6, 1.046670, 0.02636364, 1.0691562]
p_true = [1.8999999, 6, 1.05057204, 0.03454545, 1.0691562]

# Set truth values for OPTIONAL results:
o_true = [1.9, 56.870003, 0.02636364, 1.0691562, -3., 56.870003,
-3.999998, 0.83321977]
o_true = [1.9, 56.870003, 0.03454545, 1.0691562, -3., 56.870003,
-3.999998, 0.82091206]

assert_pri(p_true, new_mod, 0)
assert_opt(o_true, opt_mod, 0)
Expand All @@ -103,17 +103,17 @@ def test_pix_2():
ramp_model, 1024 * 300., True, rnoise_model, gain_model, 'OLS', 'optimal', 'none')

# Set truth values for PRIMARY results:
p_true = [0.84761256, 6, 0.42986465, 0.00659091, 0.1781927]
p_true = [0.84833729, 6, 0.42747884, 0.00454545, 0.1781927]

# Set truth values for OPTIONAL results for all segments
o_true = [[1.0000001, 0.1, 1.], # slopes for 3 segments
[28.435, 56.870003, 56.870003], # sigslope
[0.01318182, 0.02636364, 0.02636364, ], # var_poisson
[0.00909091, 0.01818182, 0.01818182], # var_poisson
[0.26728904, 1.0691562, 1.0691562], # var_rnoise
[14.999998, 51., 15.], # yint
[36.709427, 56.870003, 56.870003], # sigyint
[6.5238733], # pedestal
[12.712313, 0.83321977, 0.83321977], # weights
[6.5166273], # pedestal
[13.091425, 0.84580624, 0.84580624], # weights
]

assert_pri(p_true, new_mod, 0)
Expand Down
2 changes: 1 addition & 1 deletion requirements-sdp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ scipy==1.6.3
semantic-version==2.8.5
six==1.16.0
spherical-geometry==1.2.20
stcal==0.2.0
stcal==0.2.1
stdatamodels==0.2.1
stpipe==0.2.0
stsci.image==2.3.3
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ install_requires =
requests>=2.22
scipy>=1.1.0
spherical-geometry>=1.2.20
stcal>=0.2
stcal>=0.2.1
stdatamodels>=0.2.0,<1.0
stpipe>=0.1.0,<1.0
stsci.image>=2.3.3
Expand Down

0 comments on commit bfe9d64

Please sign in to comment.