hyperspy.io_plugins.tiff module

hyperspy.io_plugins.tiff.axes_label_codes = {'A': 'angle', 'C': 'color|em-wavelength|channel', 'E': 'ex-wavelength|lambda', 'F': 'phase', 'H': 'lifetime', 'I': 'image series', 'L': 'exposure', 'P': 'plane', 'Q': <undefined>, 'R': 'region|tile', 'S': 'sample', 'T': 'time', 'V': 'event', 'X': 'width', 'Y': 'height', 'Z': 'depth', '_': <undefined>}
hyperspy.io_plugins.tiff.default_extension = 0
hyperspy.io_plugins.tiff.description = "Import/Export standard image formats Christoph Gohlke's tifffile library"
hyperspy.io_plugins.tiff.file_extensions = ['tif', 'tiff']
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.

hyperspy.io_plugins.tiff.format_name = 'TIFF'
hyperspy.io_plugins.tiff.full_support = False
hyperspy.io_plugins.tiff.get_metadata_mapping(tiff_page, op)
hyperspy.io_plugins.tiff.get_tvips_mapping(mapped_magnification)
hyperspy.io_plugins.tiff.mapping_cz_sem = {'CZ_SEM.ap_actualkv': ('Acquisition_instrument.SEM.beam_energy', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_beam_current': ('Acquisition_instrument.SEM.beam_current', <function <lambda>>), 'CZ_SEM.ap_date': ('General.date', <function <lambda>>), 'CZ_SEM.ap_mag': ('Acquisition_instrument.SEM.magnification', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_stage_at_r': ('Acquisition_instrument.SEM.Stage.rotation', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_stage_at_t': ('Acquisition_instrument.SEM.Stage.tilt', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_stage_at_x': ('Acquisition_instrument.SEM.Stage.x', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_stage_at_y': ('Acquisition_instrument.SEM.Stage.y', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_stage_at_z': ('Acquisition_instrument.SEM.Stage.z', <function _parse_tuple_Zeiss>), 'CZ_SEM.ap_time': ('General.time', <function <lambda>>), 'CZ_SEM.ap_wd': ('Acquisition_instrument.SEM.working_distance', <function <lambda>>), 'CZ_SEM.dp_dwell_time': ('Acquisition_instrument.SEM.dwell_time', <function <lambda>>), 'CZ_SEM.sv_serial_number': ('Acquisition_instrument.SEM.microscope', <function _parse_tuple_Zeiss>), 'CZ_SEM.sv_user_name': ('General.authors', <function _parse_tuple_Zeiss>)}
hyperspy.io_plugins.tiff.mapping_fei = {'fei_metadata.Beam.HV': ('Acquisition_instrument.SEM.beam_energy', <function <lambda>>), 'fei_metadata.EBeam.BeamCurrent': ('Acquisition_instrument.SEM.beam_current', <function _parse_beam_current_FEI>), 'fei_metadata.Scan.Dwelltime': ('Acquisition_instrument.SEM.dwell_time', None), 'fei_metadata.Stage.StageR': ('Acquisition_instrument.SEM.Stage.rotation', None), 'fei_metadata.Stage.StageT': ('Acquisition_instrument.SEM.Stage.tilt', None), 'fei_metadata.Stage.StageX': ('Acquisition_instrument.SEM.Stage.x', None), 'fei_metadata.Stage.StageY': ('Acquisition_instrument.SEM.Stage.y', None), 'fei_metadata.Stage.StageZ': ('Acquisition_instrument.SEM.Stage.z', None), 'fei_metadata.Stage.WorkingDistance': ('Acquisition_instrument.SEM.working_distance', <function <lambda>>), 'fei_metadata.System.SystemType': ('Acquisition_instrument.SEM.microscope', None), 'fei_metadata.User.Date': ('General.date', <function <lambda>>), 'fei_metadata.User.Time': ('General.time', <function <lambda>>), 'fei_metadata.User.User': ('General.authors', None)}
hyperspy.io_plugins.tiff.ureg = <pint.registry.UnitRegistry object>
hyperspy.io_plugins.tiff.writes = [(2, 0), (2, 1)]