Skip to content

Commit

Permalink
fix num_grps_masked for snowballs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwregan2 committed Jan 31, 2024
1 parent 9ec7676 commit 037966e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/stcal/jump/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ def flag_large_events(
sat_flag,
jump_flag,
expansion=expand_factor,
num_grps_masked=0,
max_extended_radius=max_extended_radius,
)
return gdq, total_snowballs
Expand Down Expand Up @@ -681,8 +682,6 @@ def extend_ellipses(
jump_ellipse[saty, satx] = 0
out_gdq_cube[intg, flg_grp, :, :] = np.bitwise_or(gdq_cube[intg, flg_grp, :, :], jump_ellipse)
diff_cube = out_gdq_cube - gdq_cube
print("")
print("extend ellipse corner", out_gdq_cube[0, 2, 0, 0])
return out_gdq_cube, num_ellipses

def find_last_grp(grp, ngrps, num_grps_masked):
Expand Down
4 changes: 1 addition & 3 deletions tests/test_jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,9 @@ def test_flag_large_events_groupedsnowball():
min_sat_radius_extend=0.5,
sat_expand=1.1,
)
print("")
print("final corner", cube[0, 2, 0, 0])
# assert cube[0, 1, 2, 2] == 0
# assert cube[0, 1, 3, 5] == 0
assert cube[0, 2, 0, 0] == DQFLAGS["JUMP_DET"] # Jump was extended
assert cube[0, 2, 0, 0] == 0
assert cube[0, 2, 1, 0] == DQFLAGS["JUMP_DET"] # Jump was extended
assert cube[0, 2, 2, 2] == DQFLAGS["SATURATED"] # Saturation was extended

Expand Down

0 comments on commit 037966e

Please sign in to comment.