Skip to content

Commit

Permalink
change threshold flagging back to scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
mwregan2 committed Feb 28, 2024
1 parent cf098f5 commit 0e94cb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/stcal/jump/twopoint_difference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions tests/test_twopoint_difference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0e94cb8

Please sign in to comment.