Skip to content

Update stokes concatenation tests - #101

Open
markccchiang wants to merge 9 commits into
devfrom
mark/update_concat_images_tests
Open

Update stokes concatenation tests#101
markccchiang wants to merge 9 commits into
devfrom
mark/update_concat_images_tests

Conversation

@markccchiang

Copy link
Copy Markdown
Collaborator

Description

This PR addresses part of issue #3. The three stokes concatenation tests , CONCAT_STOKES_IMAGES, CONCAT_STOKES_IMAGES_AXIS_DEGENERACY, and CONCAT_ERROR_MESSAGE, are updated, and all three are added to the file_browser stage so that CI runs them.

  • CONCAT_STOKES_IMAGES: concatenates the four single-stokes cubes of IRCp10216_sci.spw0 into a hypercube, in five combinations (IQUV, IV, QU, IQU, QUV). It checks the ack's name and shape, then walks the stokes axis with SET_IMAGE_CHANNELS and compares each plane against the histogram of the cube that belongs there. Each of the four inputs has a distinct histogram, so this is what identifies the planes. Every case names its files in reverse order and expects the axis back sorted, since StokesFilesConnector iterates its loaders in polarization order.

  • CONCAT_STOKES_IMAGES_AXIS_DEGENERACY: the same five combinations against the dropdeg cubes, which carry no stokes axis of their own. That is the premise of the test: it sends DoConcat down its stokes_axis < 0 branch, where a stokes coordinate is built and every image extended before they can be joined. The inputs are now checked to really be degenerate-axis-dropped, and the planes are walked the same way.

  • CONCAT_ERROR_MESSAGE: six requests the backend must refuse, covering every rejection StokesFilesConnector can raise for the set_QA data: inconsistent shapes, duplicate Stokes type, too few files, mixed file types, a hypercube with a gap in the stokes axis, and a missing file. Each refusal is checked to draw its message, to draw nothing else, and to leave the requested file ID free. A seventh case concatenates a valid pair afterwards, which is what exercises ClearCache.

Checklist

For the pull request:

  • Documentation has been updated (or no documentation changes are needed)

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.

1 participant