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-2623: Fixing multiprocessing failure #99

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

kmacdonald-stsci
Copy link
Collaborator

The multiprocessing feature of ramp fitting was failing. To ensure new features worked properly with multiprocessing the unneeded one group suppression list got removed and the ZEROFRAME handling got moved to after multiprocessing to ensure proper usage.

The primary cause of the multiprocessing failure was the int_times object, which is an astropy.io object that cannot be properly pickled. Since it is not used in ramp fitting, it is no longer passed to STCAL ramp fitting.

@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #99 (93c00c0) into main (6f94d80) will increase coverage by 0.46%.
The diff coverage is 58.75%.

❗ Current head 93c00c0 differs from pull request most recent head a2ec4ee. Consider uploading reports for the commit a2ec4ee to get more accurate results

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
+ Coverage   71.65%   72.11%   +0.46%     
==========================================
  Files          16       16              
  Lines        2466     2478      +12     
==========================================
+ Hits         1767     1787      +20     
+ Misses        699      691       -8     
Impacted Files Coverage Δ
src/stcal/ramp_fitting/gls_fit.py 62.50% <0.00%> (ø)
src/stcal/ramp_fitting/ramp_fit_class.py 64.17% <11.11%> (-35.83%) ⬇️
src/stcal/ramp_fitting/ols_fit.py 71.80% <44.44%> (-0.05%) ⬇️
src/stcal/ramp_fitting/ramp_fit.py 69.64% <83.33%> (+21.22%) ⬆️
src/stcal/ramp_fitting/utils.py 83.83% <96.77%> (+1.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f94d80...a2ec4ee. Read the comment docs.

Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Needs a change log entry.

@hbushouse
Copy link
Collaborator

@kmacdonald-stsci can you fix the conflicts, which will then allow the CI tests to run again.

Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now.

@hbushouse
Copy link
Collaborator

@dmggh are you OK with this PR?

Copy link
Contributor

@dmggh dmggh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@jemorrison
Copy link
Collaborator

any way we can get this PR and the related one on JWST merged so we have multiprocessing available in master soonish ?

@hbushouse
Copy link
Collaborator

This also includes a minor, but noticeable, change to the way some cases of one good group are handled, which we were waiting for comment and testing from INS before merging. So we are not going to include this in our B8.0.1 release (which is being created today). Once the B8.0.1 release has been created we can then merge this anytime we want in order to get it into master.

…age is used in order to be usable with multiprocessing.

Adding NoneType conditional to slicing up ZEROFRAME for multiprocessing.

Removed problematic variables.  Multiprocessing now works.

Modifying how one group ramps are suppressed.

Changing name of function to better describe its functionality.

Removing int_times from ramp fitting.

Making changes due to style failures.

Updating the change log.

Adding check for keyword in exposure metadata.
@karllark
Copy link
Contributor

I have used this branch and the accompanying jwst branch to process quite a large amount of MIRI imaging observations with success. I have seen no differences in the resulting rate images.

@nden
Copy link
Collaborator

nden commented Jun 24, 2022

@PaulHuwe @ddavis-stsci Can one of you run a test with romancal to make sure the absence of int_times in the return values does not break romancal? It'd be good to merge this soon if possible.

@nden
Copy link
Collaborator

nden commented Jun 24, 2022

@kmacdonald-stsci Please assign also @ddavis-stsci and @PaulHuwe as reviewers of all stcal PRs to cover Roman testing.

Copy link
Collaborator

@ddavis-stsci ddavis-stsci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hbushouse
Copy link
Collaborator

Given all the glowing reports from MIRI team members and Roman testers, I feel we can go ahead and merge this. Any objections? Speak now or ...

@hbushouse hbushouse added this to the 0.7.4 milestone Jun 24, 2022
Copy link
Collaborator

@PaulHuwe PaulHuwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All unit and regression tests passed in RomanCAL.

@zacharyburnett zacharyburnett merged commit 3a91dfe into spacetelescope:main Jun 24, 2022
@kmacdonald-stsci kmacdonald-stsci deleted the jp_2623 branch June 24, 2022 15:05
@hbushouse hbushouse removed this from the 0.7.4 milestone Aug 19, 2022
@hbushouse hbushouse added this to the 1.0.0 milestone Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants