Opening a TFS Velox generated MRC 4DSTEM data file
Closed this issue · 2 comments
Hello,
I have a 4DSTEM data file with .mrc extension that was generated by TFS Velox software. Could you please tell me what's the best way to open it using py4DSTEM package for analysis? As of now, I tried converting it to dm3 file in DM and open it. But, py4DSTEM imports it as a 3D stack and not as a 4D stack. For example, a (186, 73, 256, 256) data is being imported as a (13578, 256, 256) dataset where 13578 is 186*73. Thanks in advance.
Hey @sbachu6812, thanks for the question. We should and almost certainly will at some point support reading mrc files - alas, it is not yet at the top of the list. In the meantime, if you can convert to DM and read that, you should be able to do
data3d = py4DSTEM.import_file( filepath_dm )
data4d = py4DSTEM.DataCube(
data = np.reshape(data3d.data, (186, 73, 256, 256) )
)
to load to a 4D datacube.
Thanks a lot for your quick reply. That worked.