Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JP-3632: Change the Spec of Ramp Fitting to Select Algorithm #8503

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ ramp_fitting
to use uint16 instead of uint8, in order to avoid potential
overflow/wraparound problems. [#8377]

- Changed the spec for ramp fitting that allows for selecting
the algorithm "OLS" to use the python implementation of ramp
fitting or "OLS_C" to use the C extension implementation of
ramp fitting. [#8503]

resample
--------

Expand Down
5 changes: 5 additions & 0 deletions docs/jwst/ramp_fitting/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Arguments
=========
The ramp fitting step has the following optional arguments that can be set by the user:

* ``--algorithm``: A string to select the desired algorithm. The available
values are "OLS" to select the python implementation of the Ordinary
Least Squares algorithm and "OLS_C" to select the C extension
implementation of OLS. The algorithm defaults to "OLS".

* ``--save_opt``: A True/False value that specifies whether to write
the optional output product. Default is False.

Expand Down
5 changes: 3 additions & 2 deletions jwst/ramp_fitting/ramp_fit_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ class RampFitStep(Step):
class_alias = "ramp_fit"

spec = """
algorithm = option('OLS', 'OLS_C', default='OLS') # Can be 'OLS_C' to select the C extension
int_name = string(default='')
save_opt = boolean(default=False) # Save optional output
opt_name = string(default='')
Expand All @@ -399,8 +400,8 @@ class RampFitStep(Step):
# As of 04/26/17, the only allowed algorithm is 'ols', and the
# only allowed weighting is 'optimal'.

algorithm = 'ols' # Only algorithm allowed for Build 7.1
# algorithm = 'gls' # 032520
# algorithm = 'ols' # Only algorithm allowed for Build 7.1
# algorithm = 'gls' # 032520

weighting = 'optimal' # Only weighting allowed for Build 7.1

Expand Down