-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
correcting import of rectangular image array #4
Conversation
hey just replying to say I'm looking at this finally. I'm just going to write some test cases for differently sized grid inputs. It's very possible i mixed up the nx ny order, almost all my data is square! |
Just to clarify, how did you figure out that the nx ny order was mixed up? Are you plotting it with matplotlib's imshow? The reason I'm asking is because imshow has an 'origin' parameter which defaults to 'upper' which flips all array images (i.e. scan data). The proper orientation that corresponds to what I view in the nanonis scan inspector is to use origin='lower' in my imshow call. See https://stackoverflow.com/questions/14320159/matplotlib-imshow-data-rotated If the nx ny issue is different can you explain it a bit more? or have a sample file that I can play with to see exactly how it's being loaded in with the read functions? Thanks |
I'm dealing with some 512x192 images, here's hopefully an sxm file that will reproduce the error: |
PS the same solution (swapping nx/ ny) fixed the same problem with reading in a rectangular grid spectroscopy. |
Hi,
I've been dealing with a rectangular image file, 512x128 pixels. It seems that the convention for reshaping the raw bytes by the scan_pixels tuple from the header is mixed up? When I switched the nx and ny, it works perfectly on my image.