TEM-Gemini-Centre / mib2hspy

Tools for converting MIB files to HSPY
GNU General Public License v3.0
0 stars 0 forks source link

Conversion of non-square navigation dimensions #3

Open magnunor opened 3 years ago

magnunor commented 3 years ago

There might be a bug, or unclear GUI options, when converting non-square datasets.

A dataset with 542 X probe positions, and 1980 Y probe positions resulted in a 1980 x and 542 y hspy-file. The generated navigation image:

009_542x1980_12_12_STEM_DPC

I'm guessing this is due to some switching between NumPy and HyperSpy x/y navigation axes.

da.swapaxes does not solve this, and da.reshape doesn't seem to be able to handle this due to the chunking.

emichr commented 3 years ago

Ok, I will check this, but there might also be some issue with how Merlin stores data and how hyperspy/pyxem reads .mib files. Have you experienced/tried similar things before?

When I tested this last week with Ingeborg, we determined that Merlin uses X as the vertical scan axis and Y as the horizontal scan axis. Meanwhile, the NanoMEGAS scanner software uses X as the horizontal and Y as the vertical axis. This means that when acquiring non-squre data you should NM X - Merlin Y NM Y - Merlin X

If you want an elongated scan in the vertical direction, Merlin X must be larger than Merlin Y

Of course, there might be an issue with how the axes are flipped in the conversion as well. You could try transposing the X and Y pixel inputs into the converter GUI and see if that helps as well.