Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P pycroscopy
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Vasudevan, Rama K
  • pycroscopy
  • Issues
  • #157

Closed
Open
Created May 24, 2018 by Vasudevan, Rama K@rvvMaintainer

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: [0] Position dimensions (sort applied): ['X' 'Y'] Position dimensionality (sort applied): [256, 128] Spectroscopic dimensions (sort applied): ['arb'] Spectroscopic dimensionality (sort applied): [1] 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.

Assignee
Assign to
Time tracking