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_decimal_regex
()¶
-
hyperspy.tests.io.test_bcf.
test_fast_bcf
()¶
-
hyperspy.tests.io.test_bcf.
test_get_mode
()¶
-
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_bcf.
test_wrong_file
()¶
hyperspy.tests.io.test_blockfile module¶
-
hyperspy.tests.io.test_blockfile.
save_path
()¶
-
hyperspy.tests.io.test_blockfile.
test_crop_notes
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_default_header
()¶
-
hyperspy.tests.io.test_blockfile.
test_different_x_y_scale_units
(save_path)¶
-
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_lazy
()¶
-
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
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_save_load_cycle
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_write_cutoff
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_write_data_am_mismatch
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_write_data_line
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_write_data_single
(save_path)¶
-
hyperspy.tests.io.test_blockfile.
test_write_fresh
(save_path)¶
hyperspy.tests.io.test_dens module¶
-
hyperspy.tests.io.test_dens.
test_read1
()¶
-
hyperspy.tests.io.test_dens.
test_read2
()¶
-
hyperspy.tests.io.test_dens.
test_read3
()¶
hyperspy.tests.io.test_dm3 module¶
-
class
hyperspy.tests.io.test_dm3.
TestImageObject
¶ Bases:
object
-
setup_method
(method)¶
-
test_get_date
()¶
-
test_get_microscope_name
()¶
-
test_get_time
()¶
-
test_parse_string
()¶
-
-
hyperspy.tests.io.test_dm3.
generate_parameters
()¶
-
hyperspy.tests.io.test_dm3.
test_data
(pdict)¶
-
hyperspy.tests.io.test_dm3.
test_location
()¶
-
hyperspy.tests.io.test_dm3.
test_missing_tag
()¶
-
hyperspy.tests.io.test_dm3.
test_read_Diffraction_metadata
()¶
-
hyperspy.tests.io.test_dm3.
test_read_EDS_metadata
()¶
-
hyperspy.tests.io.test_dm3.
test_read_EELS_metadata
()¶
-
hyperspy.tests.io.test_dm3.
test_read_STEM_metadata
()¶
-
hyperspy.tests.io.test_dm3.
test_read_TEM_metadata
()¶
hyperspy.tests.io.test_dm_stackbuilder_plugin module¶
hyperspy.tests.io.test_edax module¶
-
class
hyperspy.tests.io.test_edax.
TestSpcSpectrum_v061_xrf
¶ Bases:
object
-
classmethod
setup_class
()¶
-
classmethod
teardown_class
()¶
-
test_axes
()¶
-
test_data
()¶
-
test_load_all_spc
()¶
-
test_parameters
()¶
-
classmethod
-
class
hyperspy.tests.io.test_edax.
TestSpcSpectrum_v070_eds
¶ Bases:
object
-
classmethod
setup_class
()¶
-
classmethod
teardown_class
()¶
-
test_axes
()¶
-
test_data
()¶
-
test_load_all_spc
()¶
-
test_parameters
()¶
-
classmethod
-
class
hyperspy.tests.io.test_edax.
TestSpdMap_061_xrf
¶ Bases:
object
-
classmethod
setup_class
()¶
-
classmethod
teardown_class
()¶
-
test_axes
()¶
-
test_data
()¶
-
test_ipr_reading
()¶
-
test_parameters
()¶
-
test_spc_reading
()¶
-
classmethod
-
class
hyperspy.tests.io.test_edax.
TestSpdMap_070_eds
¶ Bases:
object
-
classmethod
setup_class
()¶
-
classmethod
teardown_class
()¶
-
test_axes
()¶
-
test_data
()¶
-
test_ipr_reading
()¶
-
test_parameters
()¶
-
test_spc_reading
()¶
-
classmethod
-
hyperspy.tests.io.test_edax.
setup_module
()¶
-
hyperspy.tests.io.test_edax.
teardown_module
()¶
hyperspy.tests.io.test_emd module¶
-
class
hyperspy.tests.io.test_emd.
TestCaseSaveAndRead
¶ Bases:
object
-
teardown_method
(method)¶
-
test_save_and_read
()¶
-
-
class
hyperspy.tests.io.test_emd.
TestMinimalSave
¶ Bases:
object
-
setup_method
(method)¶
-
test_minimal_save
()¶
-
-
hyperspy.tests.io.test_emd.
test_data_axis_length_1
()¶
-
hyperspy.tests.io.test_emd.
test_data_numpy_object_dtype
()¶
-
hyperspy.tests.io.test_emd.
test_image_2d_loading
()¶
-
hyperspy.tests.io.test_emd.
test_metadata
()¶
-
hyperspy.tests.io.test_emd.
test_metadata_with_bytes_string
()¶
-
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_method
(method)¶
-
test_date_time
()¶
-
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_multisignal_stack
()¶
-
test_load_multisignal_stack_mismatch
()¶
-
test_load_search
()¶
-
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_metadata_STEM
()¶
-
test_metadata_TEM
()¶
-
test_metadata_diffraction
()¶
-
test_read_STEM_TEM_mode
()¶
-
hyperspy.tests.io.test_hdf5 module¶
-
class
hyperspy.tests.io.test_hdf5.
TestAxesConfiguration
¶ Bases:
object
-
setup_method
(method)¶
-
teardown_method
(method)¶
-
test_axes_configuration
()¶
-
-
class
hyperspy.tests.io.test_hdf5.
TestExample1_10
¶ Bases:
hyperspy.tests.io.test_hdf5.Example1
-
setup_method
(method)¶
-
-
class
hyperspy.tests.io.test_hdf5.
TestExample1_11
¶ Bases:
hyperspy.tests.io.test_hdf5.Example1
-
setup_method
(method)¶
-
-
class
hyperspy.tests.io.test_hdf5.
TestExample1_12
¶ Bases:
hyperspy.tests.io.test_hdf5.Example1
-
setup_method
(method)¶
-
test_date
()¶
-
test_time
()¶
-
-
class
hyperspy.tests.io.test_hdf5.
TestLoadingNewSavedMetadata
¶ Bases:
object
-
setup_method
(method)¶
-
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_method
(method)¶
-
teardown_method
(method)¶
-
test_oom_loading
()¶
-
-
class
hyperspy.tests.io.test_hdf5.
TestPassingArgs
¶ Bases:
object
-
setup_method
(method)¶
-
teardown_method
(method)¶
-
test_compression_opts
()¶
-
-
class
hyperspy.tests.io.test_hdf5.
TestSavingMetadataContainers
¶ Bases:
object
-
setup_method
(method)¶
-
test_date_time
(tmpfilepath)¶
-
test_general_metadata
(tmpfilepath)¶
-
test_general_type_not_working
(tmpfilepath)¶
-
test_metadata_update_to_v3_0
()¶
-
test_numpy_general_type
(tmpfilepath)¶
-
test_numpy_only_inner_lists
(tmpfilepath)¶
-
test_quantity
(tmpfilepath)¶
-
test_save_long_list
(tmpfilepath)¶
-
test_save_unicode
(tmpfilepath)¶
-
test_unsupported_type
(tmpfilepath)¶
-
-
class
hyperspy.tests.io.test_hdf5.
Test_permanent_markers_io
¶ Bases:
object
-
test_load_missing_y2_value
()¶
-
test_load_unknown_marker_type
()¶
-
test_save_load_empty_metadata_markers
(mpl_cleanup)¶
-
test_save_load_horizontal_line_marker
(mpl_cleanup)¶
-
test_save_load_horizontal_line_segment_marker
(mpl_cleanup)¶
-
test_save_load_line_segment_marker
(mpl_cleanup)¶
-
test_save_load_permanent_marker
(mpl_cleanup)¶
-
test_save_load_permanent_marker_all_types
(mpl_cleanup)¶
-
test_save_load_point_marker
(mpl_cleanup)¶
-
test_save_load_rectangle_marker
(mpl_cleanup)¶
-
test_save_load_text_marker
(mpl_cleanup)¶
-
test_save_load_vertical_line_marker
(mpl_cleanup)¶
-
test_save_load_vertical_line_segment_marker
(mpl_cleanup)¶
-
test_save_permanent_marker
(mpl_cleanup)¶
-
-
hyperspy.tests.io.test_hdf5.
test_lazy_metadata_arrays
(tmpfilepath)¶
-
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_hdf5.
tmpfilepath
()¶
hyperspy.tests.io.test_io module¶
-
class
hyperspy.tests.io.test_io.
TestIOOverwriting
¶ Bases:
object
-
setup_method
(method)¶
-
teardown_method
(method)¶
-
test_io_overwriting_False
()¶
-
test_io_overwriting_None_existing_file_n
()¶
-
test_io_overwriting_None_existing_file_y
()¶
-
test_io_overwriting_True
()¶
-
test_io_overwriting_no_existing_file
(overwrite)¶
-
hyperspy.tests.io.test_msa module¶
-
class
hyperspy.tests.io.test_msa.
TestExample1
¶ Bases:
object
-
setup_method
(method)¶
-
test_data
()¶
-
test_metadata
()¶
-
test_parameters
()¶
-
test_write_load_cycle
()¶
-
-
class
hyperspy.tests.io.test_msa.
TestExample2
¶ Bases:
object
-
setup_method
(method)¶
-
test_data
()¶
-
test_metadata
()¶
-
test_parameters
()¶
-
test_write_load_cycle
()¶
-
-
hyperspy.tests.io.test_msa.
test_minimum_metadata_example
()¶
hyperspy.tests.io.test_protochips module¶
-
class
hyperspy.tests.io.test_protochips.
TestProtochipsElectricalCSVReader
¶ Bases:
object
-
setup_method
(method)¶
-
test_read_column_name
()¶
-
test_read_data
()¶
-
test_read_start_datetime
()¶
-
-
class
hyperspy.tests.io.test_protochips.
TestProtochipsElectrothermalCSVReader
¶ Bases:
object
-
setup_method
(method)¶
-
test_read_column_name
()¶
-
test_read_data
()¶
-
test_read_start_datetime
()¶
-
-
class
hyperspy.tests.io.test_protochips.
TestProtochipsGasCellCSV
¶ Bases:
object
-
setup_method
(method)¶
-
test_read_metadata
()¶
-
test_read_original_metadata
()¶
-
-
class
hyperspy.tests.io.test_protochips.
TestProtochipsGasCellCSVNoUser
¶ Bases:
object
-
setup_method
(method)¶
-
test_read_metadata
()¶
-
test_read_original_metadata
()¶
-
-
class
hyperspy.tests.io.test_protochips.
TestProtochipsGasCellCSVReader
¶ Bases:
object
-
setup_method
(method)¶
-
test_read_column_name
()¶
-
test_read_data
()¶
-
test_read_metadata_header
()¶
-
test_read_start_datetime
()¶
-
-
class
hyperspy.tests.io.test_protochips.
TestProtochipsThermallCSVReader
¶ Bases:
object
-
setup_method
(method)¶
-
test_read_column_name
()¶
-
test_read_data
()¶
-
test_read_start_datetime
()¶
-
-
hyperspy.tests.io.test_protochips.
create_numpy_file
(filename, obj)¶
-
hyperspy.tests.io.test_protochips.
get_datetime
(dt)¶
-
hyperspy.tests.io.test_protochips.
test_loading_invalid_protochips_file
()¶
-
hyperspy.tests.io.test_protochips.
test_loading_random_csv_file
()¶
-
hyperspy.tests.io.test_protochips.
test_read_protochips_electrical
()¶
-
hyperspy.tests.io.test_protochips.
test_read_protochips_electrothermal
()¶
-
hyperspy.tests.io.test_protochips.
test_read_protochips_gas_cell
()¶
-
hyperspy.tests.io.test_protochips.
test_read_protochips_thermal
()¶
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.
generate_parameters
()¶
-
hyperspy.tests.io.test_ripple.
test_data
(pdict)¶
-
hyperspy.tests.io.test_ripple.
test_write_unsupported_data_shape
()¶
-
hyperspy.tests.io.test_ripple.
test_write_unsupported_data_type
()¶
-
hyperspy.tests.io.test_ripple.
test_write_with_metadata
()¶
-
hyperspy.tests.io.test_ripple.
test_write_without_metadata
()¶
hyperspy.tests.io.test_semper_unf module¶
-
class
hyperspy.tests.io.test_semper_unf.
TestCaseSaveAndReadByte
¶ Bases:
object
-
teardown_method
(method)¶
-
test_save_and_read
()¶
-
-
class
hyperspy.tests.io.test_semper_unf.
TestCaseSaveAndReadImage
¶ Bases:
object
-
teardown_method
(method)¶
-
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_semper_unf.
test_writing_loading_metadata
()¶
-
hyperspy.tests.io.test_semper_unf.
test_writing_unsupported_data_type
()¶
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_TVIPS_metadata
()¶
-
hyperspy.tests.io.test_tiff.
test_read_Zeiss_SEM_scale_metadata_1k_image
()¶
-
hyperspy.tests.io.test_tiff.
test_read_unit_from_DM_stack
()¶
-
hyperspy.tests.io.test_tiff.
test_read_unit_from_imagej
()¶
-
hyperspy.tests.io.test_tiff.
test_read_unit_from_imagej_no_scale
()¶
-
hyperspy.tests.io.test_tiff.
test_read_unit_from_imagej_stack
()¶
-
hyperspy.tests.io.test_tiff.
test_read_unit_from_imagej_stack_no_scale
()¶
-
hyperspy.tests.io.test_tiff.
test_read_unit_um
()¶
-
hyperspy.tests.io.test_tiff.
test_rgba16
()¶
-
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_intensity_axes_DM
()¶
-
hyperspy.tests.io.test_tiff.
test_write_read_unit_imagej
()¶
-
hyperspy.tests.io.test_tiff.
test_write_read_unit_imagej_with_description
()¶
-
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