hyperspy.tests.io package

Submodules

hyperspy.tests.io.generate_dm_testing_files module

Creates Digital Micrograph scripts to generate the dm3 testing files

hyperspy.tests.io.generate_dm_testing_files.generate_1D_files(f, data_types, dmversion)
hyperspy.tests.io.generate_dm_testing_files.generate_2D_files(f, data_types, dmversion)
hyperspy.tests.io.generate_dm_testing_files.generate_3D_files(f, data_types, dmversion)
hyperspy.tests.io.generate_dm_testing_files.generate_4D_files(f, data_types, dmversion)

hyperspy.tests.io.test_bcf module

hyperspy.tests.io.test_bcf.test_fast_bcf()
hyperspy.tests.io.test_bcf.test_hyperspy_wrap()
hyperspy.tests.io.test_bcf.test_hyperspy_wrap_downsampled()
hyperspy.tests.io.test_bcf.test_load_16bit()
hyperspy.tests.io.test_bcf.test_load_16bit_reduced()
hyperspy.tests.io.test_bcf.test_load_8bit()

hyperspy.tests.io.test_blockfile module

hyperspy.tests.io.test_blockfile.test_crop_notes()
hyperspy.tests.io.test_blockfile.test_default_header()
hyperspy.tests.io.test_blockfile.test_different_x_y_scale_units()
hyperspy.tests.io.test_blockfile.test_load1()
hyperspy.tests.io.test_blockfile.test_load2()
hyperspy.tests.io.test_blockfile.test_load_inplace()
hyperspy.tests.io.test_blockfile.test_load_memmap()
hyperspy.tests.io.test_blockfile.test_load_readonly()
hyperspy.tests.io.test_blockfile.test_load_to_memory()
hyperspy.tests.io.test_blockfile.test_non_square()
hyperspy.tests.io.test_blockfile.test_save_load_cycle()
hyperspy.tests.io.test_blockfile.test_write_cutoff()
hyperspy.tests.io.test_blockfile.test_write_data_am_mismatch()
hyperspy.tests.io.test_blockfile.test_write_data_line()
hyperspy.tests.io.test_blockfile.test_write_data_single()
hyperspy.tests.io.test_blockfile.test_write_fresh()

hyperspy.tests.io.test_dens module

hyperspy.tests.io.test_dens.test_read1()
hyperspy.tests.io.test_dens.test_read2(*arg, **kw)
hyperspy.tests.io.test_dens.test_read3(*arg, **kw)

hyperspy.tests.io.test_dm3 module

hyperspy.tests.io.test_dm3.check_content(dat1, dat2, subfolder, key)
hyperspy.tests.io.test_dm3.check_dtype(d1, d2, i)
hyperspy.tests.io.test_dm3.check_load(filename, subfolder, key)
hyperspy.tests.io.test_dm3.test_content()
hyperspy.tests.io.test_dm3.test_dtypes()
hyperspy.tests.io.test_dm3.test_loading()

hyperspy.tests.io.test_dm4 module

hyperspy.tests.io.test_dm4.check_content(dat1, dat2, subfolder, key)
hyperspy.tests.io.test_dm4.check_dtype(d1, d2, i)
hyperspy.tests.io.test_dm4.check_load(filename, subfolder, key)
hyperspy.tests.io.test_dm4.test_content()
hyperspy.tests.io.test_dm4.test_dtypes()
hyperspy.tests.io.test_dm4.test_loading()

hyperspy.tests.io.test_dm_stackbuilder_plugin module

class hyperspy.tests.io.test_dm_stackbuilder_plugin.TestStackBuilder

Bases: object

test_load_stackbuilder_imagestack()

hyperspy.tests.io.test_emd module

class hyperspy.tests.io.test_emd.TestCaseSaveAndRead

Bases: object

tearDown()
test_save_and_read()
hyperspy.tests.io.test_emd.test_image_2d_loading()
hyperspy.tests.io.test_emd.test_metadata()
hyperspy.tests.io.test_emd.test_signal_3d_loading()
hyperspy.tests.io.test_emd.test_spectrum_1d_loading()

hyperspy.tests.io.test_fei module

class hyperspy.tests.io.test_fei.TestFEIReader

Bases: object

setUp()
test_guess_units_from_mode()
test_load_acquire()
test_load_diffraction_area_scan()
test_load_diffraction_line_scan()
test_load_diffraction_point()
test_load_emi_old_new_format()
test_load_image_content()
test_load_ser_reader_old_new_format()
test_load_spectrum_area_scan()
test_load_spectrum_area_scan_not_square()
test_load_spectrum_line_scan()
test_load_spectrum_point()
test_load_stack_image_preview()
test_load_units_scale()
test_read_STEM_TEM_mode()

hyperspy.tests.io.test_hdf5 module

class hyperspy.tests.io.test_hdf5.Example1

Bases: object

test_data()
test_original_metadata()
class hyperspy.tests.io.test_hdf5.TestAxesConfiguration

Bases: object

setUp()
tearDown()
test_axes_configuration()
class hyperspy.tests.io.test_hdf5.TestExample1_10

Bases: hyperspy.tests.io.test_hdf5.Example1

setUp()
class hyperspy.tests.io.test_hdf5.TestExample1_11

Bases: hyperspy.tests.io.test_hdf5.Example1

setUp()
class hyperspy.tests.io.test_hdf5.TestLoadingNewSavedMetadata

Bases: object

setUp()
test_binary_string()
test_empty_things()
test_inside_things()
test_signal_inside()
test_simple_things()
class hyperspy.tests.io.test_hdf5.TestLoadingOOMReadOnly

Bases: object

setUp()
tearDown()
test_oom_loading()
class hyperspy.tests.io.test_hdf5.TestPassingArgs

Bases: object

setUp()
tearDown()
test_compression_opts()
class hyperspy.tests.io.test_hdf5.TestSavingMetadataContainers

Bases: object

setUp()
tearDown()
test_general_type_not_working()
test_numpy_general_type()
test_numpy_only_inner_lists()
test_save_long_list(*arg, **kw)
test_save_unicode()
test_unsupported_type()
hyperspy.tests.io.test_hdf5.test_none_metadata()
hyperspy.tests.io.test_hdf5.test_rgba16()
hyperspy.tests.io.test_hdf5.test_strings_from_py2()

hyperspy.tests.io.test_msa module

class hyperspy.tests.io.test_msa.TestExample1

Bases: object

setUp()
test_data()
test_parameters()
class hyperspy.tests.io.test_msa.TestExample2

Bases: object

setUp()
test_data()
test_parameters()

hyperspy.tests.io.test_ripple module

hyperspy.tests.io.test_ripple.generate_files()

Generate the test files that are distributed with HyperSpy.

Unless new features are introduced there shouldn’t be any need to recreate the files.

hyperspy.tests.io.test_ripple.test_ripple()

hyperspy.tests.io.test_semper_unf module

class hyperspy.tests.io.test_semper_unf.TestCaseSaveAndReadByte

Bases: object

tearDown()
test_save_and_read()
class hyperspy.tests.io.test_semper_unf.TestCaseSaveAndReadImage

Bases: object

tearDown()
test_save_and_read()
hyperspy.tests.io.test_semper_unf.test_image_2d_loading()
hyperspy.tests.io.test_semper_unf.test_image_byte_loading()
hyperspy.tests.io.test_semper_unf.test_image_complex_loading()
hyperspy.tests.io.test_semper_unf.test_image_int16_loading()
hyperspy.tests.io.test_semper_unf.test_image_int32_loading()
hyperspy.tests.io.test_semper_unf.test_no_label_loading()
hyperspy.tests.io.test_semper_unf.test_signal_3d_loading()
hyperspy.tests.io.test_semper_unf.test_spectrum_1d_loading()
hyperspy.tests.io.test_semper_unf.test_with_title_loading()

hyperspy.tests.io.test_tiff module

hyperspy.tests.io.test_tiff.test_read_BW_Zeiss_optical_scale_metadata()
hyperspy.tests.io.test_tiff.test_read_BW_Zeiss_optical_scale_metadata2()
hyperspy.tests.io.test_tiff.test_read_BW_Zeiss_optical_scale_metadata3()
hyperspy.tests.io.test_tiff.test_read_FEI_SEM_scale_metadata_16bits()
hyperspy.tests.io.test_tiff.test_read_FEI_SEM_scale_metadata_8bits()
hyperspy.tests.io.test_tiff.test_read_RGB_Zeiss_optical_scale_metadata()
hyperspy.tests.io.test_tiff.test_read_Zeiss_SEM_scale_metadata_1k_image()
hyperspy.tests.io.test_tiff.test_read_Zeiss_SEM_scale_metadata_512_image()
hyperspy.tests.io.test_tiff.test_read_unit_from_DM_stack(import_local_tifffile=False)
hyperspy.tests.io.test_tiff.test_read_unit_from_dm()

Use skimage tifffile.py library

hyperspy.tests.io.test_tiff.test_read_unit_from_dm_local_tifffile()

Use local tifffile.py library

hyperspy.tests.io.test_tiff.test_read_unit_from_imagej()

Use skimage tifffile.py library

hyperspy.tests.io.test_tiff.test_read_unit_from_imagej_local_tifffile()

Use local tifffile.py library

hyperspy.tests.io.test_tiff.test_read_unit_from_imagej_no_scale(import_local_tifffile=False)
hyperspy.tests.io.test_tiff.test_read_unit_from_imagej_stack(import_local_tifffile=False)
hyperspy.tests.io.test_tiff.test_read_unit_from_imagej_stack_no_scale(import_local_tifffile=False)
hyperspy.tests.io.test_tiff.test_read_unit_um()
hyperspy.tests.io.test_tiff.test_rgba16()

Use skimage tifffile.py library

hyperspy.tests.io.test_tiff.test_rgba16_local_tifffile()

Use local tifffile.py library

hyperspy.tests.io.test_tiff.test_saving_loading_stack_no_scale()
hyperspy.tests.io.test_tiff.test_saving_with_custom_tag()
hyperspy.tests.io.test_tiff.test_write_read_unit_imagej(import_local_tifffile=True)
hyperspy.tests.io.test_tiff.test_write_read_unit_imagej_with_description(import_local_tifffile=True)
hyperspy.tests.io.test_tiff.test_write_scale_unit()
hyperspy.tests.io.test_tiff.test_write_scale_unit_image_stack()

Lazy test, still need to open the files in ImageJ or DM to check if the scale and unit are correct

hyperspy.tests.io.test_tiff.test_write_scale_unit_no_export_scale()
hyperspy.tests.io.test_tiff.test_write_scale_unit_not_square_pixel()

Lazy test, still need to open the files in ImageJ or DM to check if the scale and unit are correct

hyperspy.tests.io.test_tiff.test_write_scale_with_um_unit()

Lazy test, still need to open the files in ImageJ or DM to check if the scale and unit are correct

hyperspy.tests.io.test_tiff.test_write_scale_with_undefined_scale()

Lazy test, still need to open the files in ImageJ or DM to check if the scale and unit are correct

hyperspy.tests.io.test_tiff.test_write_scale_with_undefined_unit()

Lazy test, still need to open the files in ImageJ or DM to check if the scale and unit are correct

Module contents