Add ICD coverage for the AIPS beam support flag in OPEN_FILE - #88
Draft
markccchiang wants to merge 6 commits into
Draft
Add ICD coverage for the AIPS beam support flag in OPEN_FILE#88markccchiang wants to merge 6 commits into
markccchiang wants to merge 6 commits into
Conversation
…update_open_file_tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Closes #33. Adds ICD coverage for
OpenFile.support_aips_beam. The flag was not merely untested; it was unsendable:MessageControllerhardcodedfalsein bothloadFile()andgetFileInfo(), so no test could have exercised it. This plumbs it through, adds a fixture generator, and adds the test.Changes
src/test/MessageController.tssupportAipsBeamthroughloadFile()andgetFileInfo(); both default tofalse, so the other 126 test files are unaffectedsrc/test/OPENFILE_AIPS_BEAM.test.tsOPEN_FILEandFILE_INFO_REQUESTscripts/make_aips_history_beam_fixture.pyICD_test_stages/file_browser.testsdocs/source/open_file.rstFixture
No AIPS-history-beam image existed in the test data set, so one is generated: a 128×128 FITS with no
BMAJ/BMIN/BPAkeywords and no BEAMS table, carrying the beam only inHISTORYcards.Two cards, decoy first, so the test pins that the backend keeps the last beam. The beam is deliberately non-circular (2.0" × 1.5") so an axis mix-up is detectable; both choices caught real bugs. The card format is not free: casacore's
ImageInfo::getRestoringBeamrequires whitespace-separatedBMAJ/BMIN/BPAtokens, and without a casacore-recognised beam the backend feature never fires at all.Two new sample image files
aips_history_beam.fits(set_QA) andaips_history_beam.fits.gz(
set_compressed_fits) were uploaded to the shared test dataset; the file-browser stage reddens on all 7 CI runners.Backend findings
Three bugs surfaced. None are encoded as expected behaviour; assertions are written to pass before and after a fix, with strict versions skipped alongside.
BMAJ/BMINheader entries are swapped:FileExtInfoLoader.cc:1243assigns the major axis toBMINand vice versa. The computedRestoring beamstring and the log line are both correct. The live test compares the axes as an unordered pair; a skipped test pins the intended assignment.Compressed FITS never reports the AIPS beam: the
_support_aips_beambranch inFitsLoader::ResetImageBeamis gated on casacore having already found a beam, whichCartaFitsImage(used for in-memory.gz) never does. Covered by adescribe.skip.FILE_INFO_REQUESTreturns stale info when the flag flips:ResetImageBeamonly runs at image-allocation time, andOnFileInfoRequestreuses a cached loader whose image was already stripped.OPEN_FILEescapes because it evicts the loader.(2) and (3) are two failure modes of the same design. The beam is resolved once, at allocation, behind a gate, and is probably one backend issue.
Checklist
For the pull request:
(or no documentation changes are needed)