Fix logic in MIRI LRS spec3 regtest #7497
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the currently flawed logic in the test_miri_lrs_slit_spec3 regression test module. The problem is that the spec3 pipeline is run multiple times on the same input data, using different specifications for how to create the output/combined image WCS, but all of those different runs get saved using the same s2d product file name. That's fine for most of the tests, because most result in a combined image of the same size, but the very last iteration creates a bigger image. When the "okify_regtests" script is used to update truth files, that last s2d file, which is different size, gets used to update the truth files for all tests, leading to subsequent failures. This PR updates the test module to save the result of the last iteration in a different output file, so that it doesn't clobber the truths for the other iterations.
Checklist for maintainers
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR