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-3708, JP-3771, JP-3791 #318

Merged
merged 22 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
255653d
Added initial CR magnitude computation.
kmacdonald-stsci Aug 20, 2024
86bb3c7
Creating the crmag portion of the optional results product in the ram…
kmacdonald-stsci Aug 21, 2024
add5ebe
Creating array with initialization to zeros.
kmacdonald-stsci Oct 9, 2024
c5d5f93
Adding test for the crmag element in the optional results product.
kmacdonald-stsci Oct 9, 2024
1562619
Adding change log fragment.
kmacdonald-stsci Oct 10, 2024
3e18849
Adding comment to the CRMAG test.
kmacdonald-stsci Oct 10, 2024
8e587ca
Adding comments to clarify the implementation of the linked lists.
kmacdonald-stsci Oct 24, 2024
e7a2a5f
Checking for required return non-NoneTypes the multiprocessing pool.
kmacdonald-stsci Nov 1, 2024
3070361
The cube size used the wrong dimensions. This seems to have solved t…
kmacdonald-stsci Nov 6, 2024
bd868eb
Adding CHARGELOSS handling during multiprocessing slicing.
kmacdonald-stsci Nov 7, 2024
d51c5c6
Adding some convenience variables for multiprocessing.
kmacdonald-stsci Nov 7, 2024
72ae600
Adding comment.
kmacdonald-stsci Nov 7, 2024
f12fb30
Updating comments and raising exception for bad indexing when saving …
kmacdonald-stsci Nov 13, 2024
0d67f9f
Correcting the opt_res clean up function and add error checking for c…
kmacdonald-stsci Nov 13, 2024
46f5878
Adding change log fragment.
kmacdonald-stsci Nov 13, 2024
42246ee
Removing fragment for closed PR. Replaced by new fragment.
kmacdonald-stsci Nov 14, 2024
923f075
Updating the change log fragment.
kmacdonald-stsci Nov 14, 2024
78c6024
Removed path for debugging logger.
kmacdonald-stsci Nov 16, 2024
c227c5f
Editing the change fragment to be properly processed.
kmacdonald-stsci Nov 16, 2024
9c0b249
Updating change log fragment.
kmacdonald-stsci Nov 20, 2024
b55c3b2
Updating spelling in change log fragment.
kmacdonald-stsci Nov 20, 2024
104b8d8
Making changes to docstrings and comments due to code review.
kmacdonald-stsci Nov 21, 2024
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/318.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
For `ramp_fitting`, the `CRMAG` element was not originally implemented in
the C-extension for ramp fitting. It is now implemented. A bug in the read
noise recalculation for CHARGELOSS when using the multiprocessing option has
been fixed. Further, in `JWST` regression tests have been added to test for
multiprocessing to ensure testing for anything that could affect multiprocessing.
17 changes: 13 additions & 4 deletions src/stcal/ramp_fitting/ols_fit.py
kmacdonald-stsci marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
gain_2d : ndarray
gain for all pixels

algorithm : str
'OLS' specifies that ordinary least squares should be used;
'GLS' specifies that generalized least squares should be used.

weighting : str
'optimal' specifies that optimal weighting should be used;
currently the only weighting supported.
Expand Down Expand Up @@ -214,6 +210,11 @@
"""
# Create output arrays for each output tuple. The input ramp data and
# slices are needed for this.
for result in pool_results:
image_slice, integ_slice, opt_slice = result
if image_slice is None or integ_slice is None:
return None, None, None

Check warning on line 216 in src/stcal/ramp_fitting/ols_fit.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/ramp_fitting/ols_fit.py#L216

Added line #L216 was not covered by tests

image_info, integ_info, opt_info = create_output_info(ramp_data, pool_results, save_opt)

# Loop over the slices and assemble each slice into the main return arrays.
Expand Down Expand Up @@ -570,6 +571,14 @@
ramp_data_slice.flags_saturated = ramp_data.flags_saturated
ramp_data_slice.flags_no_gain_val = ramp_data.flags_no_gain_val
ramp_data_slice.flags_unreliable_slope = ramp_data.flags_unreliable_slope
ramp_data_slice.flags_chargeloss = ramp_data.flags_chargeloss

# For possible CHARGELOSS flagging.
if ramp_data.orig_gdq is not None:
ogdq = ramp_data.orig_gdq[:, :, start_row : start_row + nrows, :].copy()
kmacdonald-stsci marked this conversation as resolved.
Show resolved Hide resolved
ramp_data_slice.orig_gdq = ogdq

Check warning on line 579 in src/stcal/ramp_fitting/ols_fit.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/ramp_fitting/ols_fit.py#L578-L579

Added lines #L578 - L579 were not covered by tests
else:
ramp_data_slice.orig_gdq = None

# Slice info
ramp_data_slice.start_row = start_row
Expand Down
Loading
Loading