hyperspy.tests.model package¶
Submodules¶
hyperspy.tests.model.test_chi_squared module¶
-
class
hyperspy.tests.model.test_chi_squared.TestChiSquared¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_chisq()¶
-
test_chisq_in_range()¶
-
test_chisq_with_fit()¶
-
test_chisq_with_inactive_components()¶
-
test_dof_with_fit()¶
-
test_dof_with_inactive_components()¶
-
test_dof_with_p0()¶
-
test_lazy_chisq()¶
-
test_lazy_chisq_in_range()¶
-
test_lazy_chisq_with_fit()¶
-
test_lazy_chisq_with_inactive_components()¶
-
test_lazy_dof_with_fit()¶
-
test_lazy_dof_with_inactive_components()¶
-
test_lazy_dof_with_p0()¶
-
test_lazy_red_chisq()¶
-
test_lazy_red_chisq_with_fit()¶
-
test_red_chisq()¶
-
test_red_chisq_with_fit()¶
-
hyperspy.tests.model.test_component module¶
-
class
hyperspy.tests.model.test_component.TestCallMethods¶ Bases:
object-
setup_method(method)¶
-
test_call()¶
-
test_plotting_active_component_binned()¶
-
test_plotting_active_component_notbinned()¶
-
test_plotting_active_component_out_of_range()¶
-
test_plotting_not_active_component()¶
-
-
class
hyperspy.tests.model.test_component.TestGeneralMethods¶ Bases:
object-
setup_method(method)¶
-
test_export_all_no_twins()¶
-
test_export_all_twins()¶
-
test_export_free()¶
-
test_fetch_from_array()¶
-
test_fetch_from_array_free()¶
-
test_fetch_stored_values_all()¶
-
test_fetch_stored_values_all_twinned()¶
-
test_fetch_stored_values_all_twinned_bad()¶
-
test_fetch_stored_values_fixed()¶
-
test_set_parameters_free_all()¶
-
test_set_parameters_free_name()¶
-
test_set_parameters_not_free_all()¶
-
test_set_parameters_not_free_name()¶
-
test_update_number_parameters()¶
-
-
class
hyperspy.tests.model.test_component.TestMultidimensionalActive¶ Bases:
object-
setup_method(method)¶
-
test_disable_pixel_switching()¶
-
test_disable_pixel_switching_current_off()¶
-
test_disable_pixel_switching_current_on()¶
-
test_enable_pixel_switching_current_off()¶
-
test_enable_pixel_switching_current_on()¶
-
-
hyperspy.tests.model.test_component.test_update_number_free_parameters()¶
hyperspy.tests.model.test_components module¶
-
class
hyperspy.tests.model.test_components.TestExpression¶ Bases:
object-
setup_method(method)¶
-
test_f()¶
-
test_grad_fwhm()¶
-
test_grad_height()¶
-
test_grad_x0()¶
-
test_name()¶
-
test_position()¶
-
-
class
hyperspy.tests.model.test_components.TestGaussian¶ Bases:
object-
setup_method(method)¶
-
test_estimate_parameters_binned()¶
-
test_estimate_parameters_unbinned()¶
-
-
class
hyperspy.tests.model.test_components.TestHeavisideStep¶ Bases:
object-
setup_method(method)¶
-
test_float_values()¶
-
test_gradients()¶
-
test_integer_values()¶
-
test_not_sorted()¶
-
-
class
hyperspy.tests.model.test_components.TestOffset¶ Bases:
object-
setup_method(method)¶
-
test_estimate_parameters_binned()¶
-
test_estimate_parameters_unbinned()¶
-
-
class
hyperspy.tests.model.test_components.TestPolynomial¶ Bases:
object-
setup_method(method)¶
-
test_2d_signal()¶
-
test_3d_signal()¶
-
test_estimate_parameters_binned()¶
-
test_estimate_parameters_unbinned()¶
-
test_gradient()¶
-
-
class
hyperspy.tests.model.test_components.TestPowerLaw¶ Bases:
object-
setup_method(method)¶
-
test_estimate_parameters_binned()¶
-
test_estimate_parameters_binned_only_current()¶
-
test_estimate_parameters_unbinned()¶
-
test_estimate_parameters_unbinned_only_current()¶
-
-
class
hyperspy.tests.model.test_components.TestScalableFixedPattern¶ Bases:
object-
setup_method(method)¶
-
test_both_binned()¶
-
test_both_unbinned()¶
-
test_pattern_binned_signal_unbinned()¶
-
test_pattern_unbinned_signal_binned()¶
-
-
hyperspy.tests.model.test_components.test_expression_substitution()¶
hyperspy.tests.model.test_components2D module¶
hyperspy.tests.model.test_edsmodel module¶
-
class
hyperspy.tests.model.test_edsmodel.TestMaps¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_lazy_lines_intensity()¶
-
test_lines_intensity()¶
-
-
class
hyperspy.tests.model.test_edsmodel.TestlineFit¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_calibrate_energy_offset()¶
-
test_calibrate_energy_resolution()¶
-
test_calibrate_energy_scale()¶
-
test_calibrate_xray_energy()¶
-
test_calibrate_xray_weight()¶
-
test_calibrate_xray_width()¶
-
test_edsmodel_store()¶
-
test_enable_adjust_position()¶
-
test_fit()¶
-
test_lazy_calibrate_energy_offset()¶
-
test_lazy_calibrate_energy_resolution()¶
-
test_lazy_calibrate_energy_scale()¶
-
test_lazy_calibrate_xray_energy()¶
-
test_lazy_calibrate_xray_weight()¶
-
test_lazy_calibrate_xray_width()¶
-
test_lazy_edsmodel_store()¶
-
test_lazy_enable_adjust_position()¶
-
test_lazy_fit()¶
-
test_lazy_model_creation()¶
-
test_lazy_semmodel_creation()¶
-
test_lazy_semmodel_store()¶
-
test_lazy_temmodel_creation()¶
-
test_lazy_temmodel_store()¶
-
test_model_creation()¶
-
test_semmodel_creation()¶
-
test_semmodel_store()¶
-
test_temmodel_creation()¶
-
test_temmodel_store()¶
-
hyperspy.tests.model.test_eelsmodel module¶
-
class
hyperspy.tests.model.test_eelsmodel.TestCreateEELSModel¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_auto_add_background_true()¶
-
test_auto_add_edges_false()¶
-
test_auto_add_edges_false_names()¶
-
test_auto_add_edges_true()¶
-
test_create_eelsmodel()¶
-
test_create_eelsmodel_no_md()¶
-
test_gos()¶
-
test_lazy_auto_add_background_true()¶
-
test_lazy_auto_add_edges_false()¶
-
test_lazy_auto_add_edges_false_names()¶
-
test_lazy_auto_add_edges_true()¶
-
test_lazy_create_eelsmodel()¶
-
test_lazy_create_eelsmodel_no_md()¶
-
test_lazy_gos()¶
-
test_lazy_low_loss()¶
-
test_lazy_low_loss_bad_shape()¶
-
test_low_loss()¶
-
test_low_loss_bad_shape()¶
-
-
class
hyperspy.tests.model.test_eelsmodel.TestEELSModel¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_get_first_ionization_edge_energy_C()¶
-
test_get_first_ionization_edge_energy_C_B()¶
-
test_get_first_ionization_edge_energy_None()¶
-
test_get_start_energy_above()¶
-
test_get_start_energy_below()¶
-
test_get_start_energy_none()¶
-
test_lazy_get_first_ionization_edge_energy_C()¶
-
test_lazy_get_first_ionization_edge_energy_C_B()¶
-
test_lazy_get_first_ionization_edge_energy_None()¶
-
test_lazy_get_start_energy_above()¶
-
test_lazy_get_start_energy_below()¶
-
test_lazy_get_start_energy_none()¶
-
test_lazy_resume_fsw()¶
-
test_lazy_suspend_auto_fsw()¶
-
test_lazy_two_area_powerlaw_estimation_BC()¶
-
test_lazy_two_area_powerlaw_estimation_C()¶
-
test_lazy_two_area_powerlaw_estimation_no_edge()¶
-
test_resume_fsw()¶
-
test_suspend_auto_fsw()¶
-
test_two_area_powerlaw_estimation_BC()¶
-
test_two_area_powerlaw_estimation_C()¶
-
test_two_area_powerlaw_estimation_no_edge()¶
-
hyperspy.tests.model.test_fancy_indexing module¶
-
class
hyperspy.tests.model.test_fancy_indexing.TestEELSModelSlicing¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_lazy_slicing_low_loss_isig()¶
-
test_slicing_low_loss_isig()¶
-
hyperspy.tests.model.test_fit_component module¶
-
class
hyperspy.tests.model.test_fit_component.TestFitOneComponent¶ Bases:
object-
setup_method(method)¶
-
test_component_not_in_model()¶
-
test_fit_component()¶
-
hyperspy.tests.model.test_model module¶
-
class
hyperspy.tests.model.test_model.TestAdjustPosition¶ Bases:
object-
setup_method(method)¶
-
test_disable_adjust_position(mpl_cleanup)¶
-
test_enable_adjust_position(mpl_cleanup)¶
-
test_enable_all(mpl_cleanup)¶
-
test_enable_all_zero_start(mpl_cleanup)¶
-
test_manual_close(mpl_cleanup)¶
-
-
class
hyperspy.tests.model.test_model.TestAsSignal¶ Bases:
object-
setup_method(method)¶
-
test_all_components_multidim(parallel)¶
-
test_all_components_simple(parallel)¶
-
test_one_component_multidim(parallel)¶
-
test_one_component_simple(parallel)¶
-
test_threaded_identical()¶
-
-
class
hyperspy.tests.model.test_model.TestCreateModel¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_create_model()¶
-
test_lazy_create_model()¶
-
-
class
hyperspy.tests.model.test_model.TestModel1D¶ Bases:
object-
setup_method(method)¶
-
test_access_component_by_index()¶
-
test_access_component_by_name()¶
-
test_append_component()¶
-
test_append_existing_component()¶
-
test_calculating_convolution_axis()¶
-
test_component_already_in_model()¶
-
test_component_name_when_append()¶
-
test_components_class_change_invalid_name()¶
-
test_components_class_change_name()¶
-
test_components_class_change_name_del_default()¶
-
test_components_class_default()¶
-
test_delete_component_by_index()¶
-
test_delete_component_by_name()¶
-
test_delete_slice()¶
-
test_errfunc()¶
-
test_errfunc2()¶
-
test_get_component_by_component()¶
-
test_get_component_by_index()¶
-
test_get_component_by_name()¶
-
test_get_component_wrong()¶
-
test_gradient_ls()¶
-
test_gradient_ml()¶
-
test_model_function()¶
-
test_no_component_with_that_name()¶
-
test_remove_component()¶
-
test_remove_component_by_index()¶
-
test_remove_component_by_name()¶
-
test_several_component_with_same_name()¶
-
test_snap_parameter_bounds()¶
-
-
class
hyperspy.tests.model.test_model.TestModel2D¶ Bases:
object-
setup_method(method)¶
-
test_fitting()¶
-
-
class
hyperspy.tests.model.test_model.TestModelCallMethod¶ Bases:
object-
setup_method(method)¶
-
test_call_method_binned()¶
-
test_call_method_no_convolutions()¶
-
test_call_method_with_convolutions()¶
-
-
class
hyperspy.tests.model.test_model.TestModelFitBinned¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_fit_bounded_bad_starting_values_lbfgs()¶
-
test_fit_bounded_bad_starting_values_leastsq()¶
-
test_fit_bounded_bad_starting_values_mpfit()¶
-
test_fit_bounded_lbfgs()¶
-
test_fit_bounded_leastsq()¶
-
test_fit_bounded_mpfit()¶
-
test_fit_leastsq()¶
-
test_fit_leastsq_grad()¶
-
test_fit_mpfit()¶
-
test_fit_mpfit_grad()¶
-
test_fit_neldermead_leastsq()¶
-
test_fit_neldermead_ml()¶
-
test_fit_odr()¶
-
test_fit_odr_grad()¶
-
test_lazy_fit_bounded_bad_starting_values_lbfgs()¶
-
test_lazy_fit_bounded_bad_starting_values_leastsq()¶
-
test_lazy_fit_bounded_bad_starting_values_mpfit()¶
-
test_lazy_fit_bounded_lbfgs()¶
-
test_lazy_fit_bounded_leastsq()¶
-
test_lazy_fit_bounded_mpfit()¶
-
test_lazy_fit_leastsq()¶
-
test_lazy_fit_leastsq_grad()¶
-
test_lazy_fit_mpfit()¶
-
test_lazy_fit_mpfit_grad()¶
-
test_lazy_fit_neldermead_leastsq()¶
-
test_lazy_fit_neldermead_ml()¶
-
test_lazy_fit_odr()¶
-
test_lazy_fit_odr_grad()¶
-
test_lazy_wrong_method()¶
-
test_wrong_method()¶
-
-
class
hyperspy.tests.model.test_model.TestModelJacobians¶ Bases:
object-
setup_method(method)¶
-
test_jacobian_convolved()¶
-
test_jacobian_not_convolved()¶
-
-
class
hyperspy.tests.model.test_model.TestModelPlotCall¶ Bases:
object-
setup_method(method)¶
-
test_model2plot_other_am()¶
-
test_model2plot_own_am()¶
-
-
class
hyperspy.tests.model.test_model.TestModelScalarVariance¶ Bases:
object-
setup_method(method)¶
-
test_std10_chisq()¶
-
test_std10_red_chisq()¶
-
test_std1_chisq()¶
-
test_std1_red_chisq()¶
-
test_std1_red_chisq_in_range()¶
-
-
class
hyperspy.tests.model.test_model.TestModelSettingPZero¶ Bases:
object-
setup_method(method)¶
-
test_fetching_from_p0()¶
-
test_setting_boundaries()¶
-
test_setting_mpfit_parameters_info()¶
-
test_setting_p0()¶
-
-
class
hyperspy.tests.model.test_model.TestModelSignalVariance¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_lazy_std1_red_chisq()¶
-
test_std1_red_chisq()¶
-
-
class
hyperspy.tests.model.test_model.TestModelWeighted¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_chisq()¶
-
test_fit_leastsq_binned()¶
-
test_fit_leastsq_unbinned()¶
-
test_fit_mpfit_binned()¶
-
test_fit_mpfit_unbinned()¶
-
test_fit_neldermead_binned()¶
-
test_fit_neldermead_unbinned()¶
-
test_fit_odr_binned()¶
-
test_fit_odr_unbinned()¶
-
test_lazy_chisq()¶
-
test_lazy_fit_leastsq_binned()¶
-
test_lazy_fit_leastsq_unbinned()¶
-
test_lazy_fit_mpfit_binned()¶
-
test_lazy_fit_mpfit_unbinned()¶
-
test_lazy_fit_neldermead_binned()¶
-
test_lazy_fit_neldermead_unbinned()¶
-
test_lazy_fit_odr_binned()¶
-
test_lazy_fit_odr_unbinned()¶
-
test_lazy_red_chisq()¶
-
test_red_chisq()¶
-
-
class
hyperspy.tests.model.test_model.TestMultifit¶ Bases:
object-
lazify(**kwargs)¶
-
setup_method(method)¶
-
test_bounded_snapping_leastsq()¶
-
test_bounded_snapping_mpfit()¶
-
test_fetch_only_fixed_false()¶
-
test_fetch_only_fixed_true()¶
-
test_lazy_bounded_snapping_leastsq()¶
-
test_lazy_bounded_snapping_mpfit()¶
-
test_lazy_fetch_only_fixed_false()¶
-
test_lazy_fetch_only_fixed_true()¶
-
test_lazy_parameter_as_signal_values()¶
-
test_parameter_as_signal_values()¶
-
hyperspy.tests.model.test_model_as_dictionary module¶
-
class
hyperspy.tests.model.test_model_as_dictionary.TestComponentDictionary¶ Bases:
object-
setup_method(method)¶
-
test_invalid_component_name()¶
-
test_invalid_parameter_name()¶
-
test_load_dictionary()¶
-
test_to_dictionary()¶
-
-
class
hyperspy.tests.model.test_model_as_dictionary.TestModelDictionary¶ Bases:
object-
setup_method(method)¶
-
test_load_dictionary()¶
-
test_to_dictionary()¶
-
-
class
hyperspy.tests.model.test_model_as_dictionary.TestParameterDictionary¶ Bases:
object-
setup_method(method)¶
-
test_invalid_name()¶
-
test_load_dictionary()¶
-
test_to_dictionary()¶
-
-
hyperspy.tests.model.test_model_as_dictionary.remove_empty_numpy_strings(dic)¶
hyperspy.tests.model.test_model_selection_criteria module¶
hyperspy.tests.model.test_model_storing module¶
-
class
hyperspy.tests.model.test_model_storing.TestEELSModelSaving¶ Bases:
object-
setup_method(method)¶
-
teardown_method(method)¶
-
test_save_and_load_model()¶
-
-
class
hyperspy.tests.model.test_model_storing.TestModelSaving¶ Bases:
object-
setup_method(method)¶
-
teardown_method(method)¶
-
test_save_and_load_model()¶
-
-
class
hyperspy.tests.model.test_model_storing.TestModelStoring¶ Bases:
object-
setup_method(method)¶
-
test_actually_stored()¶
-
test_model_store()¶
-
test_models_getattr()¶
-
test_models_pop()¶
-
test_models_restore_remove()¶
-
test_models_stub_methods()¶
-
test_store_name_error1()¶
-
test_store_name_error2()¶
-
test_store_name_error3()¶
-
test_store_name_error4()¶
-
test_store_name_error5()¶
-
-
hyperspy.tests.model.test_model_storing.clean_model_dictionary(d)¶
hyperspy.tests.model.test_parameter module¶
-
class
hyperspy.tests.model.test_parameter.TestGeneralMethods¶ Bases:
object-
setup_method(method)¶
-
test_as_signal()¶
-
test_store_current_values_no_indices()¶
-
test_store_current_values_normal_indices()¶
-
-
class
hyperspy.tests.model.test_parameter.TestParameterLen1¶ Bases:
object-
setup_method(method)¶
-
test_connect_disconnect()¶
-
test_default_value()¶
-
test_ext_force_positive()¶
-
test_map_size0()¶
-
test_map_size1()¶
-
test_map_size2()¶
-
test_number_of_elements()¶
-
test_set_value()¶
-
test_set_value_bounded()¶
-
test_set_value_wrong_length()¶
-
-
class
hyperspy.tests.model.test_parameter.TestParameterLen2¶ Bases:
object-
setup_method(method)¶
-
test_connect_disconnect()¶
-
test_default_value()¶
-
test_ext_force_positive()¶
-
test_is_tuple()¶
-
test_map_size0()¶
-
test_map_size1()¶
-
test_map_size2()¶
-
test_number_of_elements()¶
-
test_set_value()¶
-
test_set_value_bounded()¶
-
test_set_value_wrong_length()¶
-
test_set_value_wrong_length2()¶
-
hyperspy.tests.model.test_set_parameter_state module¶
-
class
hyperspy.tests.model.test_set_parameter_state.TestSetParameterInModel¶ Bases:
object-
setup_method(method)¶
-
test_set_parameter_in_model1()¶
-
test_set_parameter_in_model2()¶
-
test_set_parameter_in_model3()¶
-
test_set_parameter_in_model4()¶
-
test_set_parameter_in_model5()¶
-
test_set_parameter_in_model_free()¶
-
test_set_parameter_in_model_not_free()¶
-