Skip to content

Commit

Permalink
Update ramp_fit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mwregan2 committed Jan 31, 2024
1 parent df7689e commit 3ed79cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/stcal/ramp_fitting/ramp_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
BUFSIZE = 1024 * 300000 # 300Mb cache size for data section


def create_ramp_fit_class(model, dqflags=None, suppress_one_group=False):
def create_ramp_fit_class(model, dqflags=None, suppress_one_group=False, avg_dark_current=0):
"""
Create an internal ramp fit class from a data model.
Expand Down Expand Up @@ -77,6 +77,7 @@ def create_ramp_fit_class(model, dqflags=None, suppress_one_group=False):
ramp_data.num_rows = ramp_data.data.shape[2]

ramp_data.suppress_one_group_ramps = suppress_one_group
ramp_data.avg_dark_current = avg_dark_current

Check warning on line 80 in src/stcal/ramp_fitting/ramp_fit.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/ramp_fitting/ramp_fit.py#L80

Added line #L80 was not covered by tests

return ramp_data

Expand Down Expand Up @@ -165,7 +166,7 @@ def ramp_fit(
# Create an instance of the internal ramp class, using only values needed
# for ramp fitting from the to remove further ramp fitting dependence on
# data models.
ramp_data = create_ramp_fit_class(model, dqflags, suppress_one_group)
ramp_data = create_ramp_fit_class(model, dqflags, suppress_one_group, avg_dark_current)

Check warning on line 169 in src/stcal/ramp_fitting/ramp_fit.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/ramp_fitting/ramp_fit.py#L169

Added line #L169 was not covered by tests

return ramp_fit_data(
ramp_data, buffsize, save_opt, readnoise_2d, gain_2d,
Expand Down

0 comments on commit 3ed79cb

Please sign in to comment.