hyperspy.io_plugins.tiff module

class hyperspy.io_plugins.tiff.Metadata(original_metadata)

Bases: object

get_additional_metadata()
get_mapping_FEI()
get_mapping_TVIPS()
get_mapping_Zeiss()
hyperspy.io_plugins.tiff.file_reader(filename, record_by='image', force_read_resolution=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) –
  • record_by ({'image'}) – Has no effect because this format only supports recording by image.
  • force_read_resolution (Bool) – Default: False. 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
  • optional (**kwds,) –
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. If the scikit-image version is too old, use the hyperspy embedded tifffile library to allow exporting the scale and the unit.