Skip to content

Commit

Permalink
Update jump.py
Browse files Browse the repository at this point in the history
addressed comments in PR
  • Loading branch information
mwregan2 committed Jan 26, 2024
1 parent 28bff55 commit 7205fdb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/stcal/jump/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def detect_jumps(
data /= gain_2d
err /= gain_2d
readnoise_2d /= gain_2d
# Return the updated data quality arrays
# Return the updated data quality arrays
return gdq, pdq, total_primary_crs, number_extended_events, stddev


Expand Down Expand Up @@ -684,6 +684,22 @@ def extend_ellipses(
return out_gdq_cube, num_ellipses

def find_last_grp(grp, ngrps, num_grps_masked_after):
"""
Parameters
_________
grp : int
The location of the shower
ngrps :
The number of groups in the integration
num_grps_masked_after :
The requested number of groups to be flagged after the shower
Returns
_______
last_grp : int
The index of the last group to flag for the shower
"""
num_grps_masked_after += 1
last_grp = min(grp + num_grps_masked_after, ngrps)
return last_grp
Expand Down

0 comments on commit 7205fdb

Please sign in to comment.