spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
570 stars 167 forks source link

Bug in OLS_C ramp fitting under certain conditions #8618

Closed stscijgbot-jp closed 4 months ago

stscijgbot-jp commented 4 months ago

Issue JP-3678 was created on JIRA by David Law:

Now that B11.0 has been tagged I've been running further tests, and found a bug in the ramp fitting code that occurs under certain specific conditions.

Test data set is jw01523003001_03102_00001_mirifushort_uncal, looking around pixel X=309, Y=738.

If I process this data set providing the optional

dark_current.average_dark_current=1.0

with the now-default OLS_C ramp fitting algorithm, everything looks ok when multiprocessing is on (ramp_fit.maximum_cores='half') but artifacts start to appear when multiprocessing is off.  See multiproc.png attached.

I'm not sure why there would be a difference?

stscijgbot-jp commented 4 months ago

Comment by David Law on JIRA:

Update: Work by Kenneth MacDonald shows that part of the issue is that when multiprocessing is ON, the python code was being used regardless of what algorithm was selected.  That's now addressed by spacetelescope/stcal#268

That explains why the rate files looked ok with multiprocessing on- because it was actually using the old python code.

Issue therefore becomes why the artifacts above appear when using the C code along with a value for the average dark current.

stscijgbot-jp commented 4 months ago

Comment by David Law on JIRA:

Multiprocessing bug fixed by spacetelescope/stcal#268

Average dark current bug fixed by spacetelescope/stcal#269