hyperspy.tests.signal package

Submodules

hyperspy.tests.signal.test_1D_tools module

class hyperspy.tests.signal.test_1D_tools.TestAlignTools

Bases: object

lazify(**kwargs)
setup_method(method)
test_align()
test_align_expand()
test_estimate_shift()
test_lazy_align()
test_lazy_align_expand()
test_lazy_estimate_shift()
test_lazy_shift1D()
test_shift1D()
class hyperspy.tests.signal.test_1D_tools.TestEstimatePeakWidth

Bases: object

lazify(**kwargs)
setup_method(method)
test_full_range()
test_lazy_full_range()
test_lazy_too_narrow_range()
test_lazy_two_peaks()
test_too_narrow_range()
test_two_peaks()
class hyperspy.tests.signal.test_1D_tools.TestFindPeaks1D

Bases: object

lazify(**kwargs)
setup_method(method)
test_height()
test_lazy_height()
test_lazy_maxpeaksn()
test_lazy_n_peaks()
test_lazy_single_spectrum()
test_lazy_two_spectra()
test_lazy_width()
test_maxpeaksn()
test_n_peaks()
test_single_spectrum()
test_two_spectra()
test_width()
class hyperspy.tests.signal.test_1D_tools.TestInterpolateInBetween

Bases: object

lazify(**kwargs)
setup_method(method)
test_delta_float()
test_delta_int()
test_lazy_delta_float()
test_lazy_delta_int()
test_lazy_single_spectrum()
test_lazy_single_spectrum_in_units()
test_lazy_two_spectra()
test_single_spectrum()
test_single_spectrum_in_units()
test_two_spectra()
class hyperspy.tests.signal.test_1D_tools.TestShift1D

Bases: object

lazify(**kwargs)
setup_method(method)
test_crop_left()
test_crop_right()
test_lazy_crop_left()
test_lazy_crop_right()
class hyperspy.tests.signal.test_1D_tools.TestSmoothing

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_lowess(parallel)
test_lazy_savgol()
test_lazy_tv(parallel)
test_lowess(parallel)
test_savgol()
test_tv(parallel)
hyperspy.tests.signal.test_1D_tools.test_hanning(lazy, offset)
hyperspy.tests.signal.test_1D_tools.test_hanning_wrong_type(float_data)

hyperspy.tests.signal.test_2D_tools module

class hyperspy.tests.signal.test_2D_tools.TestAlignTools

Bases: object

lazify(**kwargs)
setup_method(method)
test_align()
test_align_expand()
test_estimate_shift()
test_lazy_align()
test_lazy_align_expand()
test_lazy_estimate_shift()
class hyperspy.tests.signal.test_2D_tools.TestSubPixelAlign

Bases: object

lazify(**kwargs)
setup_method(method)
test_align_subpix()
test_lazy_align_subpix()
hyperspy.tests.signal.test_2D_tools.test_add_ramp()
hyperspy.tests.signal.test_2D_tools.test_add_ramp_lazy()

hyperspy.tests.signal.test_assign_subclass module

class hyperspy.tests.signal.test_assign_subclass.TestConvertBaseSignal

Bases: object

setup_method(method)
test_base_to_1d()
test_base_to_2d()
test_base_to_complex()
test_base_to_lazy()
class hyperspy.tests.signal.test_assign_subclass.TestConvertComplexSignal

Bases: object

setup_method(method)
test_complex_to_complex1d()
test_complex_to_complex2d()
class hyperspy.tests.signal.test_assign_subclass.TestConvertComplexSignal1D

Bases: object

setup_method(method)
test_complex_to_dielectric_function()
class hyperspy.tests.signal.test_assign_subclass.TestConvertSignal1D

Bases: object

setup_method(method)
test_lazy_to_eels_and_back()
test_signal1d_to_eds_sem()
test_signal1d_to_eds_tem()
test_signal1d_to_eels()
hyperspy.tests.signal.test_assign_subclass.test_assignment_class()
class hyperspy.tests.signal.test_assign_subclass.testcase(dtype, sig_dim, sig_type, cls)

Bases: tuple

cls

Alias for field number 3

dtype

Alias for field number 0

sig_dim

Alias for field number 1

sig_type

Alias for field number 2

hyperspy.tests.signal.test_binned module

class hyperspy.tests.signal.test_binned.TestModelBinned

Bases: object

setup_method(method)
test_binned()
test_unbinned()
hyperspy.tests.signal.test_binned.test_dielectric_function_binned_default()
hyperspy.tests.signal.test_binned.test_eds_sem_binned_default()
hyperspy.tests.signal.test_binned.test_eds_tem_binned_default()
hyperspy.tests.signal.test_binned.test_eels_spectrum_binned_default()
hyperspy.tests.signal.test_binned.test_image_binned_default()
hyperspy.tests.signal.test_binned.test_signal_binned_default()
hyperspy.tests.signal.test_binned.test_spectrum_binned_default()

hyperspy.tests.signal.test_complex_signal module

class hyperspy.tests.signal.test_complex_signal.TestComplexProperties

Bases: object

amplitude_ref = array([[ 9. , 10.04987562, 11.18033989], [12.36931688, 13.60147051, 14.86606875], [16.15549442, 17.4642492 , 18.78829423]])
comp_ref = array([[0. +9.j, 1.+10.j, 2.+11.j], [3.+12.j, 4.+13.j, 5.+14.j], [6.+15.j, 7.+16.j, 8.+17.j]])
imag_ref = array([[ 9, 10, 11], [12, 13, 14], [15, 16, 17]])
lazify(**kwargs)
phase_ref = array([[1.57079633, 1.47112767, 1.39094283], [1.32581766, 1.2722974 , 1.22777239], [1.19028995, 1.15838589, 1.13095374]])
real_ref = array([[0, 1, 2], [3, 4, 5], [6, 7, 8]])
setup_method(method)
test_angle()
test_get_amplitude()
test_get_imag()
test_get_phase()
test_get_real()
test_lazy_angle()
test_lazy_get_amplitude()
test_lazy_get_imag()
test_lazy_get_phase()
test_lazy_get_real()
test_lazy_set_amplitude()
test_lazy_set_imag()
test_lazy_set_phase()
test_lazy_set_real()
test_set_amplitude()
test_set_imag()
test_set_phase()
test_set_real()
hyperspy.tests.signal.test_complex_signal.test_get_unwrapped_phase_1D(parallel, lazy)
hyperspy.tests.signal.test_complex_signal.test_get_unwrapped_phase_2D(parallel, lazy)
hyperspy.tests.signal.test_complex_signal.test_get_unwrapped_phase_3D(parallel, lazy)

hyperspy.tests.signal.test_complex_signal2d module

hyperspy.tests.signal.test_complex_signal2d.test_add_phase_ramp()
hyperspy.tests.signal.test_complex_signal2d.test_lazy_add_phase_ramp()

hyperspy.tests.signal.test_eds_sem module

class hyperspy.tests.signal.test_eds_sem.Test_energy_units

Bases: object

lazify(**kwargs)
setup_method(method)
test_beam_energy()
test_lazy_beam_energy()
test_lazy_line_energy()
test_line_energy()
class hyperspy.tests.signal.test_eds_sem.Test_get_lines_intentisity

Bases: object

lazify(**kwargs)
setup_method(method)
test()
test_background_substraction()
test_eV()
test_estimate_integration_windows()
test_lazy()
test_lazy_background_substraction()
test_lazy_eV()
test_lazy_estimate_integration_windows()
test_lazy_with_signals_examples()
test_with_signals_examples()
class hyperspy.tests.signal.test_eds_sem.Test_metadata

Bases: object

lazify(**kwargs)
setup_method(method)
test_SEM_to_TEM()
test_add_elements()
test_add_lines()
test_add_lines_auto()
test_default_param()
test_get_calibration_from()
test_lazy_SEM_to_TEM()
test_lazy_add_elements()
test_lazy_add_lines()
test_lazy_add_lines_auto()
test_lazy_default_param()
test_lazy_get_calibration_from()
test_lazy_rebin_live_time()
test_lazy_sum_live_time()
test_lazy_sum_live_time2()
test_lazy_sum_live_time_out_arg()
test_lazy_take_off_angle()
test_rebin_live_time()
test_sum_live_time()
test_sum_live_time2()
test_sum_live_time_out_arg()
test_take_off_angle()
class hyperspy.tests.signal.test_eds_sem.Test_tools_bulk

Bases: object

lazify(**kwargs)
setup_method(method)
test_electron_range()
test_lazy_electron_range()
test_lazy_xray_range()
test_xray_range()

hyperspy.tests.signal.test_eds_tem module

class hyperspy.tests.signal.test_eds_tem.Test_eds_markers

Bases: object

setup_method(method)
test_manual_add_line(mpl_cleanup)
test_manual_remove_element(mpl_cleanup)
test_plot_auto_add(mpl_cleanup)
class hyperspy.tests.signal.test_eds_tem.Test_metadata

Bases: object

lazify(**kwargs)
setup_method(method)
test_TEM_to_SEM()
test_add_elements()
test_are_microscope_parameters_missing()
test_default_param()
test_get_calibration_from()
test_lazy_TEM_to_SEM()
test_lazy_add_elements()
test_lazy_are_microscope_parameters_missing()
test_lazy_default_param()
test_lazy_get_calibration_from()
test_lazy_rebin_live_time()
test_lazy_sum_live_time1()
test_lazy_sum_live_time2()
test_lazy_sum_live_time_out_arg()
test_rebin_live_time()
test_sum_live_time1()
test_sum_live_time2()
test_sum_live_time_out_arg()
class hyperspy.tests.signal.test_eds_tem.Test_quantification

Bases: object

lazify(**kwargs)
setup_method(method)
test_edx_cross_section_to_zeta()
test_lazy_edx_cross_section_to_zeta()
test_lazy_metadata()
test_lazy_quant_cross_section()
test_lazy_quant_lorimer()
test_lazy_quant_zeros()
test_lazy_quant_zeta()
test_lazy_zeta_to_edx_cross_section()
test_metadata()
test_quant_cross_section()
test_quant_lorimer()
test_quant_zeros()
test_quant_zeta()
test_zeta_to_edx_cross_section()
class hyperspy.tests.signal.test_eds_tem.Test_simple_model

Bases: object

lazify(**kwargs)
setup_method(method)
test_intensity()
test_intensity_dtype_uint()
test_lazy_intensity()
test_lazy_intensity_dtype_uint()
class hyperspy.tests.signal.test_eds_tem.Test_vacum_mask

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_vacuum_mask()
test_vacuum_mask()
hyperspy.tests.signal.test_eds_tem.test_with_signals_examples()

hyperspy.tests.signal.test_eels module

class hyperspy.tests.signal.test_eels.TestAlignZLP

Bases: object

lazify(**kwargs)
setup_method(method)
test_align_zero_loss_peak_calibrate_false()
test_align_zero_loss_peak_calibrate_true()
test_align_zero_loss_peak_calibrate_true_with_mask()
test_align_zero_loss_peak_crop_false()
test_align_zero_loss_peak_with_spike_signal_range()
test_also_aligns()
test_lazy_align_zero_loss_peak_calibrate_false()
test_lazy_align_zero_loss_peak_calibrate_true()
test_lazy_align_zero_loss_peak_calibrate_true_with_mask()
test_lazy_align_zero_loss_peak_crop_false()
test_lazy_align_zero_loss_peak_with_spike_signal_range()
test_lazy_also_aligns()
class hyperspy.tests.signal.test_eels.TestEstimateZLPCentre

Bases: object

lazify(**kwargs)
setup_method(method)
test_estimate_zero_loss_peak_centre()
test_lazy_estimate_zero_loss_peak_centre()
class hyperspy.tests.signal.test_eels.TestFourierRatioDeconvolution

Bases: object

lazify(**kwargs)
test_lazy_running(extrapolate_lowloss)
test_running(extrapolate_lowloss)
class hyperspy.tests.signal.test_eels.TestPowerLawExtrapolation

Bases: object

lazify(**kwargs)
setup_method(method)
test_binned()
test_lazy_binned()
test_lazy_unbinned()
test_unbinned()
class hyperspy.tests.signal.test_eels.Test_Estimate_Elastic_Scattering_Threshold

Bases: object

lazify(**kwargs)
setup_method(method)
test_estimate_elastic_scattering_intensity()
test_lazy_estimate_elastic_scattering_intensity()
test_lazy_min_in_window_with_smoothing()
test_lazy_min_in_window_without_smoothing()
test_lazy_min_in_window_without_smoothing_single_spectrum()
test_lazy_min_not_in_window()
test_min_in_window_with_smoothing()
test_min_in_window_without_smoothing()
test_min_in_window_without_smoothing_single_spectrum()
test_min_not_in_window()

hyperspy.tests.signal.test_fancy_indexing module

class hyperspy.tests.signal.test_fancy_indexing.Test1D

Bases: object

setup_method(method)
test_float_index()
test_index()
test_minus_one_index()
test_navigation_indexer_navdim0()
test_reverse_slice()
test_signal_indexer_index()
test_signal_indexer_reverse_slice()
test_signal_indexer_slice()
test_signal_indexer_step2_slice()
test_slice_None()
test_slice_out_of_axis()
test_slice_out_of_range_interval_in_axis()
test_slice_out_of_range_interval_not_in_axis()
test_step0_slice()
class hyperspy.tests.signal.test_fancy_indexing.Test2D

Bases: object

setup_method(method)
test_index()
test_partial()
class hyperspy.tests.signal.test_fancy_indexing.Test3D_Navigate_0_and_1

Bases: object

setup_method(method)
test_1px_navigation_indexer_slice()
test_1px_signal_indexer_slice()
test_dimension_when_indexing()
test_dimension_when_slicing()
test_navigation_indexer_slice_variance_float()
test_navigation_indexer_slice_variance_signal()
test_signal_indexer_slice_variance_float()
test_signal_indexer_slice_variance_signal()
class hyperspy.tests.signal.test_fancy_indexing.Test3D_Navigate_1

Bases: object

setup_method(method)
test_1px_navigation_indexer_slice()
test_1px_signal_indexer_slice()
test_subclass_assignment()
class hyperspy.tests.signal.test_fancy_indexing.Test3D_SignalDim0

Bases: object

setup_method(method)
test_navigation_indexer_signal_dim0()
test_signal_indexer_signal_dim0_idx_error1()
test_signal_indexer_signal_dim0_idx_error2()
test_signal_indexer_signal_dim0_idx_error3()
class hyperspy.tests.signal.test_fancy_indexing.TestEllipsis

Bases: object

setup_method(method)
test_ellipsis_navigation()
test_ellipsis_navigation2()
test_in_between()
class hyperspy.tests.signal.test_fancy_indexing.TestFloatArguments

Bases: object

setup_method(method)
test_float_both()
test_float_end()
test_float_start()
test_float_step()
test_negative_float_step()
class hyperspy.tests.signal.test_fancy_indexing.TestROISlicing

Bases: object

setup_method(method)
test_point2D_roi()
test_rectangular_roi()
test_span_roi()

hyperspy.tests.signal.test_find_peaks1D_ohaver module

class hyperspy.tests.signal.test_find_peaks1D_ohaver.TestFindPeaks1DOhaver

Bases: object

lazify(**kwargs)
setup_method(method)
test_find_peaks1D_ohaver_high_amp_thres()
test_find_peaks1D_ohaver_zero_value_bug()
test_lazy_find_peaks1D_ohaver_high_amp_thres()
test_lazy_find_peaks1D_ohaver_zero_value_bug()

hyperspy.tests.signal.test_folding module

class hyperspy.tests.signal.test_folding.TestSignalFolding

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_unfold_full_by_keyword()
test_lazy_unfold_navigation()
test_lazy_unfold_navigation_by_keyword()
test_lazy_unfold_nothing_by_keyword()
test_lazy_unfold_signal()
test_lazy_unfold_signal_by_keyword()
test_lazy_unfolded_context_manager()
test_lazy_unfolded_full_by_keywords()
test_lazy_unfolded_navigation_by_keyword()
test_lazy_unfolded_nothin_by_keyword()
test_lazy_unfolded_repr()
test_lazy_unfolded_signal_by_keyword()
test_unfold_full_by_keyword()
test_unfold_navigation()
test_unfold_navigation_by_keyword()
test_unfold_nothing_by_keyword()
test_unfold_signal()
test_unfold_signal_by_keyword()
test_unfolded_context_manager()
test_unfolded_full_by_keywords()
test_unfolded_navigation_by_keyword()
test_unfolded_nothin_by_keyword()
test_unfolded_repr()
test_unfolded_signal_by_keyword()
class hyperspy.tests.signal.test_folding.TestSignalVarianceFolding

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_unfold_navigation()
test_lazy_unfold_signal()
test_unfold_navigation()
test_unfold_signal()

hyperspy.tests.signal.test_hologram_image module

hyperspy.tests.signal.test_hologram_image.calc_holo(x, y, phase_ref, FRINGE_SPACING, FRINGE_DIRECTION)
hyperspy.tests.signal.test_hologram_image.calc_phaseref(x, y, z, img_sizex, img_sizey)
hyperspy.tests.signal.test_hologram_image.test_reconstruct_phase_multi(parallel, lazy)
hyperspy.tests.signal.test_hologram_image.test_reconstruct_phase_nonstandard(parallel, lazy)
hyperspy.tests.signal.test_hologram_image.test_reconstruct_phase_single(parallel, lazy)
hyperspy.tests.signal.test_hologram_image.test_set_microscope_parameters(lazy)

hyperspy.tests.signal.test_image module

class hyperspy.tests.signal.test_image.Test2D

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_to_signal1D()
test_to_signal1D()
class hyperspy.tests.signal.test_image.Test3D

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_to_signal1D()
test_to_signal1D()
class hyperspy.tests.signal.test_image.Test4D

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_to_image()
test_to_image()

hyperspy.tests.signal.test_inheritance module

hyperspy.tests.signal.test_inheritance.test_lazy_signal_inheritance(signal)

hyperspy.tests.signal.test_kramers_kronig_transform module

class hyperspy.tests.signal.test_kramers_kronig_transform.Test2D

Bases: object

setup_method(method)

To test the kramers_kronig_analysis we will generate 3 EELSSpectrum instances. First a model energy loss function(ELF), in our case following the Drude bulk plasmon peak. Second, we simulate the inelastic scattering to generate a model scattering distribution (SPC). Finally, we use a lorentzian peak with integral equal to 1 to simulate a ZLP.

test_bethe_sum_rule()
test_df_given_n()

The kramers kronig analysis method applied to the signal we have just designed above will return the CDF for the Drude bulk plasmon. Hopefully, we recover the signal by inverting the CDF.

test_df_given_thickness()

The kramers kronig analysis method applied to the signal we have just designed above will return the CDF for the Drude bulk plasmon. Hopefully, we recover the signal by inverting the CDF.

test_thickness_estimation()

Kramers kronig analysis gives a rough estimation of sample thickness. As we have predefined sample thickness for our scattering distribution, we can use it for testing putposes.

test_thicness_input_array()

hyperspy.tests.signal.test_lazy module

hyperspy.tests.signal.test_lazy.signal()
hyperspy.tests.signal.test_lazy.test_as_array_dask(sig)
hyperspy.tests.signal.test_lazy.test_as_array_fail()
hyperspy.tests.signal.test_lazy.test_as_array_numpy(sig)
hyperspy.tests.signal.test_lazy.test_blockiter_bothmasks(signal, flat, dtype, nm, sm)
hyperspy.tests.signal.test_lazy.test_ma_lazify()
hyperspy.tests.signal.test_lazy.test_reshuffle(signal, sl)

hyperspy.tests.signal.test_map_method module

class hyperspy.tests.signal.test_map_method.TestChangingAxes

Bases: object

lazify(**kwargs)
setup_method(method)
test_increasing(parallel)
test_lazy_increasing(parallel)
test_lazy_one_nav_increasing(parallel)
test_lazy_one_nav_reducing(parallel)
test_lazy_reducing(parallel)
test_one_nav_increasing(parallel)
test_one_nav_reducing(parallel)
test_reducing(parallel)
class hyperspy.tests.signal.test_map_method.TestImage

Bases: object

lazify(**kwargs)
setup_method(method)
test_axes_argument(parallel)
test_constant_sigma(parallel)
test_constant_sigma_navdim0(parallel)
test_different_shapes(parallel)
test_lazy_axes_argument(parallel)
test_lazy_constant_sigma(parallel)
test_lazy_constant_sigma_navdim0(parallel)
test_lazy_different_shapes(parallel)
test_lazy_variable_sigma(parallel)
test_variable_sigma(parallel)
class hyperspy.tests.signal.test_map_method.TestSignal0D

Bases: object

lazify(**kwargs)
setup_method(method)
test(parallel)
test_lazy(parallel)
test_lazy_nav_dim_1(parallel)
test_nav_dim_1(parallel)
class hyperspy.tests.signal.test_map_method.TestSignal1D

Bases: object

lazify(**kwargs)
setup_method(method)
test_constant_sigma(parallel)
test_dtype(parallel)
test_lazy_constant_sigma(parallel)
test_lazy_dtype(parallel)
hyperspy.tests.signal.test_map_method.test_new_axes(parallel)
hyperspy.tests.signal.test_map_method.test_singleton()

hyperspy.tests.signal.test_remove_background module

class hyperspy.tests.signal.test_remove_background.TestRemoveBackground1DGaussian

Bases: object

lazify(**kwargs)
setup_method(method)
test_background_remove_gaussian()
test_background_remove_gaussian_full_fit()
test_lazy_background_remove_gaussian()
test_lazy_background_remove_gaussian_full_fit()
class hyperspy.tests.signal.test_remove_background.TestRemoveBackground1DPowerLaw

Bases: object

lazify(**kwargs)
setup_method(method)
test_background_remove_pl()
test_background_remove_pl_int()
test_lazy_background_remove_pl()
test_lazy_background_remove_pl_int()

hyperspy.tests.signal.test_rgb module

class hyperspy.tests.signal.test_rgb.TestRGBA16

Bases: object

setup_method(method)
test_torgb()
test_touint()
test_wrong_bs()
test_wrong_rgb()
class hyperspy.tests.signal.test_rgb.TestRGBA8

Bases: object

setup_method(method)
test_torgb()
test_touint()
test_wrong_bs()
test_wrong_rgb()

hyperspy.tests.signal.test_signal_operators module

class hyperspy.tests.signal.test_signal_operators.TestBinaryOperators

Bases: object

lazify(**kwargs)
setup_method(method)
test_broadcast_in_place()
test_broadcast_in_place_missing_sig_wrong()
test_broadcast_missing_sig()
test_broadcast_missing_sig_and_nav()
test_equal_naxes_diff_shape()
test_lazy_broadcast_in_place()
test_lazy_broadcast_in_place_missing_sig_wrong()
test_lazy_broadcast_missing_sig()
test_lazy_broadcast_missing_sig_and_nav()
test_lazy_equal_naxes_diff_shape()
test_lazy_sum_in_place_same_shape_signals()
test_lazy_sum_in_place_same_shape_signals_not_aligned()
test_lazy_sum_same_shape_signals()
test_lazy_sum_same_shape_signals_not_aligned()
test_lazy_sum_wrong_shape()
test_sum_in_place_same_shape_signals()
test_sum_in_place_same_shape_signals_not_aligned()
test_sum_same_shape_signals()
test_sum_same_shape_signals_not_aligned()
test_sum_wrong_shape()
class hyperspy.tests.signal.test_signal_operators.TestUnaryOperators

Bases: object

lazify(**kwargs)
setup_method(method)
test_abs()
test_invert()
test_lazy_abs()
test_lazy_invert()
test_lazy_minus()
test_lazy_plus()
test_minus()
test_plus()

hyperspy.tests.signal.test_signal_subclass_conversion module

class hyperspy.tests.signal.test_signal_subclass_conversion.Test1d

Bases: object

lazify(**kwargs)
setup_method(method)
test_as_signal1D()
test_as_signal2D()
test_lazy_as_signal1D()
test_lazy_as_signal2D()
test_lazy_set_EELS()
test_set_EELS()
class hyperspy.tests.signal.test_signal_subclass_conversion.Test2d

Bases: object

lazify(**kwargs)
setup_method(method)
test_as_signal1D()
test_as_signal1D_T()
test_as_signal2D()
test_as_signal2D_T()
test_lazy_as_signal1D()
test_lazy_as_signal1D_T()
test_lazy_as_signal2D()
test_lazy_as_signal2D_T()
test_lazy_s2EELS2im2s()
test_s2EELS2im2s()
class hyperspy.tests.signal.test_signal_subclass_conversion.Test3d

Bases: object

lazify(**kwargs)
setup_method(method)
test_as_signal1D_0()
test_as_signal1D_1()
test_as_signal1D_2()
test_as_signal1D_contigous()
test_as_signal2D_1()
test_as_signal2D_2()
test_as_signal2D_3()
test_as_signal2D_contigous()
test_lazy_as_signal1D_0()
test_lazy_as_signal1D_1()
test_lazy_as_signal1D_2()
test_lazy_as_signal1D_contigous()
test_lazy_as_signal2D_1()
test_lazy_as_signal2D_2()
test_lazy_as_signal2D_3()
test_lazy_as_signal2D_contigous()
test_lazy_remove_axis()
test_remove_axis()

hyperspy.tests.signal.test_spectrum module

class hyperspy.tests.signal.test_spectrum.Test2D

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_to_signal2D()
test_to_signal2D()
class hyperspy.tests.signal.test_spectrum.Test3D

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_to_signal2D()
test_to_signal2D()
class hyperspy.tests.signal.test_spectrum.Test4D

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_to_signal2D()
test_to_signal2D()

hyperspy.tests.signal.test_tools module

class hyperspy.tests.signal.test_tools.Test1D

Bases: object

lazify(**kwargs)
setup_method(method)
test_integrate1D()
test_lazy_integrate1D()
class hyperspy.tests.signal.test_tools.Test2D

Bases: object

lazify(**kwargs)
setup_method(method)
test_add_gaussian_noise()
test_add_poisson_noise()
test_axis_by_str()
test_crop_float()
test_crop_int()
test_estimate_poissonian_noise_copy_data()
test_estimate_poissonian_noise_noarg()
test_estimate_poissonian_noise_with_args()
test_histogram()
test_lazy_add_gaussian_noise()
test_lazy_add_poisson_noise()
test_lazy_axis_by_str()
test_lazy_crop_float()
test_lazy_crop_int()
test_lazy_estimate_poissonian_noise_copy_data()
test_lazy_estimate_poissonian_noise_noarg()
test_lazy_estimate_poissonian_noise_with_args()
test_lazy_histogram()
test_lazy_numpy_func()
test_lazy_numpy_unfunc_one_arg_titled()
test_lazy_numpy_unfunc_one_arg_untitled()
test_lazy_numpy_unfunc_two_arg_titled()
test_lazy_numpy_unfunc_two_arg_untitled()
test_lazy_print_summary()
test_lazy_print_summary_statistics()
test_lazy_split_axis0()
test_lazy_split_axis1()
test_lazy_split_axisE()
test_lazy_split_default()
test_lazy_sum_x()
test_lazy_sum_x_E()
test_lazy_unfold_image()
test_lazy_unfold_image_returns_true()
test_numpy_func()
test_numpy_unfunc_one_arg_titled()
test_numpy_unfunc_one_arg_untitled()
test_numpy_unfunc_two_arg_titled()
test_numpy_unfunc_two_arg_untitled()
test_print_summary()
test_print_summary_statistics()
test_split_axis0()
test_split_axis1()
test_split_axisE()
test_split_default()
test_sum_x()
test_sum_x_E()
test_unfold_image()
test_unfold_image_returns_true()
class hyperspy.tests.signal.test_tools.Test3D

Bases: object

lazify(**kwargs)
setup_method(method)
test_default_navigation_max()
test_default_navigation_mean()
test_default_navigation_min()
test_default_navigation_std()
test_default_navigation_sum()
test_default_navigation_var()
test_get_navigation_signal_dtype()
test_get_navigation_signal_given_data()
test_get_navigation_signal_given_dtype()
test_get_navigation_signal_nav_dim0()
test_get_navigation_signal_nav_dim1()
test_get_navigation_signal_nav_dim2()
test_get_navigation_signal_nav_dim3()
test_get_navigation_signal_wrong_data_shape()
test_get_navigation_signal_wrong_data_shape_dim0()
test_get_signal_signal_dtype()
test_get_signal_signal_given_data()
test_get_signal_signal_given_dtype()
test_get_signal_signal_nav_dim0()
test_get_signal_signal_nav_dim1()
test_get_signal_signal_nav_dim2()
test_get_signal_signal_nav_dim3()
test_get_signal_signal_wrong_data_shape()
test_get_signal_signal_wrong_data_shape_dim0()
test_indexmax()
test_indexmin()
test_lazy_default_navigation_max()
test_lazy_default_navigation_mean()
test_lazy_default_navigation_min()
test_lazy_default_navigation_std()
test_lazy_default_navigation_sum()
test_lazy_default_navigation_var()
test_lazy_get_navigation_signal_dtype()
test_lazy_get_navigation_signal_given_data()
test_lazy_get_navigation_signal_given_dtype()
test_lazy_get_navigation_signal_nav_dim0()
test_lazy_get_navigation_signal_nav_dim1()
test_lazy_get_navigation_signal_nav_dim2()
test_lazy_get_navigation_signal_nav_dim3()
test_lazy_get_navigation_signal_wrong_data_shape()
test_lazy_get_navigation_signal_wrong_data_shape_dim0()
test_lazy_get_signal_signal_dtype()
test_lazy_get_signal_signal_given_data()
test_lazy_get_signal_signal_given_dtype()
test_lazy_get_signal_signal_nav_dim0()
test_lazy_get_signal_signal_nav_dim1()
test_lazy_get_signal_signal_nav_dim2()
test_lazy_get_signal_signal_nav_dim3()
test_lazy_get_signal_signal_wrong_data_shape()
test_lazy_get_signal_signal_wrong_data_shape_dim0()
test_lazy_indexmax()
test_lazy_indexmin()
test_lazy_rebin()
test_lazy_rebin_const_variance()
test_lazy_rebin_no_variance()
test_lazy_swap_axes_iteration()
test_lazy_swap_axes_simple()
test_lazy_valuemax()
test_lazy_valuemin()
test_rebin()
test_rebin_const_variance()
test_rebin_no_variance()
test_swap_axes_iteration()
test_swap_axes_simple()
test_valuemax()
test_valuemin()
class hyperspy.tests.signal.test_tools.Test4D

Bases: object

lazify(**kwargs)
setup_method(method)
test_diff_axis()
test_diff_data()
test_image_signal_unfolded_back_to_false()
test_image_signal_unfolded_deepcopy()
test_image_signal_unfolded_false()
test_image_signal_unfolded_true()
test_lazy_diff_axis()
test_lazy_diff_data()
test_lazy_image_signal_unfolded_back_to_false()
test_lazy_image_signal_unfolded_deepcopy()
test_lazy_image_signal_unfolded_false()
test_lazy_image_signal_unfolded_true()
test_lazy_rollaxis_int()
test_lazy_rollaxis_str()
test_lazy_unfold_image()
test_lazy_unfold_spectrum()
test_lazy_unfold_spectrum_returns_true()
test_lazy_unfold_spectrum_signal_returns_false()
test_rollaxis_int()
test_rollaxis_str()
test_unfold_image()
test_unfold_spectrum()
test_unfold_spectrum_returns_true()
test_unfold_spectrum_signal_returns_false()
class hyperspy.tests.signal.test_tools.TestDerivative

Bases: object

lazify(**kwargs)
setup_method(method)
test_derivative_data()
test_lazy_derivative_data()
class hyperspy.tests.signal.test_tools.TestLinearRebin

Bases: object

test_linear_downscale_out()
test_linear_downsize()
test_linear_upscale_out()
test_linear_upsize()
class hyperspy.tests.signal.test_tools.TestOutArg

Bases: object

lazify(**kwargs)
setup_method(method)
test_as_image()
test_as_spectrum()
test_derivative()
test_diff()
test_get_histogram()
test_histogram_axis_changes()
test_inav()
test_inav_variance()
test_indexmax()
test_integrate1D()
test_integrate_simpson()
test_isig()
test_isig_variance()
test_lazy_as_image()
test_lazy_as_spectrum()
test_lazy_derivative()
test_lazy_diff()
test_lazy_get_histogram()
test_lazy_histogram_axis_changes()
test_lazy_inav()
test_lazy_inav_variance()
test_lazy_indexmax()
test_lazy_integrate1D()
test_lazy_integrate_simpson()
test_lazy_isig()
test_lazy_isig_variance()
test_lazy_masked_array_mean()
test_lazy_masked_array_sum()
test_lazy_masked_arrays_out()
test_lazy_max()
test_lazy_mean()
test_lazy_min()
test_lazy_rebin()
test_lazy_std()
test_lazy_sum()
test_lazy_sum_no_navigation_axis(mask)
test_lazy_sum_return_1d_signal()
test_lazy_valuemax()
test_lazy_var()
test_lazy_wrong_out_shape()
test_lazy_wrong_out_shape_masked()
test_masked_array_mean()
test_masked_array_sum()
test_masked_arrays_out()
test_max()
test_mean()
test_min()
test_rebin()
test_std()
test_sum()
test_sum_no_navigation_axis(mask)
test_sum_return_1d_signal()
test_valuemax()
test_var()
test_wrong_out_shape()
test_wrong_out_shape_masked()
class hyperspy.tests.signal.test_tools.TestTranspose

Bases: object

lazify(**kwargs)
setup_method(method)
test_lazy_navigation_int_transpose()
test_lazy_navigation_iterable_axes_transpose()
test_lazy_navigation_iterable_int_transpose()
test_lazy_navigation_iterable_names_transpose()
test_lazy_navigation_one_name()
test_lazy_optimize()
test_lazy_signal_int_transpose()
test_lazy_signal_iterable_axes_transpose()
test_lazy_signal_iterable_int_transpose()
test_lazy_signal_iterable_names_transpose()
test_lazy_signal_one_name()
test_lazy_too_many_navigation_axes()
test_lazy_too_many_signal_axes()
test_lazy_transpose_shortcut()
test_navigation_int_transpose()
test_navigation_iterable_axes_transpose()
test_navigation_iterable_int_transpose()
test_navigation_iterable_names_transpose()
test_navigation_one_name()
test_optimize()
test_signal_int_transpose()
test_signal_iterable_axes_transpose()
test_signal_iterable_int_transpose()
test_signal_iterable_names_transpose()
test_signal_one_name()
test_too_many_navigation_axes()
test_too_many_signal_axes()
test_transpose_shortcut()
hyperspy.tests.signal.test_tools.test_lazy_changetype_rechunk()
hyperspy.tests.signal.test_tools.test_lazy_changetype_rechunk_False()
hyperspy.tests.signal.test_tools.test_lazy_diff_rechunk()
hyperspy.tests.signal.test_tools.test_lazy_reduce_rechunk()
hyperspy.tests.signal.test_tools.test_lazy_transpose_rechunks()
hyperspy.tests.signal.test_tools.test_signal_iterator()
hyperspy.tests.signal.test_tools.test_spikes_removal_tool()

Module contents