hyperspy.io_plugins.tiff module

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.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
hyperspy.io_plugins.tiff.file_writer(filename, signal, export_scale=True, extratags=[], **kwds)

Writes data to tif using Christoph Gohlke’s tifffile library

Parameters
  • filename (str) –

  • signal (a BaseSignal instance) –

  • export_scale (bool) – default: True Export the scale and the units (compatible with DM and ImageJ) to appropriate tags.