Skip to content

Commit

Permalink
JP-2037 and JP-1926: Fixing ramp fitting multiprocessing to work with…
Browse files Browse the repository at this point in the history
… new STCAL interface. (#30)

* Fixing ramp fitting multiprocessing to work with new STCAL interface.

* Making changes based on code review.

* Final DQ array for multiprocessing was incorrectly allocated as dtype=nd.float32, but should be dtype=np.uint32.  Changed to allocate an array with the correct dtype.

* Changing DQ to be uint32, not float32.

* Adding addition of multiprocessing to change log.
  • Loading branch information
kmacdonald-stsci authored Jul 28, 2021
1 parent f7aef64 commit 8cf81e0
Show file tree
Hide file tree
Showing 3 changed files with 408 additions and 360 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ramp_fitting
------------

- Implemented multiprocessing for OLS. [#30]
- Added DQ flag parameter to `ramp_fit` [#25]

- Move common ``jump`` code to stcal [#27]
Expand Down
8 changes: 8 additions & 0 deletions src/stcal/ramp_fitting/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ def update_dqflags(input_flags):
dqflags["JUMP_DET"] = input_flags["JUMP_DET"]
dqflags["NO_GAIN_VALUE"] = input_flags["NO_GAIN_VALUE"]
dqflags["UNRELIABLE_SLOPE"] = input_flags["UNRELIABLE_SLOPE"]


def update_dqflags_from_ramp_data(ramp_data):
dqflags["DO_NOT_USE"] = ramp_data.flags_do_not_use
dqflags["SATURATED"] = ramp_data.flags_saturated
dqflags["JUMP_DET"] = ramp_data.flags_jump_det
dqflags["NO_GAIN_VALUE"] = ramp_data.flags_no_gain_val
dqflags["UNRELIABLE_SLOPE"] = ramp_data.flags_unreliable_slope
Loading

0 comments on commit 8cf81e0

Please sign in to comment.