diff --git a/src/stcal/jump/twopoint_difference.py b/src/stcal/jump/twopoint_difference.py index e7452ee7..b161c4dc 100644 --- a/src/stcal/jump/twopoint_difference.py +++ b/src/stcal/jump/twopoint_difference.py @@ -431,7 +431,7 @@ def find_crs( group = cr_group[j] row = cr_row[j] col = cr_col[j] - if e_jump_4d[intg, group - 1, row, col] >= cthres[row, col]: + if e_jump_4d[intg, group - 1, row, col] >= cthres: for kk in range(group, min(group + cgroup + 1, ngroups)): if (gdq[intg, kk, row, col] & sat_flag) == 0 and ( gdq[intg, kk, row, col] & dnu_flag diff --git a/tests/test_twopoint_difference.py b/tests/test_twopoint_difference.py index b17aee30..22ff41a6 100644 --- a/tests/test_twopoint_difference.py +++ b/tests/test_twopoint_difference.py @@ -906,7 +906,7 @@ def test_10grps_1cr_afterjump(setup_cube): data[0, 8, 100, 100] = 1190 data[0, 9, 100, 100] = 1209 - after_jump_flag_e1 = np.full(data.shape[2:4], 1.0) * 0.0 + after_jump_flag_e1 = 0.0 out_gdq, row_below_gdq, rows_above_gdq, total_crs, stddev = find_crs( data, gdq, @@ -942,7 +942,7 @@ def test_10grps_1cr_afterjump_2group(setup_cube): data[0, 8, 100, 100] = 1190 data[0, 9, 100, 100] = 1209 - after_jump_flag_e1 = np.full(data.shape[2:4], 1.0) * 0.0 + after_jump_flag_e1 = 0.0 out_gdq, row_below_gdq, rows_above_gdq, total_crs, stddev = find_crs( data, gdq, @@ -983,7 +983,7 @@ def test_10grps_1cr_afterjump_toosmall(setup_cube): data[0, 8, 100, 100] = 1190 data[0, 9, 100, 100] = 1209 - after_jump_flag_e1 = np.full(data.shape[2:4], 1.0) * 10000.0 + after_jump_flag_e1 = 10000.0 out_gdq, row_below_gdq, rows_above_gdq, total_crs, stddev = find_crs( data, gdq, @@ -1019,8 +1019,8 @@ def test_10grps_1cr_afterjump_twothresholds(setup_cube): data[0, 8, 100, 100] = 1190 data[0, 9, 100, 100] = 1209 - after_jump_flag_e1 = np.full(data.shape[2:4], 1.0) * 500.0 - after_jump_flag_e2 = np.full(data.shape[2:4], 1.0) * 10.0 + after_jump_flag_e1 = 500.0 + after_jump_flag_e2 = 10.0 out_gdq, row_below_gdq, rows_above_gdq, total_crs, stddev = find_crs( data, gdq,