createc.DAT_IMG¶
- class createc.DAT_IMG(file_path=None, file_binary=None, file_name=None)¶
Read .dat file and generate meta data and images as numpy arrays.
There are two options for input:
option 1: one arg, i.e. the full path to the .dat file
option 2: two named args
the binary content of the file together
the file_name as a string
- Parameters:
file_path (str) – the full path to the .dat file
file_binary (bin) – the binary content of the file together
file_name (str) – the file_name as a string
- Returns:
dat_img – dat_file_object with meta data and image numpy arrays. Meta data is a dict, one can expand the dict at will. Images are a list of numpy arrays.
- Return type:
- __init__(file_path=None, file_binary=None, file_name=None)¶
Methods
__init__([file_path, file_binary, file_name])meta_keys()Print all available keys in meta
Attributes
datetimeReturn datetime objext of the file using the file name
nom_sizeReturn the nominal size of image in angstrom in namedtuple (x, y) assuming no pre-termination while scanning.
offsetReturn offset relatvie to the whole range in angstrom in the format of namedtuple (x, y)
sizeReturn the true size of image in angstrom in namedtuple (x, y)
timestampSame as datetime, but it converts to seconds since 1970, 1, 1.