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.Reader

file_path: filepath to dm3 file.

Methods

can_read

Checks whether the provided file can be read by this reader.

get_dimensions

get_filename

get_raw

get_tags

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

set_data_type

Attributes

data

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

str

: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.

read()[source]

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 of sidpy.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