SciFiReaders.readers.microscopy.em.tem.dm_reader.DMReader#

class SciFiReaders.readers.microscopy.em.tem.dm_reader.DMReader(file_path, verbose=False)[source]#

Bases: Reader

Reader of Digital Micrograph image and spectroscopy data

This reader reads (attribute read) all the different data in the file and returns it as a dictionary of sidpy.Datasets

Parameter:#

file_path: str

filepath to dm3 or dm4 file.

Return:#

datasets: dict

dictionary of sidpy datasets

param file_path:

Path to the file that needs to be read

type file_path:

str

self._input_file_path#

Path to the file that will be read

Type:

str

Notes

  • This method will check to make sure that the provided file_path is indeed a string and a valid file path.

  • Consider calling can_read() within __init__() for validating the provided file

raises FileNotFoundError:

Methods

can_read

close

Close the DM file.

extract_crucial_metadata

Extracts crucial metadata from the original_metadata dictionary.

get_dataset

Reads dictionary of imageList into sidpy.Dataset

get_filename

Gets the filename of the DM file.

get_raw

Extracts data as np array

get_tags

Gets the tags from the DM file.

read

Read the DM file and extract metadata.

set_data_type

Sets the data type of the dataset based on its shape and metadata.

set_dimensions

Sets the dimensions of the dataset.

Attributes

filename

Gets the filename of the DM file.

tags

Gets the tags from the DM file.

close()[source]#

Close the DM file.

extract_crucial_metadata(dataset_key)[source]#

Extracts crucial metadata from the original_metadata dictionary.

property filename#

Gets the filename of the DM file.

get_dataset(image_dict) Dataset[source]#

Reads dictionary of imageList into sidpy.Dataset

get_filename()[source]#

Gets the filename of the DM file.

get_raw(image_dict)[source]#

Extracts data as np array

get_tags()[source]#

Gets the tags from the DM file.

read()[source]#

Read the DM file and extract metadata.

set_data_type(dataset)[source]#

Sets the data type of the dataset based on its shape and metadata.

set_dimensions(dataset)[source]#

Sets the dimensions of the dataset.

property tags#

Gets the tags from the DM file.