Skip to content

Commit

Permalink
Making some changes based on code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmacdonald-stsci committed Feb 15, 2022
1 parent 1467363 commit 33d8b58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/stcal/ramp_fitting/ramp_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,10 @@ def ramp_fit(model, buffsize, save_opt, readnoise_2d, gain_2d, algorithm,
Object containing optional GLS-specific ramp fitting data for the
exposure
"""
if suppress_one_group:
log.info("Ramps with one good group suppressed as no good group.")
if model.data.shape[1] == 1:
# Suppressing one ramp groups and having data with only one group
# means there is no work to do.
return None, None, None, None
if suppress_one_group and model.data.shape[1] == 1:
# One group ramp suppression should only be done on data with
# ramps having more than one group.
suppress_one_group = False

# Create an instance of the internal ramp class, using only values needed
# for ramp fitting from the to remove further ramp fitting dependence on
Expand Down
3 changes: 3 additions & 0 deletions tests/test_ramp_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@ def setup_inputs(dims, var, tm):

# -----------------------------------------------------------------------------

###############################################################################
# The functions below are only used for DEBUGGING tests and developing tests. #
###############################################################################

# Main product
def print_slope_data(slopes):
Expand Down

0 comments on commit 33d8b58

Please sign in to comment.