ncempy.io.dectris module¶
This module provides an interface to Dectris Arina data sets
- class ncempy.io.dectris.fileDECTRIS(filename, bad_pixels=None, verbose=False)[source]¶
Bases:
objectClass to represent Dectris Arina data sets
- Variables:
raw_shape (list) – The shape of the raw data. This is three-dimensional: [num_frames, frameY, frameX].
data_shape (list) – The four-dimensional shape of the dataset. By default, the scanned region is square.
file_hdl (h5py.File) – The h5py file handle which provides direct access to the underlying hdf5 file structure.
data_type (numpy.dtype) – The data type of the values in the data set.
- getMetadata()[source]¶
The dectris Arina files sometimes output an extra file with metadata in it. This checks for that file and reads the meta data if if exists. The units are assumed to be nanometers.
- Returns:
Meta data as a dictionary
- Return type:
- remove_bad_pixels(data, value=0, bad_pixels=None)[source]¶
Some pixels are known to be very high or very low. This function will replace the pixel values.
- Parameters:
data (numpy.ndarray) – The 4D-STEM data set
value (int or float) – The value to replace the bad pixels by.
bad_pixels (numpy.ndarray) – A m by 2 ndarray where m is the number of bad pixels and the locations are specified in order for frame axis 2 and 3.