py4dstem / py4DSTEM

GNU General Public License v3.0
201 stars 136 forks source link

Is that possible to read .raw data into the datacube structure? #450

Closed ZOUCHEN158 closed 1 year ago

ZOUCHEN158 commented 1 year ago

Actually, we get the data with ".raw" not ".h5", what should we do to transform it to ".h5". Maybe other ways to import the ".raw" files? Thanks in advance.

sezelt commented 1 year ago

What detector are you using to produce the .raw file?

ZOUCHEN158 commented 1 year ago

EMPAD

sezelt commented 1 year ago

You can read EMPAD-G1 data using py4DSTEM.import_file(filepath). If your scan was not square, you have to specify the size like this: py4DSTEM.import_file(filepath, EMPAD_shape=(size_x,size_y)). EMPAD-G2 support will be available in the near future.

ZOUCHEN158 commented 1 year ago

Should I transform the importfile(.raw) into .h5? I want to do some DPC test.

sezelt commented 1 year ago

Once you run dataset = py4DSTEM.import_file(filepath), the data is loaded and you can do your DPC analysis (exactly the same as if the data was loaded from an h5 file). You could save the data as an h5 file if you wanted to, which would have the benefit of including any calibrations that you add to the data.

ZOUCHEN158 commented 1 year ago

thanks a lot!