hyperspy.io_plugins.tiff module
- hyperspy.io_plugins.tiff._axes_defaults()
Get default axes dictionaries, with offsets and scales
- hyperspy.io_plugins.tiff._build_axes_dictionaries(shape, names=None, scales=None, offsets=None, units=None)
Build axes dictionaries from a set of lists
- hyperspy.io_plugins.tiff._get_hamamatsu_streak_description(tiff, op)
Extract a dictionary recursively from the ImageDescription Metadata field in a Hamamatsu Streak .tiff file
- hyperspy.io_plugins.tiff._get_scale_unit(signal, encoding=None)
Return a list of scales and units, the length of the list is equal to the signal dimension.
- hyperspy.io_plugins.tiff._get_tags_dict(signal, extratags=[], factor=100000000)
Get the tags to export the scale and the unit to be used in Digital Micrograph and ImageJ.
- hyperspy.io_plugins.tiff._imagej_description(version='1.11a', **kwargs)
Return a string that will be used by ImageJ to read the unit when appropriate arguments are provided
- hyperspy.io_plugins.tiff._is_streak_hamamatsu(op) bool
Determines whether a .tiff page is likely to be a hamamatsu streak file based on the original op content.
- hyperspy.io_plugins.tiff._order_axes_by_name(names: list, scales: dict, offsets: dict, units: dict)
order axes by names in lists
- hyperspy.io_plugins.tiff.file_reader(filename, force_read_resolution=False, lazy=False, **kwds)
Read data from tif files using Christoph Gohlke’s tifffile library. The units and the scale of images saved with ImageJ or Digital Micrograph is read. There is limited support for reading the scale of files created with Zeiss and FEI SEMs.
- Parameters:
filename (str) – Name of the file to read
force_read_resolution (bool) – Force reading the x_resolution, y_resolution and the resolution_unit of the tiff tags. See http://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html Default is False.
lazy (bool) – Load the data lazily. Default is False
**kwds –
optional –
- hyperspy.io_plugins.tiff.file_writer(filename, signal, export_scale=True, extratags=[], **kwds)
Writes data to tif using Christoph Gohlke’s tifffile library