SciFiReaders.readers.microscopy.em.tem.dm_reader.DM3Reader¶
- class SciFiReaders.readers.microscopy.em.tem.dm_reader.DM3Reader(file_path, verbose=False)[source]¶
Bases:
SciFiReaders.readers.microscopy.em.tem.dm_reader.DMReader
- Parameters
file_path (str) – Path to the file that needs to be read
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
Methods
Checks whether the provided file can be read by this reader.
close
get_filename
Extracts data as np array
get_tags
Extracts the data and metadata from the provided file and embeds this information in one or more
sidpy.Dataset
objects that are returned from this methodset_data_type
set_dimensions
Attributes
Extracts data as np array
filename
tags
- can_read(*args, **kwargs)¶
Checks whether the provided file can be read by this reader.
This basic function compares the file extension against the
extension
keyword argument. If the extension matches, this function returns True- Parameters
extension (str or iterable of str, Optional. Default = None) – File extension for the input file.
- Returns
file_path – Path to the file that needs to be provided to read() if the provided file was indeed a valid file Else, None
- Return type
:raises NotImplementedError : if this function is called for this or a child: :raises class that does not provide the
extension
keyword argument:Notes
It is recommended to add additional checks as necessary to ensure that the translator can indeed read the given file such as by validating the headers or similar metadata.
- property data_cube¶
Extracts data as np array
- get_raw()¶
Extracts data as np array
- read()¶
Extracts the data and metadata from the provided file and embeds this information in one or more
sidpy.Dataset
objects that are returned from this method- Returns
objs
- Return type
sidpy.Dataset
or list ofsidpy.Dataset
objects
:raises NotImplementedError : if the child class does not implement this method:
Notes
Do not accept the file path at
read
. Use self._input_file_path when implementing this method