hyperspy.tests.signal package¶
Submodules¶
hyperspy.tests.signal.test_1D_tools module¶
-
class
hyperspy.tests.signal.test_1D_tools.
TestAlignTools
¶ Bases:
object
-
setUp
()¶
-
test_align
()¶
-
test_estimate_shift
()¶
-
test_shift1D
()¶
-
-
class
hyperspy.tests.signal.test_1D_tools.
TestEstimatePeakWidth
¶ Bases:
object
-
setUp
()¶
-
test_full_range
()¶
-
test_too_narrow_range
()¶
-
test_two_peaks
()¶
-
-
class
hyperspy.tests.signal.test_1D_tools.
TestFindPeaks1D
¶ Bases:
object
-
setUp
()¶
-
test_height
()¶
-
test_maxpeaksn
()¶
-
test_n_peaks
()¶
-
test_single_spectrum
()¶
-
test_two_spectra
()¶
-
test_width
()¶
-
-
class
hyperspy.tests.signal.test_1D_tools.
TestInterpolateInBetween
¶ Bases:
object
-
setUp
()¶
-
test_delta_float
()¶
-
test_delta_int
()¶
-
test_single_spectrum
()¶
-
test_single_spectrum_in_units
()¶
-
test_two_spectra
()¶
-
hyperspy.tests.signal.test_2D_tools module¶
hyperspy.tests.signal.test_apply_function module¶
hyperspy.tests.signal.test_assign_subclass module¶
-
class
hyperspy.tests.signal.test_assign_subclass.
TestSignalAssignSubclass
¶ Bases:
object
-
setUp
()¶
-
test_type_to_eels
()¶
-
test_type_to_spectrumsimulation
()¶
-
-
hyperspy.tests.signal.test_assign_subclass.
test_eels_spectrum
()¶
-
hyperspy.tests.signal.test_assign_subclass.
test_eels_spectrum_simulation
()¶
-
hyperspy.tests.signal.test_assign_subclass.
test_image
()¶
-
hyperspy.tests.signal.test_assign_subclass.
test_image_simulation
()¶
-
hyperspy.tests.signal.test_assign_subclass.
test_signal
()¶
-
hyperspy.tests.signal.test_assign_subclass.
test_spectrum
()¶
-
hyperspy.tests.signal.test_assign_subclass.
test_weird_spectrum
()¶
hyperspy.tests.signal.test_attributes module¶
-
hyperspy.tests.signal.test_attributes.
test_eels_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_eels_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_eels_signal_type
()¶
-
hyperspy.tests.signal.test_attributes.
test_image_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_image_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_image_signal_type
()¶
-
hyperspy.tests.signal.test_attributes.
test_image_simulation_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_image_simulation_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_image_simulation_signal_type
()¶
-
hyperspy.tests.signal.test_attributes.
test_signal_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_signal_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_signal_signal_type
()¶
-
hyperspy.tests.signal.test_attributes.
test_simulation_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_simulation_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_simulation_signal_type
()¶
-
hyperspy.tests.signal.test_attributes.
test_spectrum_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_spectrum_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_spectrum_signal_type
()¶
-
hyperspy.tests.signal.test_attributes.
test_spectrum_simulation_record_by
()¶
-
hyperspy.tests.signal.test_attributes.
test_spectrum_simulation_signal_origin
()¶
-
hyperspy.tests.signal.test_attributes.
test_spectrum_simulation_signal_type
()¶
hyperspy.tests.signal.test_binned module¶
-
class
hyperspy.tests.signal.test_binned.
TestModelBinned
¶ Bases:
object
-
setUp
()¶
-
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_image_simulation_binned_default
()¶
-
hyperspy.tests.signal.test_binned.
test_signal_binned_default
()¶
-
hyperspy.tests.signal.test_binned.
test_simulation_binned_default
()¶
-
hyperspy.tests.signal.test_binned.
test_spectrum_binned_default
()¶
-
hyperspy.tests.signal.test_binned.
test_spectrum_simulation_binned_default
()¶
hyperspy.tests.signal.test_eds_sem module¶
-
class
hyperspy.tests.signal.test_eds_sem.
Test_energy_units
¶ Bases:
object
-
setUp
()¶
-
test_beam_energy
()¶
-
test_line_energy
()¶
-
-
class
hyperspy.tests.signal.test_eds_sem.
Test_get_lines_intentisity
¶ Bases:
object
-
setUp
()¶
-
test
()¶
-
test_background_substraction
()¶
-
test_eV
()¶
-
test_estimate_integration_windows
()¶
-
test_with_signals_examples
()¶
-
hyperspy.tests.signal.test_eds_tem module¶
-
class
hyperspy.tests.signal.test_eds_tem.
Test_get_lines_intentisity
¶ Bases:
object
-
test_with_signals_examples
()¶
-
-
class
hyperspy.tests.signal.test_eds_tem.
Test_metadata
¶ Bases:
object
-
setUp
()¶
-
test_TEM_to_SEM
()¶
-
test_add_elements
()¶
-
test_default_param
()¶
-
test_get_calibration_from
()¶
-
test_rebin_live_time
()¶
-
test_sum_live_time1
()¶
-
hyperspy.tests.signal.test_eels module¶
-
class
hyperspy.tests.signal.test_eels.
TestAlignZLP
¶ Bases:
object
-
setUp
()¶
-
test_align_zero_loss_peak_calibrate_false
()¶
-
test_align_zero_loss_peak_calibrate_true
()¶
-
test_also_aligns
()¶
-
-
class
hyperspy.tests.signal.test_eels.
TestEstimateZLPCentre
¶ Bases:
object
-
setUp
()¶
-
test_estimate_zero_loss_peak_centre
()¶
-
hyperspy.tests.signal.test_fancy_indexing module¶
-
class
hyperspy.tests.signal.test_fancy_indexing.
Test1D
¶ Bases:
object
-
setUp
()¶
-
test_float_index
()¶
-
test_index
()¶
-
test_minus_one_index
()¶
-
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_step0_slice
(*arg, **kw)¶
-
-
class
hyperspy.tests.signal.test_fancy_indexing.
Test2D
¶ Bases:
object
-
setUp
()¶
-
test_index
()¶
-
test_partial
()¶
-
Bases:
object
Bases:
object
-
class
hyperspy.tests.signal.test_fancy_indexing.
Test3D_SignalDim0
¶ Bases:
object
-
setUp
()¶
-
test_signal_indexer_signal_dim0_idx_error1
(*arg, **kw)¶
-
test_signal_indexer_signal_dim0_idx_error2
(*arg, **kw)¶
-
test_signal_indexer_signal_dim0_idx_error3
(*arg, **kw)¶
-
hyperspy.tests.signal.test_find_peaks1D_ohaver module¶
hyperspy.tests.signal.test_folding module¶
-
class
hyperspy.tests.signal.test_folding.
TestSignalFolding
¶ Bases:
object
-
setUp
()¶
-
test_unfold_full_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_nothin_by_keyword
()¶
-
test_unfolded_repr
()¶
-
test_unfolded_signal_by_keyword
()¶
-
hyperspy.tests.signal.test_image module¶
hyperspy.tests.signal.test_integrate_in_range module¶
hyperspy.tests.signal.test_kramers_kronig_transform module¶
-
class
hyperspy.tests.signal.test_kramers_kronig_transform.
Test2D
¶ Bases:
object
-
setUp
()¶ 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
(*arg, **kw)¶
-
hyperspy.tests.signal.test_remove_background module¶
hyperspy.tests.signal.test_rgb module¶
hyperspy.tests.signal.test_signal_operators module¶
-
class
hyperspy.tests.signal.test_signal_operators.
TestBinaryOperators
¶ Bases:
object
-
setUp
()¶
-
test_broadcast_in_place
()¶
-
test_broadcast_in_place_missing_sig_wrong
(*arg, **kw)¶
-
test_broadcast_missing_sig
()¶
-
test_equal_naxes_diff_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
(*arg, **kw)¶
-
hyperspy.tests.signal.test_signal_subclass_conversion module¶
-
class
hyperspy.tests.signal.test_signal_subclass_conversion.
Test1d
¶ Bases:
object
-
setUp
()¶
-
test_as_signal1D
()¶
-
test_as_signal2D
(*arg, **kw)¶
-
test_set_EELS
()¶
-
-
class
hyperspy.tests.signal.test_signal_subclass_conversion.
Test2d
¶ Bases:
object
-
setUp
()¶
-
test_as_signal1D
()¶
-
test_as_signal1D_T
()¶
-
test_as_signal2D
()¶
-
test_as_signal2D_T
()¶
-
test_s2EELS2im2s
()¶
-
-
class
hyperspy.tests.signal.test_signal_subclass_conversion.
Test3d
¶ Bases:
object
-
setUp
()¶
-
test_as_signal1D_0
()¶
-
test_as_signal1D_1
()¶
-
test_as_signal1D_2
()¶
-
test_as_signal1D_3
()¶
-
test_as_signal1D_contigous
()¶
-
test_as_signal2D_1
()¶
-
test_as_signal2D_2
()¶
-
test_as_signal2D_3
()¶
-
test_as_signal2D_contigous
()¶
-
test_remove_axis
()¶
-
hyperspy.tests.signal.test_spectrum module¶
hyperspy.tests.signal.test_tools module¶
-
class
hyperspy.tests.signal.test_tools.
Test2D
¶ Bases:
object
-
setUp
()¶
-
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_print_summary
()¶
-
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
-
setUp
()¶
-
test_get_signal_signal_dtype
()¶
-
test_get_signal_signal_given_data
()¶
-
test_get_signal_signal_given_dtype
()¶
-
test_get_signal_signal_wrong_data_shape
(*arg, **kw)¶
-
test_get_signal_signal_wrong_data_shape_dim0
(*arg, **kw)¶
-
test_rebin
()¶
-
test_rebin_const_variance
()¶
-
test_rebin_no_variance
(*arg, **kw)¶
-
test_swap_axes_iteration
()¶
-
test_swap_axes_simple
()¶
-
-
class
hyperspy.tests.signal.test_tools.
Test4D
¶ Bases:
object
-
setUp
()¶
-
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_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
-
setup
()¶
-
test_derivative_data
()¶
-
-
hyperspy.tests.signal.test_tools.
test_signal_iterator
()¶