Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JP-3164: Removing tests that are already handled in STCAL or are unneeded. #7530

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions jwst/ramp_fitting/tests/test_ramp_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,6 @@ def test_mixed_crs_and_donotuse():
assert max_seg == 3


@pytest.mark.skip(reason="GLS code does not [yet] handle single group integrations.")
def test_one_group_small_buffer_fit_gls():
model1, gdq, rnoise, pixdq, err, gain = setup_inputs(ngroups=1, gain=1, readnoise=10)
model1.data[0, 0, 50, 50] = 10.0

slopes, cube, optional, gls_dummy = ramp_fit(
model1, 512, True, rnoise, gain, 'GLS', 'optimal', 'none', dqflags.pixel)

data = slopes[0]
np.testing.assert_allclose(data[50, 50], 10.0, 1e-6)


def test_one_group_two_ints_fit_ols():
model1, gdq, rnoise, pixdq, err, gain = setup_inputs(ngroups=1, gain=1, readnoise=10, nints=2)
model1.data[0, 0, 50, 50] = 10.0
Expand All @@ -161,27 +149,6 @@ def test_one_group_two_ints_fit_ols():
np.testing.assert_allclose(data[50, 50], 11.0, 1e-6)


@pytest.mark.skip(reason="GLS does not correctly combine the slopes for integrations into the exposure slope.")
def test_gls_vs_ols_two_ints_ols():
"""
A test to see if GLS is correctly combining integrations. The combination should only use the read noise variance.
The current version of GLS does not work correctly.
"""
model1, gdq, rnoise, pixdq, err, gain = setup_inputs(ngroups=11, gain=5, readnoise=1, nints=2)
ramp = np.asarray([x * 100 for x in range(11)])
model1.data[0, :, 50, 50] = ramp
model1.data[1, :, 50, 50] = ramp * 2

slopes = ramp_fit(
model1, 1024 * 30000., True, rnoise, gain, 'OLS', 'optimal', 'none', dqflags.pixel)
np.testing.assert_allclose(slopes[0].data[50, 50], 150.0, 1e-6)

slopes_gls = ramp_fit(
model1, 1024 * 30000., True, rnoise, gain, 'GLS', 'optimal', 'none', dqflags.pixel)
np.testing.assert_allclose(slopes_gls[0].data[50, 50], 150.0, 1e-6)


# @pytest.mark.skip(reason="Jenkins environment does not correctly handle multi-processing.")
def test_multiprocessing():
nints, ngroups, nrows = 3, 25, 100
ncols = nrows # make sure these are the same, so the loops below work
Expand Down Expand Up @@ -219,7 +186,6 @@ def test_multiprocessing():
np.testing.assert_allclose(slopes[0], slopes_multi[0], rtol=1e-5)


# @pytest.mark.skip(reason="Jenkins environment does not correctly handle multi-processing.")
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
def test_multiprocessing2():
nints, ngroups, nrows = 1, 25, 100
ncols = nrows # make sure these are the same, so the loops below work
Expand Down Expand Up @@ -254,17 +220,6 @@ def test_multiprocessing2():
np.testing.assert_allclose(slopes[0], slopes_multi[0], rtol=1e-5)


@pytest.mark.xfail(reason="GLS code does not [yet] handle single group integrations.")
def test_one_group_two_ints_fit_gls():
model1, gdq, rnoise, pixdq, err, gain = setup_inputs(ngroups=1, gain=1, readnoise=10, nints=2)
model1.data[0, 0, 50, 50] = 10.0
model1.data[1, 0, 50, 50] = 12.0

slopes = ramp_fit(
model1, 1024 * 30000., True, rnoise, gain, 'GLS', 'optimal', 'none', dqflags.pixel)

np.testing.assert_allclose(slopes[0].data[50, 50], 11.0, 1e-6)

# tests that apply to both 'ols' and 'gls' are in the TestMethods class so
# that both can use the parameterized 'method'

Expand Down Expand Up @@ -520,7 +475,6 @@ def test_four_groups_oneCR_orphangroupatend_fit(self, method):
data = slopes[0]
np.testing.assert_allclose(data[50, 50], cds_slope, 1e-6)

# @pytest.mark.skip(reason="not using now")
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
def test_four_groups_two_CRs_at_end(self, method):
model1, gdq, rnoise, pixdq, err, gain = setup_inputs(ngroups=4, gain=1, readnoise=10)
model1.data[0, 0, 50, 50] = 10.0
Expand Down