spacetelescope / jwst

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

Investigate coron3 differences across systems #8526

Open stscijgbot-jp opened 1 month ago

stscijgbot-jp commented 1 month ago

Issue JP-3646 was created on JIRA by Brett Graham:

There are differences in some results for test_nircam_coron3_sci_exp when run on different machines (RHEL9 vs RHEL7). The differences look similar to what caused #8490 (leastsq producing slightly different results).

Loosening the tolerance of the regression test comparisons for coron3 results might be one option. However due to the nature of the errors (small differences in image shift) and the comparison (a pixel-to-pixel comparison) a very small difference can result in a large error (some pixels differ by >1E-2).

One source of the pixel differences is that the least squares fit used during align psf uses the default tolerances (xtol and ftol are 1.49012e-08). The algorithm terminates with different results on different machines (but within the default tolerance). However these solutions produce regression test failures due to the issues mentioned above (where a small shift error introduces large pixel differences). These fits are performed with double precision and appear to converge when the tolerances are tightened (up to 1E-15 was tested so far).

braingram commented 4 days ago

Cross referencing: https://github.com/spacetelescope/jwst/issues/8492 and https://jira.stsci.edu/browse/JP-3628

Of particular note is the comment "The level 3 products here are largely used for quick look purposes". It seems likely that we should drastically relax the tolerances for these tests.