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-3521: Fix jump multiprocessing error #239

Merged
merged 19 commits into from
Feb 1, 2024
Merged
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ jump
- Added more allowable selections for the number of cores to use for
multiprocessing [#183].

- Fixed the numer of rows per slice in multiprocessing that lead to
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
different results when running the step with multiprocess [#239]

ramp_fitting
~~~~~~~~~~~~

Expand Down
9 changes: 8 additions & 1 deletion src/stcal/jump/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
log.info("Total showers= %i", num_showers)
number_extended_events = num_showers
else:
yinc = int(n_rows / n_slices)
yinc = int(n_rows // n_slices)

Check warning on line 317 in src/stcal/jump/jump.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/jump/jump.py#L317

Added line #L317 was not covered by tests
slices = []
# Slice up data, gdq, readnoise_2d into slices
# Each element of slices is a tuple of
Expand Down Expand Up @@ -427,6 +427,13 @@
# save the neighbors to be flagged that will be in the next slice
previous_row_above_gdq = row_above_gdq.copy()
k += 1
# remove redundant bits in pixels that have jump flagged but were
# already flagged as do_not_use or saturated.
gdq[gdq == np.bitwise_or(dqflags['DO_NOT_USE'], dqflags['JUMP_DET'])] = \

Check warning on line 432 in src/stcal/jump/jump.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/jump/jump.py#L432

Added line #L432 was not covered by tests
mwregan2 marked this conversation as resolved.
Show resolved Hide resolved
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
dqflags['DO_NOT_USE']
gdq[gdq == np.bitwise_or(dqflags['SATURATED'], dqflags['JUMP_DET'])] = \

Check warning on line 434 in src/stcal/jump/jump.py

View check run for this annotation

Codecov / codecov/patch

src/stcal/jump/jump.py#L434

Added line #L434 was not covered by tests
hbushouse marked this conversation as resolved.
Show resolved Hide resolved
dqflags['SATURATED']

# This is the flag that controls the flagging of snowballs.
if expand_large_events:
total_snowballs = flag_large_events(
Expand Down
Loading