Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mwregan2 committed Mar 6, 2024
1 parent b151866 commit 747c652
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/stcal/jump/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def flag_large_events(
Returns
-------
Nothing, gdq array is modified.
total Snowballs
"""
log.info("Flagging Snowballs")
Expand Down
13 changes: 5 additions & 8 deletions tests/test_jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,16 @@ def test_flag_large_events_withsnowball():
def test_flag_large_events_groupedsnowball():
cube = np.zeros(shape=(1, 5, 7, 7), dtype=np.uint8)
# cross of saturation surrounding by jump -> snowball
cube[0, 1, :, :] = DQFLAGS["JUMP_DET"]
# cube[0, 1, :, :] = DQFLAGS["JUMP_DET"]
# cube[0, 2, :, :] = DQFLAGS["JUMP_DET"]
cube[0, 2, 1:6, 1:6] = DQFLAGS["JUMP_DET"]
cube[0, 1, 1:6, 1:6] = DQFLAGS["JUMP_DET"]

cube[0, 2, 3, 3] = DQFLAGS["SATURATED"]
cube[0, 2, 2, 3] = DQFLAGS["SATURATED"]
cube[0, 2, 3, 4] = DQFLAGS["SATURATED"]
cube[0, 2, 4, 3] = DQFLAGS["SATURATED"]
cube[0, 2, 3, 2] = DQFLAGS["SATURATED"]
cube[0, 2, 1, 1:6] = DQFLAGS["JUMP_DET"]
cube[0, 2, 5, 1:6] = DQFLAGS["JUMP_DET"]
cube[0, 2, 1:6, 1] = DQFLAGS["JUMP_DET"]
cube[0, 2, 1:6, 5] = DQFLAGS["JUMP_DET"]
flag_large_events(
cube,
DQFLAGS["JUMP_DET"],
Expand All @@ -172,9 +172,6 @@ def test_flag_large_events_groupedsnowball():
min_sat_radius_extend=0.5,
sat_expand=1.1,
)
# assert cube[0, 1, 2, 2] == 0
# assert cube[0, 1, 3, 5] == 0
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 747c652

Please sign in to comment.