Arina#

This is the file format used by the Dectris Arina detector. It stores 4D-STEM data. For each scan, the detector writes one master file, a series of datafiles labeled with integers, and newer versions include an additional metadata file. When loading data, the filename should be the master file.

Note

The hdf5plugin library is required for reading this file format.

API functions#

rsciio.arina.file_reader(filename, lazy=False, navigation_shape=None, rebin_diffraction=1, dtype=None, flatfield=None)#

Read arina 4D-STEM datasets.

Parameters:
filenamestr, pathlib.Path

Filename of the file to read or corresponding pathlib.Path.

lazybool, default=False

Lazy loading is not supported.

navigation_shapetuple or int or None, default = None

Specify the shape of the navigation space. If None, assumes square acquisition. A tuple can be specified as (x_scan_dimension, y_scan_dimension), (x_scan_dimension, “auto”), or (“auto”, y_scan_dimension). With “auto” the length is inferred from the number of diffraction patterns. If only an integer is passed, it assumed to be the x_scan_dimension.

rebin_diffractionint, default=1

Diffraction space binning factor for bin-on-load.

dtypefloat, optional

Datatype for dataset.

flatfieldnumpy.ndarray, optional

Flatfield for correction factors, converts data to float.

Returns:
list of dict

List of dictionaries containing the following fields:

  • ‘data’ – multidimensional numpy.ndarray or dask.array.Array

  • ‘axes’ – list of dictionaries describing the axes containing the fields ‘name’, ‘units’, ‘index_in_array’, and either ‘size’, ‘offset’, and ‘scale’ or a numpy array ‘axis’ containing the full axes vector

  • ‘metadata’ – dictionary containing the parsed metadata

  • ‘original_metadata’ – dictionary containing the full metadata tree from the input file

When the file contains several datasets, each dataset will be loaded as separate dictionary.

Notes

The hdf5plugin library is needed in addition to h5py due to compression filters used by the detector when writing data.