SciFiReaders.readers.microscopy.em.tem.nion_reader.NionReader¶
- class SciFiReaders.readers.microscopy.em.tem.nion_reader.NionReader(file_path, verbose=False)[source]¶
Bases:
sidpy.sid.reader.Readerfile_path: filepath to dm3 file.
Methods
Checks whether the provided file can be read by this reader.
get_dimensionsget_filenameget_rawget_tagsExtracts the data and metadata from the provided file and embeds this information in one or more
sidpy.Datasetobjects that are returned from this methodset_data_typeAttributes
datafilenametags- can_read(*args, **kwargs)¶
Checks whether the provided file can be read by this reader.
This basic function compares the file extension against the
extensionkeyword 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
extensionkeyword 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.
- read()[source]¶
Extracts the data and metadata from the provided file and embeds this information in one or more
sidpy.Datasetobjects that are returned from this method- Returns
objs
- Return type
sidpy.Datasetor list ofsidpy.Datasetobjects
: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