Reshape_to_n_dims for non-square images
Created by: rajgiriUW
Posted on Slack, but for tracking.
Issue is for non-square image files, I think the reshape_to_n_dims function is reordering the data when it shouldn't be, resulting in some jagged-looking images (if rows > columns) or the image is repeated vertically (if columns > rows).
Here's what happens when running this on an example: Position dimensions: ['X' 'Y'] Position sort order: [0 1] Spectroscopic Dimensions: ['arb'] Spectroscopic sort order:  Position dimensions (sort applied): ['X' 'Y'] Position dimensionality (sort applied): [256, 128] Spectroscopic dimensions (sort applied): ['arb'] Spectroscopic dimensionality (sort applied):  After first reshape, labels are ['Y' 'X' 'arb'] Data shape is (128, 256, 1) Axes will permuted in this order: [1 0 2] New labels ordering: ['X' 'Y' 'arb'] Dataset now of shape: (256, 128, 1)
Suhas seems to think the issue is in line:
Axes will permuted in this order: [1 0 2]
Since that is changing the dimensions.
I confirmed in the Igor IBW Translator that the position dimensions are being written correctly. It is possible to correct the Translator to fix this, I think, but I then expect the issue to pop up in other translators.